在提交之前,请确认:
请附上任何可以帮助我们解决这个问题的信息,如果我们收到的信息不足,我们将对这个 issue 加上 Needs more information 标记并在收到更多资讯之前关闭 issue。
就这么多
port: 7890
socks-port: 7891
redir-port: 7892
allow-lan: true
mode: Rule
log-level: debug
proxy-providers:
my_airport:
type: http
url: "https://some.airport.com/some/subscribe"
interval: 3600
path: ./my_airport.yaml
health-check:
enable: true
interval: 600
url: http://www.gstatic.com/generate_204
只有这两行,而且已经是debug level了
INFO[0000] Start initial provider my_airport
FATA[0010] Parse config error: initial proxy provider my_airport error: Get "https://some.airport.com/some/subscribe": lookup some.airport.com on 127.0.0.11:53: read udp 127.0.0.1:46964->127.0.0.11:53: i/o timeout
Clash Core 的操作系统 (the OS that the Clash core is running on)
威联通 Docker,Tag为dev
使用者的操作系统 (the OS running on the client)
Mac OS
网路环境或拓扑 (network conditions/topology)
网络模式:bridge
IP地址:使用固定IP (192.168.1.233)
网关: 192.168.1.1
iptables,如果适用 (if applicable)
None
ISP 有没有进行 DNS 污染 (is your ISP performing DNS pollution?)
Nope
其他
None
无法加载订阅资源,无法启动。一直报找不到订阅网址对应的IP。使用IP直接来搞也不行。(例子里写的是 https://some.airport.com/some/subscribe ,直接解析成 http://9.8.7.6/some/subscribe 也不行)
使用不带订阅地址的config文件将docker启动带来,进入sh,直接wget https://some.airport.com/some/subscribe,发现是可以下载出来的。
我预期会发生……?
正常解析订阅文件并启动Clash
实际上发生了什麽?
INFO[0000] Start initial provider my_airport
FATA[0010] Parse config error: initial proxy provider my_airport error: Get "https://some.airport.com/some/subscribe": lookup some.airport.com on 127.0.0.11:53: read udp 127.0.0.1:46964->127.0.0.11:53: i/o timeout
127.0.0.11 是docker里面默认的/etc/resolve.conf 里面的内容,AdGuard的Docker默认也是这样写的,加载外部资源没出啥问题。但很奇怪,Clash的Docker就真的会去找/etc/resolve.conf里面的name server,而不是config文件里写的nameserver。
目前怀疑是clash启动的时候,系统的dns查询啥的还没启动,导致不能查询。但我直接写ip也不能访问,就很奇怪了。
感觉#756 跟我遇到的问题好像啊。
在第一次配置加载之前,clash 没法通过 dns 配置里的东西去进行 dns resolve,整个配置的加载是一体的
并不是
而是
那么第二次加载配置的时候,就会使用前一次的 dns 配置了,解决方法就是塞个 dns 给 docker
@jinyu121 可以提供一下 docker exec container-id nslookup www.baidu.com 的 output 嗎
@Dreamacro 我覺得是 alpine 的問題,可能要提供個 Ubuntu-based image。(https://github.com/kubernetes/kubernetes/issues/30215)
@BirkhoffLee
/ # nslookup t.cn
Server: 127.0.0.11
Address: 127.0.0.11:53
Non-authoritative answer:
tt.cn canonical name = tt.cn.cdn.dnsv1.com
tt.cn.cdn.dnsv1.com canonical name = 1834033.p23.tc.cdntip.com
Name: 1834033.p23.tc.cdntip.com
Address: 119.36.33.59
Name: 1834033.p23.tc.cdntip.com
Address: 123.6.33.60
Name: 1834033.p23.tc.cdntip.com
Address: 113.59.43.98
Name: 1834033.p23.tc.cdntip.com
Address: 118.212.225.117
Name: 1834033.p23.tc.cdntip.com
Address: 119.36.33.82
Name: 1834033.p23.tc.cdntip.com
Address: 42.63.21.200
Name: 1834033.p23.tc.cdntip.com
Address: 101.71.72.220
Name: 1834033.p23.tc.cdntip.com
Address: 221.13.202.107
Name: 1834033.p23.tc.cdntip.com
Address: 211.91.245.53
Non-authoritative answer:
tt.cn canonical name = tt.cn.cdn.dnsv1.com
tt.cn.cdn.dnsv1.com canonical name = 1834033.p23.tc.cdntip.com
/ # nslookup www.baidu.com
Server: 127.0.0.11
Address: 127.0.0.11:53
Non-authoritative answer:
www.baidu.com canonical name = www.a.shifen.com
Name: www.a.shifen.com
Address: 180.101.49.11
Name: www.a.shifen.com
Address: 180.101.49.12
Non-authoritative answer:
www.baidu.com canonical name = www.a.shifen.com
上面也写到了,很奇怪的是进入container,wget什么的都OK,只是clash会报问题。这我就很郁闷了
催更:目前(2020.09.15)还没有修复。
不过目前有一个Trick的办法:将所有配置文件先弄到本地,这样Clash就能正常启动了;再等待自动更新。
@jinyu121
docker run -it -v `pwd`/config:/root/.config/clash/ dreamacro/clash:dev
INFO[0000] Start initial provider my_airport
INFO[0000] HTTP proxy listening at: :7899
INFO[0000] SOCKS proxy listening at: :7900
似乎无法复现。
使用 127.0.0.11 作为dns服务器是一个预期行为, 这是 docker 内建的 dns server.
建议可以尝试一下
--dns=8.8.8.8
这个选项,以排除你的 dns 问题
目前使用的办法:
Most helpful comment
@BirkhoffLee
上面也写到了,很奇怪的是进入container,wget什么的都OK,只是clash会报问题。这我就很郁闷了