Comments (11)
@diizzyy Thanks, I'll look into this issue.
from godns.
Still busy or is this something you can look into? @TimothyYe
It appears to be a simple parsing bug
from godns.
Same problem on windows. "ip_interface": "wgpia0",
time="2023-09-07T16:09:24-04:00" level=info msg="Creating DNS handler with provider: DuckDNS"
time="2023-09-07T16:09:24-04:00" level=info msg="GoDNS started, starting the DNS manager..."
time="2023-09-07T16:09:24-04:00" level=error msg="Cannot get IP:Get "": unsupported protocol scheme """
time="2023-09-07T16:09:24-04:00" level=error msg="get ip online failed. Fallback to get ip from interface if possible."
time="2023-09-07T16:09:24-04:00" level=error msg="get ip from interface failed. There is no more ways to try."
time="2023-09-07T16:09:24-04:00" level=error msg="can't get a vaild address from wgpia0"
time="2023-09-07T16:09:24-04:00" level=debug msg="DNS update loop finished, will run again in 300 seconds"
from godns.
@TimothyYe
Can you possibly have a look at this?
from godns.
ERRO[0000] Cannot get IP:Get "": unsupported protocol scheme ""
@diizzyy I've checked the code, this error means GoDNS still tries to get the IP address from the internet.
I think to fix this issue, update your config as:
{
"ip_type": "IPv4",
"ip_interface": "hn0",
"interval": 300,
"debug_info": true,
"run_once": true
}
Just remove ip_urls
from it.
By the way, I've released a new version to fix this problem and filter the empty URLs in the ip_urls
option.
from godns.
@TimothyYe
Hi, still doesn't work unfortunately
"ip_type": "IPv4",
"ip_interface": "hn0",
"interval": 300,
"debug_info": true,
"run_once": true
INFO[0000] GoDNS started, starting the DNS manager...
ERRO[0000] get ip from interface failed. There is no more ways to try.
ERRO[0000] Error during execution:fail to get current IP
Also the syntax is from the manual,
https://github.com/TimothyYe/godns#network-interface-ip-address
from godns.
Could you please help to run the ifconfig
command, and paste the output for your network interface hn0
here?
I guess the only difference between GoDNS and the code snippet you mentioned is that GoDNS checks if the IP is private:
https://github.com/TimothyYe/godns/blob/master/pkg/lib/ip_helper.go#L122
from godns.
I use my Oracle cloud to test GoDNS on the FreeBSD system, and the same error shows when the network interface is assigned with a private
IP address:
![image](https://private-user-images.githubusercontent.com/860685/277148151-e163bda4-8e95-4057-a7eb-1e92416c693d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk0Mzk5NTIsIm5iZiI6MTcxOTQzOTY1MiwicGF0aCI6Ii84NjA2ODUvMjc3MTQ4MTUxLWUxNjNiZGE0LThlOTUtNDA1Ny1hN2ViLTFlOTI0MTZjNjkzZC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjI2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDYyNlQyMjA3MzJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT00ZWI4NmNjNzEzNWU0NWJhMmI0Yjc1MDBhMTI2YmQ3MDYzNTMwMGFhYzZkYWU0NGYyOThlY2E0OWEyNWUzY2E2JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.3j4YinXnfc14xY5vug-T0-H9KDyI7pjvIIcgllirs5Q)
For the current implementation, GoDNS will ignore the private
IP address while fetching it from the network interface.
from godns.
Ahh, you're correct! I should've checked the code more carefully but it would be nice if godns where verbose about it especially in debug mode. There seems to be a loop however somewhere in the logic to detect IP?
INFO[0000] Creating DNS handler with provider: Infomaniak
INFO[0000] GoDNS started, starting the DNS manager...
DEBU[0000] get ip success from network intereface by: igb0, IP: NOT PRIVATE
DEBU[0000] get ip success from network intereface by: igb0, IP: NOT PRIVATE
INFO[0002] Update IP success: good NOT PRIVATE
DEBU[0002] Cached IP address: NOT PRIVATE
from godns.
It's not a loop, it only happens when the GoDNS is launched for the first time, the current_ip
in the IPHelper
is empty, so it tries to fetch the current IP address immediately. In this case, it produces one extra output log:
https://github.com/TimothyYe/godns/blob/master/pkg/lib/ip_helper.go#L71
Another log is produced by the inner goroutine inside the IPHelper
:
https://github.com/TimothyYe/godns/blob/master/pkg/lib/ip_helper.go#L60
So you may see two output logs here.
from godns.
Thanks for clarifying, I guess we can close this now.
from godns.
Related Issues (20)
- Feature request: Support OVH provider HOT 2
- 配置了这个DDNS服务后,怎么配置端口做转发呢? HOT 1
- Prebuilt binary for OpenBSD, please. This rc syntax should suffice for creation of an rc file to run with rc.d. HOT 9
- Deleting published tags is a bad idea HOT 1
- Usage of ip_urls should use round-robin HOT 2
- yaml config file support in docker? HOT 2
- 同时更新IPv4和IPv6的配置文件怎么写呀? HOT 6
- how to hidden cmd window in widnows HOT 3
- dynu supoort? HOT 2
- No timeout when getting ip with http client HOT 2
- 网络访问失败时需要添加延时再重试 目前连续访问会导致CPU占用100% HOT 2
- 优化建议:支持从本地网口直接获取IP HOT 1
- 想用网卡的IP地址报错 HOT 1
- PowerDNS, DynDNS(2) or RFC2136?
- The strangest thing (wrong public IP) HOT 3
- Docker Image not updating public ip address as per interval configuration HOT 3
- release-3.1.0: internal/server/server.go:19:12: pattern out/*: no matching files found HOT 12
- 能否做一下myip.la的API适配 HOT 9
- Add a way to query IP address through a specific interface HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from godns.