xiaorouji / openwrt-passwall2

1.36k stars 442 forks source link

[Bug]: 当代理域名和直连域名指向同一IP时,一旦某个规则被激活,另外一个规则则失效,除非清空ipset #344

Closed lcuwx2016 closed 10 months ago

lcuwx2016 commented 1 year ago

描述您遇到的bug

域名:byr.pt 和 tracker.byr.pt 在此时此刻均指向同一IP: 2001:da8:215:4078:250:56ff:fe97:654d 由于站点主域名(byr.pt)不向中国大陆家用用户服务,遂将其加入代理列表; 但站点tracker(tracker.byr.pt)仍向中国大陆家用用户服务,且为了PT下载不被识别成盒子,遂将其加入直连列表; 清空ipset 后,当先访问byr.pt后,激活代理规则,但此时访问tracker.byr.pt,仍使用代理规则; 清空ipset 后,当先访问tracker.byr.pt后,激活直连规则,但此时访问tracker.byr.pt,仍使用直连规则

复现此Bug的步骤

以上已描述

您想要实现的目的

当代理域名和直连域名指向同一IP时,Passwall2 能够有效判断某一次访问是直连还是代理

日志信息

先访问byr.pt 的日志

A unified platform for anti-censorship.
2023/09/03 02:58:17 [Info] infra/conf/serial: Reading config: /tmp/etc/passwall2/global.json
2023/09/03 02:58:17 [Info] app/dns: DNS: created UDP client initialized for 127.0.0.1:15355
2023/09/03 02:58:17 [Info] app/dns: DNS: created UDP client initialized for 127.0.0.1:15356
2023/09/03 02:58:17 [Info] app/dns: DNS: created UDP client initialized for 127.0.0.1:15355
2023/09/03 02:58:17 [Info] transport/internet/tcp: listening TCP on 0.0.0.0:1041
2023/09/03 02:58:17 [Info] transport/internet/udp: listening UDP on 0.0.0.0:1041
2023/09/03 02:58:17 [Info] transport/internet/tcp: listening TCP on 127.0.0.1:15353
2023/09/03 02:58:17 [Info] transport/internet/udp: listening UDP on 127.0.0.1:15353
2023/09/03 02:58:17 [Info] transport/internet/tcp: listening TCP on 0.0.0.0:1070
2023/09/03 02:58:17 [Info] transport/internet/udp: listening UDP on 0.0.0.0:1070
2023/09/03 02:58:17 [Warning] core: Xray 1.8.3 started
2023/09/03 02:58:18 [Info] [4276031549] proxy/dokodemo: received request for [2408:823c:c13:388::9b7]:63219
2023/09/03 02:58:18 [Info] [4025542398] proxy/dokodemo: received request for 192.168.100.100:63219
2023/09/03 02:58:18 [Info] [3501556574] proxy/dokodemo: received request for [2408:823c:c13:388:211:32ff:feae:6d2b]:63219
2023/09/03 02:58:18 [Info] [4025542398] app/dispatcher: taking detour [direct] for [udp:180.102.3.58:10543]
2023/09/03 02:58:18 192.168.100.100:63219 accepted udp:180.102.3.58:10543 [udp_redir -> direct]
2023/09/03 02:58:18 [2408:823c:c13:388::9b7]:63219 accepted udp:[2001:b011:5c01:1491:544b:5831:2e95:4992]:9761 [udp_redir -> direct]
2023/09/03 02:58:18 [2408:823c:c13:388:211:32ff:feae:6d2b]:63219 accepted udp:[2001:b011:381d:7c8e:a501:7160:2b1a:fb0b]:22457 [udp_redir -> direct]
2023/09/03 02:58:18 [Info] [4276031549] app/dispatcher: taking detour [direct] for [udp:[2001:b011:5c01:1491:544b:5831:2e95:4992]:9761]
2023/09/03 02:58:18 [Info] [3501556574] app/dispatcher: taking detour [direct] for [udp:[2001:b011:381d:7c8e:a501:7160:2b1a:fb0b]:22457]
2023/09/03 02:58:18 [Info] [4025542398] proxy/freedom: connection opened to udp:180.102.3.58:10543, local endpoint [::]:55455, remote endpoint 180.102.3.58:10543
2023/09/03 02:58:18 [Info] [4276031549] proxy/freedom: connection opened to udp:[2001:b011:5c01:1491:544b:5831:2e95:4992]:9761, local endpoint [::]:59179, remote endpoint [2001:b011:5c01:1491:544b:5831:2e95:4992]:9761
2023/09/03 02:58:18 [Info] [3501556574] proxy/freedom: connection opened to udp:[2001:b011:381d:7c8e:a501:7160:2b1a:fb0b]:22457, local endpoint [::]:46322, remote endpoint [2001:b011:381d:7c8e:a501:7160:2b1a:fb0b]:22457
2023/09/03 02:58:21 [Info] [559694492] proxy/dokodemo: received request for 192.168.100.159:1994
2023/09/03 02:58:21 [Info] [559694492] app/dispatcher: sniffed domain: alive.github.com
2023/09/03 02:58:21 [Info] transport/internet/udp: establishing new connection for udp:127.0.0.1:15356
2023/09/03 02:58:21 [Info] app/dispatcher: taking detour [direct] for [udp:127.0.0.1:15356]
2023/09/03 02:58:21 DNS accepted udp:127.0.0.1:15356 [dns-in1 -> direct]
2023/09/03 02:58:21 [Info] proxy/freedom: connection opened to udp:127.0.0.1:15356, local endpoint [::]:33004, remote endpoint 127.0.0.1:15356
2023/09/03 02:58:21 [Info] [1490304722] proxy/socks: client UDP connection from udp:127.0.0.1:47517
2023/09/03 02:58:21 [Info] transport/internet/udp: establishing new connection for udp:8.8.8.8:53
2023/09/03 02:58:21 [Info] [1490304722] app/dispatcher: taking detour [Proxy] for [udp:8.8.8.8:53]
2023/09/03 02:58:21 [Info] [1490304722] transport/internet/tcp: dialing TCP to tcp:18.139.9.22:8443
2023/09/03 02:58:21 udp:127.0.0.1:47517 accepted udp:8.8.8.8:53 [Proxy]
2023/09/03 02:58:21 [Info] [1490304722] proxy/vless/outbound: tunneling request to udp:8.8.8.8:53 via 18.139.9.22:8443
2023/09/03 02:58:21 [Info] app/dns: UDP:127.0.0.1:15356 got answer: alive.github.com. TypeAAAA -> [] 203.572345ms
2023/09/03 02:58:21 [Info] app/dns: UDP:127.0.0.1:15356 got answer: alive.github.com. TypeA -> [140.82.112.25] 203.636777ms
2023/09/03 02:58:21 [Info] [559694492] app/dispatcher: taking detour [Proxy] for [tcp:alive.github.com:443]
2023/09/03 02:58:21 [Info] [559694492] transport/internet/tcp: dialing TCP to tcp:18.139.9.22:8443
2023/09/03 02:58:21 192.168.100.159:1994 accepted tcp:140.82.113.26:443 [tcp_redir -> Proxy]
2023/09/03 02:58:21 [Info] [559694492] proxy/vless/outbound: tunneling request to tcp:alive.github.com:443 via 18.139.9.22:8443
2023/09/03 02:58:21 [Info] [559694492] proxy/vless/encoding: XtlsFilterTls found tls client hello! 517
2023/09/03 02:58:21 [Info] [559694492] proxy/vless/encoding: XtlsPadding 517 744 0
2023/09/03 02:58:22 [Info] [2599201397] proxy/dokodemo: received request for 192.168.100.100:51413
2023/09/03 02:58:22 [Info] [3962158878] proxy/dokodemo: received request for [2408:823c:c13:68c::100]:51413
2023/09/03 02:58:22 [Info] [3962158878] app/dispatcher: taking detour [direct] for [udp:[2a01:4f9:1a:9da7::2]:6881]
2023/09/03 02:58:22 [Info] [2599201397] app/dispatcher: taking detour [direct] for [udp:194.35.122.36:22401]
2023/09/03 02:58:22 [2408:823c:c13:68c::100]:51413 accepted udp:[2a01:4f9:1a:9da7::2]:6881 [udp_redir -> direct]
2023/09/03 02:58:22 192.168.100.100:51413 accepted udp:194.35.122.36:22401 [udp_redir -> direct]
2023/09/03 02:58:22 [Info] [3962158878] proxy/freedom: connection opened to udp:[2a01:4f9:1a:9da7::2]:6881, local endpoint [::]:37674, remote endpoint [2a01:4f9:1a:9da7::2]:6881
2023/09/03 02:58:22 [Info] [2599201397] proxy/freedom: connection opened to udp:194.35.122.36:22401, local endpoint [::]:60077, remote endpoint 194.35.122.36:22401
2023/09/03 02:58:22 [Info] [559694492] proxy/vless/encoding: Xtls Unpadding new block0 16 content 2818 padding 78 0
2023/09/03 02:58:22 [Info] [559694492] proxy/vless/encoding: XtlsFilterTls found tls 1.3! 1163 TLS_AES_128_GCM_SHA256
2023/09/03 02:58:22 [Info] [559694492] proxy/vless/encoding: XtlsPadding 64 899 0
2023/09/03 02:58:22 [Info] [559694492] proxy/vless/encoding: XtlsPadding 1145 101 2
2023/09/03 02:58:22 [Info] [559694492] proxy/vless/encoding: XtlsWrite writeV 0 1251 0
2023/09/03 02:58:22 [Info] proxy/dokodemo: write udp [2a01:4f9:1a:9da7::2]:6881->[2408:823c:c13:68c::100]:51413: sendto: network is unreachable
2023/09/03 02:58:22 [Info] [559694492] proxy/vless/encoding: Xtls Unpadding new block0 0 content 158 padding 1041 2
2023/09/03 02:58:22 [Info] [559694492] proxy/vless/encoding: XtlsRead splice
2023/09/03 02:58:24 [Info] [2934088918] proxy/dokodemo: received request for [2408:823c:c13:388:d1a1:f1ee:f4dd:dc5c]:1998
2023/09/03 02:58:24 [Info] [2934088918] app/dispatcher: sniffed domain: edge.microsoft.com
2023/09/03 02:58:24 [Info] app/dns: UDP:127.0.0.1:15356 got answer: edge.microsoft.com. TypeA -> [204.79.197.239 13.107.21.239] 67.477262ms
2023/09/03 02:58:24 [Info] app/dns: UDP:127.0.0.1:15356 got answer: edge.microsoft.com. TypeAAAA -> [[2a01:111:202c::239] [2620:1ec:13::239]] 67.505137ms
2023/09/03 02:58:24 [Info] [2934088918] app/dispatcher: taking detour [direct] for [tcp:edge.microsoft.com:443]
2023/09/03 02:58:24 [2408:823c:c13:388:d1a1:f1ee:f4dd:dc5c]:1998 accepted tcp:[2620:1ec:13::239]:443 [tcp_redir -> direct]
2023/09/03 02:58:24 [Info] [2934088918] proxy/freedom: dialing to tcp:[2620:1ec:13::239]:443
2023/09/03 02:58:24 [Info] [2934088918] transport/internet/tcp: dialing TCP to tcp:[2620:1ec:13::239]:443
2023/09/03 02:58:24 [Info] [2934088918] proxy/freedom: connection opened to tcp:edge.microsoft.com:443, local endpoint [2408:823c:c13:388::1]:50392, remote endpoint [2620:1ec:13::239]:443
2023/09/03 02:58:24 [Info] [3982001785] proxy/dokodemo: received request for [2408:823c:c13:388:d1a1:f1ee:f4dd:dc5c]:1999
2023/09/03 02:58:24 [Info] [3982001785] app/dispatcher: sniffed domain: byr.pt
2023/09/03 02:58:25 [Info] app/dns: UDP:127.0.0.1:15356 got answer: byr.pt. TypeAAAA -> [[2001:da8:215:4078:250:56ff:fe97:654d]] 73.504038ms
2023/09/03 02:58:25 [Info] app/dns: UDP:127.0.0.1:15356 got answer: byr.pt. TypeA -> [] 73.518768ms
2023/09/03 02:58:25 [Info] [3982001785] app/dispatcher: taking detour [ProxyGame] for [tcp:byr.pt:443]
2023/09/03 02:58:25 [Info] [3982001785] transport/internet/tcp: dialing TCP to tcp:18.139.9.22:8443
2023/09/03 02:58:25 [2408:823c:c13:388:d1a1:f1ee:f4dd:dc5c]:1999 accepted tcp:[2001:da8:215:4078:250:56ff:fe97:654d]:443 [tcp_redir -> ProxyGame]
2023/09/03 02:58:25 [Info] [3982001785] proxy/vless/outbound: tunneling request to tcp:byr.pt:443 via 18.139.9.22:8443
2023/09/03 02:58:25 [Info] [3982001785] proxy/vless/encoding: XtlsFilterTls found tls client hello! 517
2023/09/03 02:58:25 [Info] [3982001785] proxy/vless/encoding: XtlsPadding 517 760 0
2023/09/03 02:58:25 [Info] [3982001785] proxy/vless/encoding: Xtls Unpadding new block0 16 content 254 padding 1127 0
2023/09/03 02:58:25 [Info] [3982001785] proxy/vless/encoding: XtlsFilterTls found tls 1.3! 254 TLS_AES_256_GCM_SHA384
2023/09/03 02:58:25 [Info] [3982001785] proxy/vless/encoding: XtlsPadding 80 1177 0
2023/09/03 02:58:25 [Info] [3982001785] proxy/vless/encoding: XtlsPadding 98 1025 2
2023/09/03 02:58:25 [Info] [3982001785] proxy/vless/encoding: XtlsWrite writeV 0 1128 0
2023/09/03 02:58:25 [Info] [1715280872] app/dispatcher: taking detour [direct] for [udp:58.240.55.37:7080]
2023/09/03 02:58:25 [Info] [1715280872] proxy/freedom: connection opened to udp:58.240.55.37:7080, local endpoint [::]:42760, remote endpoint 58.240.55.37:7080
2023/09/03 02:58:25 [Info] [3982001785] proxy/vless/encoding: Xtls Unpadding new block0 0 content 150 padding 1241 2
2023/09/03 02:58:25 [Info] [3982001785] proxy/vless/encoding: XtlsRead splice
2023/09/03 02:58:30 [Info] [2286651749] proxy/dokodemo: received request for 127.0.0.1:42351
2023/09/03 02:58:30 [Info] [4023629746] proxy/dokodemo: received request for 127.0.0.1:38352
2023/09/03 02:58:30 [Info] [4023629746] app/dispatcher: taking detour [dns-out] for [udp:1.1.1.1:53]
2023/09/03 02:58:30 127.0.0.1:38352 accepted udp:1.1.1.1:53 [dns-in -> dns-out]
2023/09/03 02:58:30 [Info] [2286651749] app/dispatcher: taking detour [dns-out] for [udp:1.1.1.1:53]
2023/09/03 02:58:30 [Info] [4023629746] proxy/dns: handling DNS traffic to udp:127.0.0.1:15356
2023/09/03 02:58:30 [Info] [2286651749] proxy/dns: handling DNS traffic to udp:127.0.0.1:15356
2023/09/03 02:58:30 127.0.0.1:42351 accepted udp:1.1.1.1:53 [dns-in -> dns-out]
2023/09/03 02:58:30 [Info] app/dns: UDP:127.0.0.1:15356 got answer: array601.prod.do.dsp.mp.microsoft.com. TypeAAAA -> [] 67.282011ms
2023/09/03 02:58:30 [Info] app/dns: UDP:127.0.0.1:15356 got answer: array601.prod.do.dsp.mp.microsoft.com. TypeA -> [20.191.46.109] 67.334546ms
2023/09/03 02:58:30 [Info] app/dns: failed to lookup ip for domain array601.prod.do.dsp.mp.microsoft.com at server UDP:127.0.0.1:15356 > empty response
2023/09/03 02:58:30 [Info] transport/internet/udp: establishing new connection for udp:127.0.0.1:15355
2023/09/03 02:58:30 [Info] app/dispatcher: taking detour [direct] for [udp:127.0.0.1:15355]
2023/09/03 02:58:30 DNS accepted udp:127.0.0.1:15355 [dns-in1 -> direct]
2023/09/03 02:58:30 [Info] proxy/freedom: connection opened to udp:127.0.0.1:15355, local endpoint [::]:38332, remote endpoint 127.0.0.1:15355
2023/09/03 02:58:30 [Info] app/dns: UDP:127.0.0.1:15355 got answer: array601.prod.do.dsp.mp.microsoft.com. TypeAAAA -> [] 4.266411ms
2023/09/03 02:58:30 [Info] app/dns: failed to lookup ip for domain array601.prod.do.dsp.mp.microsoft.com at server UDP:127.0.0.1:15355 > empty response
2023/09/03 02:58:30 [Info] [253162968] proxy/dokodemo: received request for 192.168.100.159:2005
2023/09/03 02:58:30 [Info] [253162968] app/dispatcher: sniffed domain: array601.prod.do.dsp.mp.microsoft.com
2023/09/03 02:58:30 [Info] [253162968] app/dispatcher: taking detour [direct] for [tcp:array601.prod.do.dsp.mp.microsoft.com:443]
2023/09/03 02:58:30 192.168.100.159:2005 accepted tcp:20.191.46.109:443 [tcp_redir -> direct]
2023/09/03 02:58:30 [Info] [253162968] proxy/freedom: dialing to tcp:20.191.46.109:443
2023/09/03 02:58:30 [Info] [253162968] transport/internet/tcp: dialing TCP to tcp:20.191.46.109:443
2023/09/03 02:58:34 [Info] [2637172546] proxy/dokodemo: received request for 127.0.0.1:41713
2023/09/03 02:58:34 [Info] [754311086] proxy/dokodemo: received request for 127.0.0.1:59118
2023/09/03 02:58:34 [Info] [2637172546] app/dispatcher: taking detour [dns-out] for [udp:1.1.1.1:53]
2023/09/03 02:58:34 [Info] [754311086] app/dispatcher: taking detour [dns-out] for [udp:1.1.1.1:53]
2023/09/03 02:58:34 [Info] [2637172546] proxy/dns: handling DNS traffic to udp:127.0.0.1:15356
2023/09/03 02:58:34 [Info] [754311086] proxy/dns: handling DNS traffic to udp:127.0.0.1:15356
2023/09/03 02:58:34 127.0.0.1:41713 accepted udp:1.1.1.1:53 [dns-in -> dns-out]
2023/09/03 02:58:34 127.0.0.1:59118 accepted udp:1.1.1.1:53 [dns-in -> dns-out]
2023/09/03 02:58:34 [Info] app/dns: UDP:127.0.0.1:15355 got answer: pdcweb.micloud.xiaomi.net. TypeA -> [124.251.101.78] 3.081742ms
2023/09/03 02:58:34 [Info] app/dns: UDP:127.0.0.1:15355 got answer: pdcweb.micloud.xiaomi.net. TypeAAAA -> [] 3.086184ms
2023/09/03 02:58:34 [Info] app/dns: failed to lookup ip for domain pdcweb.micloud.xiaomi.net at server UDP:127.0.0.1:15355 > empty response
2023/09/03 02:58:35 [Info] [2201156996] proxy/dokodemo: received request for 192.168.100.101:33336
2023/09/03 02:58:35 [Info] [2201156996] proxy/freedom: dialing to tcp:[2408:823c:c13:388::21f]:80
2023/09/03 02:58:35 [Info] [2201156996] transport/internet/tcp: dialing TCP to tcp:[2408:823c:c13:388::21f]:80
2023/09/03 02:58:36 [Info] [68788622] proxy/dokodemo: received request for [2408:823c:c13:388:d1a1:f1ee:f4dd:dc5c]:2014
2023/09/03 02:58:36 [Info] [68788622] app/dispatcher: sniffed domain: clients4.google.com
2023/09/03 02:58:36 [Info] app/dns: UDP:127.0.0.1:15356 got answer: clients4.google.com. TypeAAAA -> [[2404:6800:4003:c00::65] [2404:6800:4003:c00::71] [2404:6800:4003:c00::8b] [2404:6800:4003:c00::64]] 67.630458ms
2023/09/03 02:58:36 [Info] app/dns: UDP:127.0.0.1:15356 got answer: clients4.google.com. TypeA -> [172.253.118.101 172.253.118.138 172.253.118.113 172.253.118.139 172.253.118.100 172.253.118.102] 67.661733ms
2023/09/03 02:58:36 [Info] [68788622] app/dispatcher: taking detour [Proxy] for [tcp:clients4.google.com:443]
2023/09/03 02:58:36 [2408:823c:c13:388:d1a1:f1ee:f4dd:dc5c]:2014 accepted tcp:[2404:6800:4003:c00::8b]:443 [tcp_redir -> Proxy]
2023/09/03 02:58:36 [Info] [68788622] transport/internet/tcp: dialing TCP to tcp:18.139.9.22:8443
2023/09/03 02:58:36 [Info] [68788622] proxy/vless/outbound: tunneling request to tcp:clients4.google.com:443 via 18.139.9.22:8443
2023/09/03 02:58:36 [Info] [68788622] proxy/vless/encoding: XtlsFilterTls found tls client hello! 775
2023/09/03 02:58:36 [Info] [68788622] proxy/vless/encoding: XtlsPadding 775 413 0
2023/09/03 02:58:36 [Info] [68788622] proxy/vless/encoding: Xtls Unpadding new block0 16 content 380 padding 936 0
2023/09/03 02:58:36 [Info] [68788622] proxy/vless/encoding: XtlsFilterTls found tls 1.3! 380 TLS_AES_128_GCM_SHA256
2023/09/03 02:58:36 [Info] [68788622] proxy/vless/encoding: XtlsPadding 172 924 0
2023/09/03 02:58:36 [Info] [68788622] proxy/vless/encoding: XtlsPadding 3228 29 2
2023/09/03 02:58:36 [Info] [68788622] proxy/vless/encoding: XtlsWrite writeV 0 3262 0
2023/09/03 02:58:36 [Info] [68788622] proxy/vless/encoding: Xtls Unpadding new block0 0 content 997 padding 3 2
2023/09/03 02:58:36 [Info] [68788622] proxy/vless/encoding: XtlsRead splice
2023/09/03 02:58:39 [Info] proxy/dokodemo: write udp [2a01:4f9:1a:9da7::2]:6881->[2408:823c:c13:68c::100]:51413: sendto: network is unreachable

