-
-
Notifications
You must be signed in to change notification settings - Fork 641
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Dynamic IP #247
Comments
Currently, if you do not specify any Do you plan to have that long running sessions? You could theoretically restart them when IP has changed or peridically, to refresh IP now. There has been raised a similar concern, but in the context of neko rooms: m1k1o/neko-rooms#62 |
Yes I want to use long running sessions. |
I highly recommend a dynamic dns provider with a reverse proxy like Caddy V2 (which also has a lightweight docker image). |
I have an dyndns provider but it dont fetch the ip every request or so. It only fetches the IP on Container start |
It could be easily implemented by adding new goroutine and ticker every X minutes. Or would you prefer having possibility to set it using CLI and calling it using crontab? |
Every X seconds is better maybe to set the interval via ENV. |
Both might make sense, however the latter one probably makes the most sense for now. |
Some news on this toppic? |
In my case I am having a VPN on my server and neko pick-up the wrong IP before VPN is established. Having an interval that will fetch the IP regularly would be great. For now I simply execute container down and up commands automatically after VPN is established. |
Any updates in this Case? |
No |
I looked at the code and the whole module must be restaretd. So there is no difference in setting up custom CRON script that restarts neko:
You could wrap it in such simple bash script: #!/bin/bash
# Get current ip
current_ip=$(dig +short myip.opendns.com @resolver1.opendns.com)
# Get last ip
last_ip=$(cat /opt/last_ip)
# Check if ip changed
if [ "$current_ip" != "$last_ip" ]; then
# Restart network
docker exec neko supervisorctl restart neko
# Save new ip
echo $current_ip > /opt/last_ip
fi And run e.g. every 5min in CRON. |
Maybe you could buildin this script in the container so that you can enable it with an env? |
I agree, that was the idea at some point in time. |
I want to expose my docker to the public internet, but i have a dynamic IP from my ISP. Is it Posible to set a refresh interval or a dyndns to the ENV section, so that the IP updates automaticaly?
The text was updated successfully, but these errors were encountered: