gandi-live-dns/src/example.config.py

58 lines
1.4 KiB
Python
Raw Normal View History

2017-08-14 21:18:04 +00:00
'''
Created on 13 Aug 2017
@author: cave
Copy this file to config.py and update the settings
'''
#!/usr/bin/env python
# encoding: utf-8
'''
Get your API key
Start by retrieving your API Key from the "Security" section in new Account admin panel to be able to make authenticated requests to the API.
https://account.gandi.net/
'''
api_secret = '---my_secret_API_KEY----'
'''
Gandiv5 LiveDNS API Location
http://doc.livedns.gandi.net/#api-endpoint
https://dns.api.gandi.net/api/v5/
2017-08-14 21:18:04 +00:00
'''
api_endpoint = 'https://dns.api.gandi.net/api/v5'
2017-08-14 21:18:04 +00:00
#enter all subdomains to be updated, subdomains must already exist to be updated
2022-09-26 20:08:43 +00:00
#your domain and subdomains to be updated, subdomains must already exist to be updated
dnsentries = {
2022-09-26 20:52:12 +00:00
"mydomain.tld": {
"ipv4": ["subdomain1", "subdomain2"],
"ipv6": ["subdomain3v6"],
},
"myotherdomain.tld": {
"ipv4": ["subdomain4"],
},
2022-09-26 20:08:43 +00:00
}
2017-08-14 21:18:04 +00:00
2022-09-26 20:52:12 +00:00
2017-08-14 21:18:04 +00:00
#300 seconds = 5 minutes
ttl = '300'
'''
IP address lookup service
2017-08-14 21:18:04 +00:00
run your own external IP provider:
+ https://github.com/mpolden/ipd
+ <?php $ip = $_SERVER['REMOTE_ADDR']; ?>
<?php print $ip; ?>
e.g.
2022-09-26 20:54:11 +00:00
+ https://api[4|6].ipify.org
+ https://ifconfig.co/ip
+ http://ifconfig.me/ip
2017-08-14 21:18:04 +00:00
+ http://whatismyip.akamai.com/
+ http://ipinfo.io/ip
+ many more ...
2017-08-14 21:18:04 +00:00
'''
ifconfig = 'choose_from_above_or_run_your_own'
2022-09-26 20:54:11 +00:00
ifconfig = {
"ipv4": 'choose_from_above_or_run_your_own_ipv4_lookup_service',
"ipv6": 'choose_from_above_or_run_your_own_ipv6_lookup_service',
}