GIU
Gandi LiveDNS Updater - Command line tool to keep your dynamic ip up to date.
Prequisites
- A valid key fro Gandi LiveDNS API. Use https://account.gandi.net/en/users/USER/security
(
USERis your Gandi user account). - Python 3.
Installation
The recommended way to install this package is through pip.
pip install --user giu
Usage
To use giu you need to create a config.toml file to hold the minimal set of
configurations.
[api]
url = 'https://dns.api.gandi.net/v5/livedns'
key = 'YOUR_KEY'
[dns]
domain = 'example.com'
records = [
{'type' = 'A', 'name' = '@', 'ttl' = 18000},
{'type' = 'A', 'name' = '*', 'ttl' = 1800},
]
[resolver]
providers = [
'http://ipecho.net/plain',
'https://ifconfig.me/ip',
'http://www.mon-ip.fr'
]
Docker Compose
In this example the config is in the current folder.
docker-composer up -d
By default the process will check your configuration every hour and update it if the process detects a drift in the desired state.
One shot
In this example the config file was created on $HOME/.giu/example.com.toml.
giu sync --conf $HOME/.giu/example.com.toml
Cronjob
In this example the config file was created on $HOME/.giu/example.com.toml.
$ crontab -e
* */2 * * * giu sync --conf $HOME/.giu/example.com.toml
Docker
In this example a config file in the $PWD folder is mounted in /app/conf and
the command runs in dry-run mode.
docker run -it --rm -v $PWD:/app/conf yriveiro/giu:dev giu sync --dry-run --config /app/conf/config.toml
✔ Dynamic IP fetched.
ℹ Current dynamic IP: XXX.XXX.XX.XX.
ℹ Dry run mode on.
ℹ TTL for 'A' record '@' on config: 1800
✔ 'A' record '@' for foo.bar from Gandi LiveDNS
ℹ IP for 'A' record '@' on Gandi LiveDNS: XXX.XXX.XXX.XXX
ℹ TTL for 'A' record '@' on Gandi LiveDNS: 18000
ℹ Update needed, dry run mode, no update done.
ℹ TTL for 'A' record '*' on config: 1800
✔ 'A' record '*' for toranja.tech from Gandi LiveDNS
ℹ IP for 'A' record '*' on Gandi LiveDNS: XXX.XXX.XXX.XXX
ℹ TTL for 'A' record '*' on Gandi LiveDNS: 1800
ℹ Update needed, dry run mode, no update done.
/app/conf folder is not configurable once the Docker image has hardening
applyed and that is the writable folder.
Improvements
Some improvements that I have ff the top of my head:
putcommand to create entries like CNAMES and so on.deletecommand to delete entriesbackupcommand to do backupsDocker Image to run giu with docker compose or as a Cronjob on Kubernetes.
Metadata
Release files for giu 0.3.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| giu-0.3.5.tar.gz | 7.7 kB | Without provenance | Details for giu-0.3.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| giu-0.3.5-py3-none-any.whl | Python 3 | none | any | Details for giu-0.3.5-py3-none-any.whl |
Total release size: 15.8 kB
Release files / giu-0.3.5.tar.gz
| Download URL | giu-0.3.5.tar.gz |
|---|---|
| Size | 7.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
990eae8d9ec67e0d657b1eece82ceb447014b3cfa938d3be422aca9ea0e3f246
|
|
BLAKE2b-256 checksum How to use checksums |
be58e93bab517bfa105a6f8e69df915040a711ef8ef06f689be74f85015374cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.2 CPython/3.10.8 Darwin/22.1.0
|
Release files / giu-0.3.5-py3-none-any.whl
| Download URL | giu-0.3.5-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
54b003b89b8fcc03d8af703e148adf60696361473de04ac90569adf0b2473f3c
|
|
BLAKE2b-256 checksum How to use checksums |
bfa3440702f41a8ade374b760b5f61d41879c9ef40f91d3c4674ce08750b21e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.2 CPython/3.10.8 Darwin/22.1.0
|
Security for giu 0.3.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.