NewFuture / DDNS

:triangular_flag_on_post: 自动更新域名解析到本机IP(支持dnspod,阿里DNS,CloudFlare,华为云,DNSCOM...)
https://ddns.newfuture.cc/
MIT License
4.37k stars 666 forks source link

[debug]"index4": "public" 获取到的IP一直是127.0.0.1,如果用"default",获取到的就是容器IP #444

Closed czhou closed 3 months ago

czhou commented 3 months ago

描述问题 (Describe the bug)

"index4": "public" 获取到的IP一直是127.0.0.1,

版本信息 (version info)

复现步骤 (To Reproduce)

配置文件 (config file)

{
  "$schema": "https://ddns.newfuture.cc/schema/v2.8.json",
  "id": "11223344",
  "token": "xxxxxxxxxxxx",
  "dns": "dnspod",
  "ipv4": ["xxx.yyy.net"],
  "ipv6": [],
  "index4": "default",
  "index6": "default",
  "ttl": null,
  "proxy": null,
  "debug": true,
  "cache": false
}

调试输出 (debug output)

2024-08-02 03:15:00,671 <run.main> 143@run.py 
[INFO] Cache is disabled!
2024-08-02 03:15:00,672 <ip._open> 51@util/ip.py 
[DEBUG] open: https://pv.sohu.com/cityjson?ie=utf-8
2024-08-02 03:15:00,737 <ip._open> 55@util/ip.py 
[DEBUG] response: var returnCitySN = {"cip": "127.0.0.1", "cid": "00", "cname": "未知"};

补充说明 (Additional context)

[DEBUG] open: https://pv.sohu.com/cityjson?ie=utf-8 这个URL返回的IP就是127.0.0.1,是不是应该考虑换一个服务? var returnCitySN = {"cip": "127.0.0.1", "cid": "00", "cname": "未知"};

NewFuture commented 3 months ago

看起来https://pv.sohu.com/cityjson?ie=utf-8出问题了😂

搜狐这个不能作为默认值了

czhou commented 3 months ago

请问有马上就能用的替代服务么?没有的话就只能自己搞一个了...

NewFuture commented 3 months ago

更新一下? 最新得是 https://api-ipv4.ip.sb/ip 或者使用 url:xxx指定API

czhou commented 3 months ago

没问题了,谢谢。