清除ipset后先访问tracker.byr.pt 的日志

Xray 1.8.3 (Xray, Penetrates Everything.) OpenWrt (go1.19.12 linux/amd64)
A unified platform for anti-censorship.
2023/09/03 02:59:26 [Info] infra/conf/serial: Reading config: /tmp/etc/passwall2/global.json
2023/09/03 02:59:26 [Info] app/dns: DNS: created UDP client initialized for 127.0.0.1:15355
2023/09/03 02:59:26 [Info] app/dns: DNS: created UDP client initialized for 127.0.0.1:15356
2023/09/03 02:59:26 [Info] app/dns: DNS: created UDP client initialized for 127.0.0.1:15355
2023/09/03 02:59:26 [Info] transport/internet/tcp: listening TCP on 0.0.0.0:1041
2023/09/03 02:59:26 [Info] transport/internet/udp: listening UDP on 0.0.0.0:1041
2023/09/03 02:59:26 [Info] transport/internet/tcp: listening TCP on 127.0.0.1:15353
2023/09/03 02:59:26 [Info] transport/internet/udp: listening UDP on 127.0.0.1:15353
2023/09/03 02:59:26 [Info] transport/internet/tcp: listening TCP on 0.0.0.0:1070
2023/09/03 02:59:26 [Info] transport/internet/udp: listening UDP on 0.0.0.0:1070
2023/09/03 02:59:26 [Warning] core: Xray 1.8.3 started
2023/09/03 02:59:26 [Info] [3504163220] proxy/dokodemo: received request for 192.168.100.101:37846
2023/09/03 02:59:26 [Info] transport/internet/udp: establishing new connection for udp:127.0.0.1:15355
2023/09/03 02:59:26 [Info] app/dispatcher: taking detour [direct] for [udp:127.0.0.1:15355]
2023/09/03 02:59:26 [Info] proxy/freedom: connection opened to udp:127.0.0.1:15355, local endpoint [::]:37661, remote endpoint 127.0.0.1:15355
2023/09/03 02:59:26 DNS accepted udp:127.0.0.1:15355 [dns-in1 -> direct]
2023/09/03 02:59:27 [Info] [2919309958] proxy/dokodemo: received request for 192.168.100.159:2078
2023/09/03 02:59:27 [Info] [2919309958] app/dispatcher: sniffed domain: alive.github.com
2023/09/03 02:59:27 [Info] transport/internet/udp: establishing new connection for udp:127.0.0.1:15356
2023/09/03 02:59:27 [Info] app/dispatcher: taking detour [direct] for [udp:127.0.0.1:15356]
2023/09/03 02:59:27 DNS accepted udp:127.0.0.1:15356 [dns-in1 -> direct]
2023/09/03 02:59:27 [Info] proxy/freedom: connection opened to udp:127.0.0.1:15356, local endpoint [::]:43623, remote endpoint 127.0.0.1:15356
2023/09/03 02:59:27 [Info] [3696557398] proxy/socks: client UDP connection from udp:127.0.0.1:56224
2023/09/03 02:59:27 [Info] transport/internet/udp: establishing new connection for udp:8.8.8.8:53
2023/09/03 02:59:27 [Info] [3696557398] app/dispatcher: taking detour [Proxy] for [udp:8.8.8.8:53]
2023/09/03 02:59:27 udp:127.0.0.1:56224 accepted udp:8.8.8.8:53 [Proxy]
2023/09/03 02:59:27 [Info] [3696557398] transport/internet/tcp: dialing TCP to tcp:18.139.9.22:8443
2023/09/03 02:59:27 [Info] [3696557398] proxy/vless/outbound: tunneling request to udp:8.8.8.8:53 via 18.139.9.22:8443
2023/09/03 02:59:27 [Info] app/dns: UDP:127.0.0.1:15356 got answer: alive.github.com. TypeA -> [140.82.112.26] 220.560186ms
2023/09/03 02:59:27 [Info] app/dns: UDP:127.0.0.1:15356 got answer: alive.github.com. TypeAAAA -> [] 220.61559ms
2023/09/03 02:59:27 [Info] [2919309958] app/dispatcher: taking detour [Proxy] for [tcp:alive.github.com:443]
2023/09/03 02:59:27 [Info] [2919309958] transport/internet/tcp: dialing TCP to tcp:18.139.9.22:8443
2023/09/03 02:59:27 192.168.100.159:2078 accepted tcp:140.82.113.26:443 [tcp_redir -> Proxy]
2023/09/03 02:59:27 [Info] [2919309958] proxy/vless/outbound: tunneling request to tcp:alive.github.com:443 via 18.139.9.22:8443
2023/09/03 02:59:27 [Info] [2919309958] proxy/vless/encoding: XtlsFilterTls found tls client hello! 517
2023/09/03 02:59:27 [Info] [2919309958] proxy/vless/encoding: XtlsPadding 517 502 0
2023/09/03 02:59:28 [Info] [2401714268] proxy/dokodemo: received request for 192.168.100.100:51413
2023/09/03 02:59:28 [Info] [2401714268] app/dispatcher: taking detour [direct] for [udp:116.130.34.164:33642]
2023/09/03 02:59:28 192.168.100.100:51413 accepted udp:116.130.34.164:33642 [udp_redir -> direct]
2023/09/03 02:59:28 [Info] [2401714268] proxy/freedom: connection opened to udp:116.130.34.164:33642, local endpoint [::]:32917, remote endpoint 116.130.34.164:33642
2023/09/03 02:59:28 [Info] [2919309958] proxy/vless/encoding: Xtls Unpadding new block0 16 content 2818 padding 180 0
2023/09/03 02:59:28 [Info] [2919309958] proxy/vless/encoding: XtlsFilterTls found tls 1.3! 1163 TLS_AES_128_GCM_SHA256
2023/09/03 02:59:28 [Info] [2919309958] proxy/vless/encoding: XtlsPadding 1209 78 0
2023/09/03 02:59:28 [Info] [2919309958] proxy/vless/encoding: Xtls Unpadding new block0 0 content 158 padding 1153 2
2023/09/03 02:59:28 [Info] [2919309958] proxy/vless/encoding: XtlsRead splice
2023/09/03 02:59:28 [Info] [2919309958] proxy/vless/encoding: XtlsPadding 204 989 2
2023/09/03 02:59:28 [Info] [2919309958] proxy/vless/encoding: XtlsWrite writeV 0 1198 0
2023/09/03 02:59:28 [Info] [3772622349] proxy/dokodemo: received request for [2408:823c:c13:388::9b7]:63219
2023/09/03 02:59:28 [Info] [2586647674] proxy/dokodemo: received request for [2408:823c:c13:388:211:32ff:feae:6d2b]:63219
2023/09/03 02:59:28 [Info] [2586647674] app/dispatcher: taking detour [direct] for [udp:[2408:8207:2452:2971:9209:d0ff:fe28:f3]:35334]
2023/09/03 02:59:28 [Info] [3772622349] app/dispatcher: taking detour [direct] for [udp:[2001:b011:d003:2d6c:24c6:3842:2c33:68f3]:12518]
2023/09/03 02:59:28 [Info] [2067711783] proxy/dokodemo: received request for 192.168.100.100:63219
2023/09/03 02:59:28 [Info] [2586647674] proxy/freedom: connection opened to udp:[2408:8207:2452:2971:9209:d0ff:fe28:f3]:35334, local endpoint [::]:55799, remote endpoint [2408:8207:2452:2971:9209:d0ff:fe28:f3]:35334
2023/09/03 02:59:28 [Info] [3772622349] proxy/freedom: connection opened to udp:[2001:b011:d003:2d6c:24c6:3842:2c33:68f3]:12518, local endpoint [::]:37818, remote endpoint [2001:b011:d003:2d6c:24c6:3842:2c33:68f3]:12518
2023/09/03 02:59:28 [Info] [2067711783] app/dispatcher: taking detour [direct] for [udp:105.112.225.185:6543]
2023/09/03 02:59:28 [2408:823c:c13:388:211:32ff:feae:6d2b]:63219 accepted udp:[2408:8207:2452:2971:9209:d0ff:fe28:f3]:35334 [udp_redir -> direct]
2023/09/03 02:59:28 [2408:823c:c13:388::9b7]:63219 accepted udp:[2001:b011:d003:2d6c:24c6:3842:2c33:68f3]:12518 [udp_redir -> direct]
2023/09/03 02:59:28 192.168.100.100:63219 accepted udp:105.112.225.185:6543 [udp_redir -> direct]
2023/09/03 02:59:28 [Info] [2067711783] proxy/freedom: connection opened to udp:105.112.225.185:6543, local endpoint [::]:40306, remote endpoint 105.112.225.185:6543
2023/09/03 02:59:31 [Info] [766787158] proxy/dokodemo: received request for [2408:823c:c13:388:d1a1:f1ee:f4dd:dc5c]:2085
2023/09/03 02:59:31 [Info] [766787158] app/dispatcher: sniffed domain: www.google.com
2023/09/03 02:59:32 [Info] app/dns: UDP:127.0.0.1:15356 got answer: www.google.com. TypeAAAA -> [[2404:6800:4003:c00::67] [2404:6800:4003:c00::68] [2404:6800:4003:c00::69] [2404:6800:4003:c00::6a]] 72.458906ms
2023/09/03 02:59:32 [Info] app/dns: UDP:127.0.0.1:15356 got answer: www.google.com. TypeA -> [142.250.4.106 142.250.4.105 142.250.4.147 142.250.4.99 142.250.4.104 142.250.4.103] 72.543453ms
2023/09/03 02:59:32 [Info] [766787158] app/dispatcher: taking detour [Proxy] for [tcp:www.google.com:443]
2023/09/03 02:59:32 [Info] [766787158] transport/internet/tcp: dialing TCP to tcp:18.139.9.22:8443
2023/09/03 02:59:32 [2408:823c:c13:388:d1a1:f1ee:f4dd:dc5c]:2085 accepted tcp:[2404:6800:4003:c06::68]:443 [tcp_redir -> Proxy]
2023/09/03 02:59:32 [Info] [766787158] proxy/vless/outbound: tunneling request to tcp:www.google.com:443 via 18.139.9.22:8443
2023/09/03 02:59:32 [Info] [766787158] proxy/vless/encoding: XtlsFilterTls found tls client hello! 765
2023/09/03 02:59:32 [Info] [766787158] proxy/vless/encoding: XtlsPadding 765 620 0
2023/09/03 02:59:32 [Info] [766787158] proxy/vless/encoding: Xtls Unpadding new block0 16 content 375 padding 639 0
2023/09/03 02:59:32 [Info] [766787158] proxy/vless/encoding: XtlsFilterTls found tls 1.3! 375 TLS_AES_128_GCM_SHA256
2023/09/03 02:59:32 [Info] [766787158] proxy/vless/encoding: XtlsPadding 172 837 0
2023/09/03 02:59:32 [Info] [766787158] proxy/vless/encoding: XtlsPadding 955 109 2
2023/09/03 02:59:32 [Info] [766787158] proxy/vless/encoding: XtlsWrite writeV 0 1069 0
2023/09/03 02:59:32 [Info] [766787158] proxy/vless/encoding: Xtls Unpadding new block0 0 content 956 padding 19 2
2023/09/03 02:59:32 [Info] [766787158] proxy/vless/encoding: XtlsRead splice
2023/09/03 02:59:32 [Info] [1299856971] proxy/dokodemo: received request for [2408:823c:c13:388:d1a1:f1ee:f4dd:dc5c]:2086
2023/09/03 02:59:32 [Info] [1359072003] proxy/dokodemo: received request for [2408:823c:c13:388:d1a1:f1ee:f4dd:dc5c]:2087
2023/09/03 02:59:32 [Info] [1299856971] app/dispatcher: sniffed domain: safebrowsing.google.com
2023/09/03 02:59:32 [Info] [1359072003] app/dispatcher: sniffed domain: tracker.byr.pt
2023/09/03 02:59:32 [Info] app/dns: UDP:127.0.0.1:15355 got answer: tracker.byr.pt. TypeAAAA -> [[2001:da8:215:4078:250:56ff:fe97:654d]] 2.50943ms
2023/09/03 02:59:32 [Info] app/dns: UDP:127.0.0.1:15355 got answer: tracker.byr.pt. TypeA -> [] 2.760804ms
2023/09/03 02:59:32 [Info] [1359072003] app/dispatcher: taking detour [direct] for [tcp:tracker.byr.pt:443]
2023/09/03 02:59:32 [2408:823c:c13:388:d1a1:f1ee:f4dd:dc5c]:2087 accepted tcp:[2001:da8:215:4078:250:56ff:fe97:654d]:443 [tcp_redir -> direct]
2023/09/03 02:59:32 [Info] [1359072003] proxy/freedom: dialing to tcp:[2001:da8:215:4078:250:56ff:fe97:654d]:443
2023/09/03 02:59:32 [Info] [1359072003] transport/internet/tcp: dialing TCP to tcp:[2001:da8:215:4078:250:56ff:fe97:654d]:443
2023/09/03 02:59:32 [Info] [1359072003] proxy/freedom: connection opened to tcp:tracker.byr.pt:443, local endpoint [2408:823c:c13:388::1]:59852, remote endpoint [2001:da8:215:4078:250:56ff:fe97:654d]:443
2023/09/03 02:59:32 [Info] app/dns: UDP:127.0.0.1:15356 got answer: safebrowsing.google.com. TypeAAAA -> [[2404:6800:4003:c04::5b] [2404:6800:4003:c04::5d] [2404:6800:4003:c04::be] [2404:6800:4003:c04::88]] 74.278449ms
2023/09/03 02:59:32 [Info] app/dns: UDP:127.0.0.1:15356 got answer: safebrowsing.google.com. TypeA -> [172.217.194.190 172.217.194.91 172.217.194.136 172.217.194.93] 74.492782ms
2023/09/03 02:59:32 [Info] [1299856971] app/dispatcher: taking detour [Proxy] for [tcp:safebrowsing.google.com:443]
2023/09/03 02:59:32 [Info] [1299856971] transport/internet/tcp: dialing TCP to tcp:18.139.9.22:8443
2023/09/03 02:59:32 [2408:823c:c13:388:d1a1:f1ee:f4dd:dc5c]:2086 accepted tcp:[2404:6800:4003:c04::5d]:443 [tcp_redir -> Proxy]
2023/09/03 02:59:32 [Info] [1299856971] proxy/vless/outbound: tunneling request to tcp:safebrowsing.google.com:443 via 18.139.9.22:8443
2023/09/03 02:59:32 [Info] [1299856971] proxy/vless/encoding: XtlsFilterTls found tls client hello! 783
2023/09/03 02:59:32 [Info] [1299856971] proxy/vless/encoding: XtlsPadding 783 595 0
2023/09/03 02:59:33 [Info] [1299856971] proxy/vless/encoding: Xtls Unpadding new block0 16 content 384 padding 724 0
2023/09/03 02:59:33 [Info] [1299856971] proxy/vless/encoding: XtlsFilterTls found tls 1.3! 384 TLS_AES_128_GCM_SHA256
2023/09/03 02:59:33 [Info] [1299856971] proxy/vless/encoding: XtlsPadding 74 1207 0
2023/09/03 02:59:33 [Info] [1299856971] proxy/vless/encoding: XtlsPadding 98 1022 2
2023/09/03 02:59:33 [Info] [1299856971] proxy/vless/encoding: XtlsWrite writeV 0 1125 0
2023/09/03 02:59:33 [Info] [1299856971] proxy/vless/encoding: Xtls Unpadding new block0 0 content 1005 padding 232 2
2023/09/03 02:59:33 [Info] [1299856971] proxy/vless/encoding: XtlsRead splice
2023/09/03 02:59:34 127.0.0.1:39752 accepted udp:1.1.1.1:53 [dns-in -> dns-out]
2023/09/03 02:59:34 127.0.0.1:35677 accepted udp:1.1.1.1:53 [dns-in -> dns-out]
2023/09/03 02:59:34 [Info] [3469985157] proxy/dokodemo: received request for 127.0.0.1:39752
2023/09/03 02:59:34 [Info] [2808188123] proxy/dokodemo: received request for 127.0.0.1:35677
2023/09/03 02:59:34 [Info] [3469985157] app/dispatcher: taking detour [dns-out] for [udp:1.1.1.1:53]
2023/09/03 02:59:34 [Info] [3469985157] proxy/dns: handling DNS traffic to udp:127.0.0.1:15356
2023/09/03 02:59:34 [Info] [2808188123] app/dispatcher: taking detour [dns-out] for [udp:1.1.1.1:53]
2023/09/03 02:59:34 [Info] [2808188123] proxy/dns: handling DNS traffic to udp:127.0.0.1:15356
2023/09/03 02:59:34 [Info] app/dns: UDP:127.0.0.1:15355 got answer: pdcweb.micloud.xiaomi.net. TypeA -> [124.251.101.78] 2.774908ms
2023/09/03 02:59:34 [Info] app/dns: UDP:127.0.0.1:15355 got answer: pdcweb.micloud.xiaomi.net. TypeAAAA -> [] 2.808304ms
2023/09/03 02:59:34 [Info] app/dns: failed to lookup ip for domain pdcweb.micloud.xiaomi.net at server UDP:127.0.0.1:15355 > empty response
2023/09/03 02:59:36 [Info] [1010648084] app/dispatcher: taking detour [direct] for [udp:58.240.55.37:7080]
2023/09/03 02:59:36 [Info] [1010648084] proxy/freedom: connection opened to udp:58.240.55.37:7080, local endpoint [::]:49948, remote endpoint 58.240.55.37:7080
2023/09/03 02:59:36 [Info] [4288736814] proxy/dokodemo: received request for [2408:823c:c13:388:d1a1:f1ee:f4dd:dc5c]:60264
2023/09/03 02:59:36 [Info] [4288736814] app/dispatcher: sniffed domain: safebrowsing.google.com
2023/09/03 02:59:36 [Info] [4288736814] app/dispatcher: taking detour [Proxy] for [udp:safebrowsing.google.com:443]
2023/09/03 02:59:36 [Info] [4288736814] transport/internet/tcp: dialing TCP to tcp:18.139.9.22:8443
2023/09/03 02:59:36 [2408:823c:c13:388:d1a1:f1ee:f4dd:dc5c]:60264 accepted udp:[2404:6800:4003:c04::5d]:443 [udp_redir -> Proxy]
2023/09/03 02:59:36 [Info] [4288736814] proxy/vless/outbound: tunneling request to udp:safebrowsing.google.com:443 via 18.139.9.22:8443
2023/09/03 02:59:36 [Info] [4288736814] app/proxyman/outbound: failed to process outbound traffic > proxy/vless/outbound: XTLS rejected UDP/443 traffic
2023/09/03 02:59:36 [Info] [4288736814] app/proxyman/inbound: connection ends > proxy/dokodemo: connection ends > proxy/dokodemo: failed to transport response > io: read/write on closed pipe
2023/09/03 02:59:36 [Info] [1060893022] proxy/dokodemo: received request for [2408:823c:c13:388:d1a1:f1ee:f4dd:dc5c]:60264
2023/09/03 02:59:36 [Info] [1060893022] app/dispatcher: taking detour [blackhole] for [udp:[2404:6800:4003:c04::5d]:443]
2023/09/03 02:59:36 [Info] [1060893022] app/proxyman/inbound: connection ends > proxy/dokodemo: connection ends > proxy/dokodemo: failed to transport response > io: read/write on closed pipe
2023/09/03 02:59:36 [2408:823c:c13:388:d1a1:f1ee:f4dd:dc5c]:60264 accepted udp:[2404:6800:4003:c04::5d]:443 [udp_redir -> blackhole]
2023/09/03 02:59:37 [Info] [2961126726] proxy/dokodemo: received request for [2408:823c:c13:388:d1a1:f1ee:f4dd:dc5c]:60264
2023/09/03 02:59:37 [Info] [2961126726] app/dispatcher: taking detour [blackhole] for [udp:[2404:6800:4003:c04::5d]:443]
2023/09/03 02:59:37 [2408:823c:c13:388:d1a1:f1ee:f4dd:dc5c]:60264 accepted udp:[2404:6800:4003:c04::5d]:443 [udp_redir -> blackhole]
2023/09/03 02:59:37 [Info] [2961126726] app/proxyman/inbound: connection ends > proxy/dokodemo: connection ends > proxy/dokodemo: failed to transport response > io: read/write on closed pipe
2023/09/03 02:59:37 [Info] [3504163220] app/proxyman/inbound: connection ends > proxy/dokodemo: connection ends > context canceled
2023/09/03 02:59:37 [Info] [3504163220] proxy/freedom: dialing to tcp:[2408:823c:c13:388::21f]:80
2023/09/03 02:59:37 [Info] [3504163220] transport/internet/tcp: dialing TCP to tcp:[2408:823c:c13:388::21f]:80
2023/09/03 02:59:37 [Info] [3504163220] proxy/freedom: dialing to tcp:[2408:823c:c13:388::21f]:80
2023/09/03 02:59:37 [Info] [3504163220] transport/internet/tcp: dialing TCP to tcp:[2408:823c:c13:388::21f]:80
2023/09/03 02:59:37 [Info] [3504163220] proxy/freedom: dialing to tcp:[2408:823c:c13:388::21f]:80
2023/09/03 02:59:37 [Info] [3504163220] transport/internet/tcp: dialing TCP to tcp:[2408:823c:c13:388::21f]:80
2023/09/03 02:59:37 [Info] [4052601817] proxy/dokodemo: received request for [2408:823c:c13:68c::100]:51413
2023/09/03 02:59:37 [Info] [4052601817] app/dispatcher: taking detour [direct] for [udp:[2a01:4f9:1a:9da7::2]:6881]
2023/09/03 02:59:37 [2408:823c:c13:68c::100]:51413 accepted udp:[2a01:4f9:1a:9da7::2]:6881 [udp_redir -> direct]
2023/09/03 02:59:37 [Info] [4052601817] proxy/freedom: connection opened to udp:[2a01:4f9:1a:9da7::2]:6881, local endpoint [::]:45884, remote endpoint [2a01:4f9:1a:9da7::2]:6881
2023/09/03 02:59:38 [Info] [562065084] proxy/dokodemo: received request for [2408:823c:c13:388:d1a1:f1ee:f4dd:dc5c]:60264
2023/09/03 02:59:38 [Info] [562065084] app/dispatcher: taking detour [blackhole] for [udp:[2404:6800:4003:c04::5d]:443]
2023/09/03 02:59:38 [2408:823c:c13:388:d1a1:f1ee:f4dd:dc5c]:60264 accepted udp:[2404:6800:4003:c04::5d]:443 [udp_redir -> blackhole]
2023/09/03 02:59:38 [Info] [562065084] app/proxyman/inbound: connection ends > proxy/dokodemo: connection ends > proxy/dokodemo: failed to transport response > io: read/write on closed pipe
2023/09/03 02:59:40 [Info] [1723764790] proxy/dokodemo: received request for [2408:823c:c13:388:d1a1:f1ee:f4dd:dc5c]:60264
2023/09/03 02:59:40 [Info] [1723764790] app/dispatcher: taking detour [blackhole] for [udp:[2404:6800:4003:c04::5d]:443]
2023/09/03 02:59:40 [Info] [1723764790] app/proxyman/inbound: connection ends > proxy/dokodemo: connection ends > proxy/dokodemo: failed to transport response > io: read/write on closed pipe
2023/09/03 02:59:40 [2408:823c:c13:388:d1a1:f1ee:f4dd:dc5c]:60264 accepted udp:[2404:6800:4003:c04::5d]:443 [udp_redir -> blackhole]

截图

No response

系统相关信息

Passwall2:1.19-6 浏览器:Chrome 版本 116.0.5845.141(正式版本) (64 位)

其他信息

No response

snowie2000 commented 1 year ago

确实存在此bug,之前访问hoyolab时也遇到相同的问题。 两个域名指向同一个ip,一个域名直连一个域名代理,就会出现随机代理/直连的情况,passwall并不存在此问题。

swxk521 commented 1 year ago

确实存在此bug,之前访问hoyolab时也遇到相同的问题。 两个域名指向同一个ip,一个域名直连一个域名代理,就会出现随机代理/直连的情况,passwall并不存在此问题。

passwall同样存在这个问题,之前馒头 kp.m-team.cc和 tracker.m-team.cc配置一个直连,一个代理,同样出问题。

xiaorouji commented 10 months ago

passwall2會把直連DNS解析到的IP寫入到ipset,然後走直連(不經過內核)。或者以後考慮做個選項開關 但是預留了一個邏輯,FakeDNS優先級是最大的。 你可以把需要代理的域名解析成 198.18.0.1。 或者直接使用FakeDNS+自定義規則即可。