.gitignore | ||
pubip.py | ||
README.md |
pubIp
Simple dynamic DNS resolver which works with Tomato and requires Python 3.
Setup in Tomato
- In the left menu under
Basic -> DDNS
set "auto-refresh every" to e.g. 1 days. - In the
Service
dropdown choose:Custom URL
. - Add URL to where you have this service running:
http://YOUR_SERVER.TLD/update/YOUR_KEY/@IP
. - Check
Force next update
. - Hit
Save
. - Verify
Last IP Address
andLast Result
- Point your browser to
http://YOUR_SERVER.TLD/show/YOUR_KEY
to see whatYOUR_KEY
is bound to. - Or check if redirects works as intended with
http://YOUR_SERVER.TLD/go/YOUR_KEY/PORT
.
API
/show/:user
:
Shows the current IP that is set for key :user
.
/update/:user/:ip
:
Updates the current IP.
:ip
must match the request client address.
/go/:user/:port
:
This redirects you to whatever IP that :user
is set to along with :port
.
Limitations
All state is in-memory. If service restarts, there will be a delay (whatever you set auto-refresh to) before Tomato updates the IP. ._.
Anyone can overwrite an added key. ._.;