forest
2a39be8481
|
5 months ago | |
---|---|---|
deployment | 2 years ago | |
.gitignore | 2 years ago | |
Dockerfile | 3 years ago | |
ReadMe.md | 5 months ago | |
build-docker.sh | 10 months ago | |
config.go | 5 months ago | |
config.json | 10 months ago | |
dns_echo_ip_service.go | 5 months ago | |
dns_resolver.go | 5 months ago | |
gandi_service.go | 5 months ago | |
go.mod | 5 months ago | |
go.sum | 5 months ago | |
http_plaintext_ip_service.go | 5 months ago | |
ip6_dot_me_service.go | 5 months ago | |
libp2p_self_ip.go | 3 years ago | |
main.go | 5 months ago | |
my_ipv6_address_dotcom_service.go | 5 months ago | |
porkbun_service.go | 5 months ago |
ReadMe.md
Gandi DNS Updater
Uses Gandi's LiveDNS API to keep my A
records up to date when CenturyLink changes my home IP address.
It polls intelligently: It spams YOUR domains that you configure to determine if everything is ok. Only when your stuff goes down does it start talking to gandi. Once it gets the current list of resource records for a domain does it then proceed to determine its public IP and attempt to update the records.
It uses a consensus of over 50% of the following 3rd party services in order to determine its current public IP:
myipv6address.com
ip6.me/api
icanhazip.com
getmyip.dev
ipify.org
myip.opendns.com
o-o.myaddr.l.google.com
Example Config
{
"PingPongLog": false,
"HealthPollingSeconds": 20,
"ResetAfterConsecutiveFailures": 3,
"IPv6Enabled": true,
"DNSResolvers": [
"8.8.8.8:53",
"9.9.9.9:53",
"1.1.1.1:53"
],
"RegistrarAccounts": [
{
"Label": "sequentialread-gandi",
"Provider": "gandi",
"SecretKey" : "*****************",
"RecordTTLSeconds": 300
}
]
"Domains": [
{
"RegistrarAccountLabel": "sequentialread-gandi",
"Domain": "sequentialread.com",
"Records": [
{
"Name": "@",
"Type": "A"
},
{
"Name": "*",
"Type": "A"
},
{
"Name": "@",
"Type": "AAAA"
},
{
"Name": "*",
"Type": "AAAA"
}
]
},
{
"RegistrarAccountLabel": "sequentialread-gandi",
"Domain": "server.garden",
"Records": [
{
"Name": "@",
"Type": "A"
},
{
"Name": "www",
"Type": "A"
},
{
"Name": "@",
"Type": "AAAA"
},
{
"Name": "www",
"Type": "AAAA"
}
]
}
]
}
or
environment:
- GDU_IPV6ENABLED=true
- GDU_REGISTRARACCOUNTS_0_LABEL=sequentialread-gandi
- GDU_REGISTRARACCOUNTS_0_PROVIDER=gandi
- GDU_REGISTRARACCOUNTS_0_SECRETKEY=${GREENHOUSE_GANDI_API_KEY}
- GDU_REGISTRARACCOUNTS_0_RECORDTTLSECONDS=300
- GDU_DOMAINS_0_REGISTRARACCOUNTLABEL=sequentialread-gandi
- GDU_DOMAINS_0_DOMAIN=sequentialread.com
- GDU_DOMAINS_0_RECORDS_0_NAME=@
- GDU_DOMAINS_0_RECORDS_0_TYPE=A
- GDU_DOMAINS_0_RECORDS_1_NAME=*
- GDU_DOMAINS_0_RECORDS_1_TYPE=A
- GDU_DOMAINS_0_RECORDS_2_NAME=@
- GDU_DOMAINS_0_RECORDS_2_TYPE=AAAA
- GDU_DOMAINS_0_RECORDS_3_NAME=*
- GDU_DOMAINS_0_RECORDS_4_TYPE=AAAA
- GDU_DOMAINS_1_REGISTRARACCOUNTLABEL=sequentialread-gandi
- GDU_DOMAINS_1_DOMAIN=server.garden
- GDU_DOMAINS_1_RECORDS_0_NAME=@
- GDU_DOMAINS_1_RECORDS_0_TYPE=A
- GDU_DOMAINS_1_RECORDS_1_NAME=www
- GDU_DOMAINS_1_RECORDS_1_TYPE=A
- GDU_DOMAINS_1_RECORDS_2_NAME=@
- GDU_DOMAINS_1_RECORDS_2_TYPE=AAAA
- GDU_DOMAINS_1_RECORDS_3_NAME=www
- GDU_DOMAINS_1_RECORDS_3_TYPE=AAAA
layerze.ro deployment
Build the app & webclip the build:
$ GOARCH=arm64 go build -o gandi-dns-updater .
$ curl https://webclip.sequentialread.com/gandi-dns-updater | bash
Deploy the new binary from webclip:
sudo -i
cd /opt/gandi-dns-updater && service gandi-dns-updater stop && rm gandi-dns-updater && curl https://webclip.sequentialread.com > gandi-dns-updater && chmod +x gandi-dns-updater && service gandi-dns-updater start
OR
cd /opt/gandi-dns-updater && systemctl stop gandi-dns-updater && rm gandi-dns-updater && curl https://webclip.sequentialread.com > gandi-dns-updater && chmod +x gandi-dns-updater && systemctl start gandi-dns-updater