kkkgo / PaoPaoDNS

泡泡DNS是一个能一键部署递归DNS的docker镜像
https://blog.03k.org/post/paopaodns.html
GNU General Public License v3.0
832 stars 63 forks source link

[Help] test测试失败 发现 5301 拒绝连接 请问是为什么 #113

Closed zkl2333 closed 7 months ago

zkl2333 commented 7 months ago

在提交之前,请确认

脚本自检日志

/data # test.sh 
ping: bad address 'whoami.03k.org'
*********************************************************************************

images build time : 2024-03-17 02:18:17 UTC
check for the latest version ,
go to https://github.com/kkkgo/PaoPaoDNS/discussions 
-> test start `1711432944`

yyyyyCN-5301 failed:;; communications error to 127.0.0.1#5301: connection refused ;; communications error to 127.0.0.1#5301: connection refused ;; communications error to 127.0.0.1#5301: connection refused ; <<>> DiG 9.18.24 <<>> www.taobao.com @127.0.0.1 -p5301 A +short ;; global options: +cmd ;; no servers could be reachedyCN-5304 failed:;; communications error to 127.0.0.1#5304: connection refused ;; communications error to 127.0.0.1#5304: connection refused ;; communications error to 127.0.0.1#5304: connection refused ; <<>> DiG 9.18.24 <<>> www.taobao.com @127.0.0.1 -p5304 A +short ;; global options: +cmd ;; no servers could be reachedNOCN-53 failed:NOCN-5301 failed:;; communications error to 127.0.0.1#5301: connection refused ;; communications error to 127.0.0.1#5301: connection refused ;; communications error to 127.0.0.1#5301: connection refused ; <<>> DiG 9.18.24 <<>> www.google.com @127.0.0.1 -p5301 A +short ;; global options: +cmd ;; no servers could be reachedyNOCN-5304 failed:;; communications error to 127.0.0.1#5304: connection refused ;; communications error to 127.0.0.1#5304: connection refused ;; communications error to 127.0.0.1#5304: connection refused ; <<>> DiG 9.18.24 <<>> www.google.com @127.0.0.1 -p5304 A +short ;; global options: +cmd ;; no servers could be reached
[INFO] TEST FAIL.

-> test end `1711432948`

*********************************************************************************

/data # debug.sh 
ping: bad address 'whoami.03k.org'
### == debug.sh : docker exec -it paopaodns sh ==
-> debug start `1711432845`
```rust
[INFO] images build time : 2024-03-17 02:18:17 UTC
[OK]DATA_writeable
[OK]DATA_readable
[INFO] NETWORK
*********************************************************************************

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    inet 127.0.0.1/8 scope host lo
66: eth0@if67: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue state UP 
    inet 192.168.10.2/24 brd 192.168.10.255 scope global eth0
default via 192.168.10.1 dev eth0 
192.168.10.0/24 dev eth0 scope link  src 192.168.10.2 
PING 223.5.5.5 (223.5.5.5): 56 data bytes
64 bytes from 223.5.5.5: seq=0 ttl=118 time=2.234 ms

--- 223.5.5.5 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 2.234/2.234/2.234 ms
PING 119.29.29.29 (119.29.29.29): 56 data bytes
64 bytes from 119.29.29.29: seq=0 ttl=50 time=29.205 ms

--- 119.29.29.29 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 29.205/29.205/29.205 ms
Server:         223.5.5.5
Address:        223.5.5.5#53

Non-authoritative answer:
www.taobao.com  canonical name = www.taobao.com.danuoyi.tbcache.com.
Name:   www.taobao.com.danuoyi.tbcache.com
Address: 122.225.217.184
Name:   www.taobao.com.danuoyi.tbcache.com
Address: 122.225.217.183
Name:   www.taobao.com.danuoyi.tbcache.com
Address: 240e:f7:8013:409:3::3d2
Name:   www.taobao.com.danuoyi.tbcache.com
Address: 240e:f7:8013:409:3::3d3

Server:         119.29.29.29
Address:        119.29.29.29#53

Non-authoritative answer:
www.qq.com      canonical name = ins-r23tsuuf.ias.tencent-cloud.net.
Name:   ins-r23tsuuf.ias.tencent-cloud.net
Address: 101.91.22.57
Name:   ins-r23tsuuf.ias.tencent-cloud.net
Address: 101.91.42.232
Name:   ins-r23tsuuf.ias.tencent-cloud.net
Address: 240e:e1:a800:120::36
Name:   ins-r23tsuuf.ias.tencent-cloud.net
Address: 240e:e1:a800:120::76

*********************************************************************************

[INFO] ENV
*********************************************************************************

====ENV TEST====
[OK]DATA_writeable-
[OK]DATA_readable-
MEM:220m 450m 500000 750mb
prefPC:68
CORES:-2-
POWCORES:-2-
ulimit :-10240-
FDLIM :-2554-
TZ:-Asia/Shanghai-
UPDATE:-weekly-
DNS_SERVERNAME:-PaoPaoDNS-
SERVER_IP:-none-
ETHIP:-192.168.10.2-
DNSPORT:-53-
SOCKS5:-IP:PORT-
CNAUTO:-yes-
IPV6:-no-
CNFALL:-yes-
CUSTOM_FORWARD:-198.18.0.2:53-
AUTO_FORWARD:-yes-
AUTO_FORWARD_CHECK:-yes-
USE_MARK_DATA:-no-
RULES_TTL:-0-
CUSTOM_FORWARD_TTL:-0-
SHUFFLE:-no-
CN_TRACKER:-yes-
USE_HOSTS:-no-
HTTP_FILE:-no-
SAFEMODE:--
QUERY_TIME:-2000ms-
ADDINFO:-no-
PLATFORM:-Linux paopaodns 5.10.194 #0 SMP Mon Dec 13 10:43:05 2021 x86_64 Linux-
====ENV TEST====
mosdns kkkgo/mosdns:240317.1
*********************************************************************************

[INFO] PS
*********************************************************************************

PID   USER     TIME  COMMAND
    1 root      0:00 {init.sh} /bin/sh /usr/sbin/init.sh
   28 root      0:00 crond
   61 root      0:00 redis-server unixsocket:/tmp/redis.sock
  138 root      0:00 dnscrypt-proxy -config /data/dnscrypt-resolvers/dnscrypt.toml
  164 root      0:00 mosdns start -d /tmp -c /tmp/mosdns.yaml
  172 root      0:00 {watch_list.sh} /bin/sh /usr/sbin/watch_list.sh
  178 root      0:00 tail -f /dev/null
  208 root      0:00 inotifywait -e modify,delete /etc/unbound/named.cache /data/Country-only-cn-private.mmdb /data/force_cn_list.txt /data/force_nocn_list.txt /data/custom_env.ini /data/trackerslist.txt /data/f
  288 root      0:00 /bin/sh
  293 root      0:00 {debug.sh} /bin/sh /usr/sbin/debug.sh
  308 root      0:00 ps -ef
*********************************************************************************

[INFO] TOP
*********************************************************************************

CPU:   2% usr   0% sys   0% nic  97% idle   0% io   0% irq   0% sirq
  PID  PPID USER     STAT   VSZ %VSZ CPU %CPU COMMAND
  138     1 root     S    1210m  32%   2   0% dnscrypt-proxy -config /data/dnscr
  164     1 root     S    1210m  32%   0   0% mosdns start -d /tmp -c /tmp/mosdn
   61     1 root     S    22364   1%   1   0% redis-server unixsocket:/tmp/redis
  172     1 root     S     1704   0%   2   0% {watch_list.sh} /bin/sh /usr/sbin/
  288     0 root     S     1696   0%   3   0% /bin/sh
    1     0 root     S     1628   0%   2   0% {init.sh} /bin/sh /usr/sbin/init.s
  293   288 root     S     1624   0%   2   0% {debug.sh} /bin/sh /usr/sbin/debug
  309   293 root     R     1620   0%   2   0% top -n1
  178     1 root     S     1612   0%   2   0% tail -f /dev/null
  310   293 root     S     1608   0%   3   0% grep %
  208   172 root     S     1068   0%   3   0% inotifywait -e modify,delete /etc/
   28     1 root     S      856   0%   2   0% crond
*********************************************************************************

[INFO] REDIS
*********************************************************************************

used_memory_human:1009.77K
used_memory_rss_human:4.22M
used_memory_peak_human:1009.77K
total_system_memory_human:3.68G
used_memory_lua_human:31.00K
used_memory_vm_total_human:63.00K
used_memory_scripts_human:181B
maxmemory_human:750.00M
(integer) 0
*********************************************************************************

[TEST] IP ROUTE
*********************************************************************************

CN IP URL:
125.119.82.202
-
125.119.82.202
--
125.119.82.202
CN RAW-IP URL:
------------------
Non-CN IP URL:
125.119.82.202
-
125.119.82.202
--
125.119.82.202
Non-CN RAW-IP URL:
125.119.82.202
-
125.119.82.202
--
125.119.82.202
---
125.119.82.202
------------------
IP INFO:
125.119.82.202
CN,Hangzhou,Zhejiang
ASN4134/China Telecom
HTTP/1.1 
Mozilla/5.0 Gecko/20100101 Firefox/120.0 https://github.com/kkkgo/PaoPaoDNS
Asia/Shanghai Time: 3/26/2024, 2:01:00 PM
[INFO] force_cn_list
domain:whoami.ds.akahelp.net
domain:whoami.03k.org
MOSDNS WHOAMI :
akahelp: "ns" "2406:4300:bae:6b08::1"
03k: UNBOUND WHOAMI:
akahelp: ;; communications error to 127.0.0.1#5301: connection refused
;; communications error to 127.0.0.1#5301: connection refused
;; communications error to 127.0.0.1#5301: connection refused
;; no servers could be reached

03k: ;; communications error to 127.0.0.1#5301: connection refused
;; communications error to 127.0.0.1#5301: connection refused
;; communications error to 127.0.0.1#5301: connection refused
;; no servers could be reached

*********************************************************************************

[TEST] HIJACK
*********************************************************************************

;; communications error to 9.8.7.5#53: timed out
;; no servers could be reached

;; communications error to 9.8.7.6#53: timed out
;; no servers could be reached

HIJACK 127.0.0.1 = 58.217.249.177
*********************************************************************************

[TEST] DIG-CN [taobao]
*********************************************************************************

MOSDNS CN:
www.taobao.com.danuoyi.tbcache.com.
122.225.217.183
122.225.217.184
UNBOUND CN:
;; communications error to 127.0.0.1#5301: connection refused
;; communications error to 127.0.0.1#5301: connection refused
;; communications error to 127.0.0.1#5301: connection refused
;; no servers could be reached

[TEST] DIG-NOCN [youtube]
MOSDNS NOCN:
DNSCRYPT-UNBOUND NOCN:
;; communications error to 127.0.0.1#5304: connection refused
;; communications error to 127.0.0.1#5304: connection refused
;; communications error to 127.0.0.1#5304: connection refused
DNSCRYPT NOCN:
youtube-ui.l.google.com.
142.250.199.78
142.250.204.46
DNSCRYPT-SOCKS5 NOCN:
;; communications error to 127.0.0.1#5303: connection refused
;; no servers could be reached

*********************************************************************************

[TEST] DUAL CN [IPv6=YES will have aaaa,taobao]
*********************************************************************************

[TEST] DUAL NOCN [IPv6=YES will block aaaa,youtube]
[TEST] ONLY6 [IPv6=only6 will block aaaa if a ok]
checkipv6.synology.com : ip6.03k.org : 6.ipw.cn : 
*********************************************************************************

[info] ALL TEST FINISH.

-> debug end 1711432864



### 问题描述和复现步骤

我在爱快的docker部署了PaoPaoDNS,

/data # dig baidu.com 127.0.0.1 -p 5301
;; communications error to 127.0.0.1#5301: connection refused
;; communications error to 127.0.0.1#5301: connection refused
;; communications error to 127.0.0.1#5301: connection refused
;; communications error to 223.5.5.5#5301: timed out
;; communications error to 1.0.0.1#5301: timed out

; <<>> DiG 9.18.24 <<>> baidu.com 127.0.0.1 -p 5301
;; global options: +cmd
;; no servers could be reached

;; communications error to 127.0.0.1#5301: connection refused
;; communications error to 127.0.0.1#5301: connection refused
;; communications error to 127.0.0.1#5301: connection refused
;; communications error to 223.5.5.5#5301: timed out
;; communications error to 1.0.0.1#5301: timed out
;; no servers could be reached
kkkgo commented 7 months ago

unbound进程没有启动,你是否有修改过其他文件的配置? 建议使用docker pull拉取一下最新镜像,然后清空挂载的/data文件夹,使用默认的参数启动后再跑测试; 如果测试失败,进入容器内手动执行unbound -c /tmp/unbound_forward.conf -p -v -dunbound -c /tmp/unbound_raw.conf -p -v -d看看有什么报错;

zkl2333 commented 7 months ago
/data # unbound -c /tmp/unbound_raw.conf -p -v -d
[1711439571] unbound[560:0] notice: Start of unbound 1.19.4.
[1711439571] unbound[560:0] warning: setrlimit: Operation not permitted
[1711439571] unbound[560:0] warning: cannot increase max open fds from 10240 to 26634
[1711439571] unbound[560:0] fatal error: too much tcp. not enough fds.

爱快的docker权限不足?

kkkgo commented 7 months ago

可能需要更多信息🙂,尝试拉取一下sliamb/paopaodns:dev,运行后执行debug.sh; 然后把SAFEMODE设置为yes,看能否通过测试;

zkl2333 commented 7 months ago
/data # debug.sh
### == debug.sh : docker exec -it paopaodns sh ==
-> debug start `1711442825`
```rust
[INFO] images build time : 2024-03-26 08:31:48 UTC
[OK]DATA_writeable
[OK]DATA_readable
[INFO] NETWORK
*********************************************************************************

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    inet 127.0.0.1/8 scope host lo
75: eth0@if76: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue state UP 
    inet 192.168.10.2/24 brd 192.168.10.255 scope global eth0
default via 192.168.10.1 dev eth0 
192.168.10.0/24 dev eth0 scope link  src 192.168.10.2 
PING 223.5.5.5 (223.5.5.5): 56 data bytes
64 bytes from 223.5.5.5: seq=0 ttl=118 time=4.231 ms

--- 223.5.5.5 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 4.231/4.231/4.231 ms
PING 119.29.29.29 (119.29.29.29): 56 data bytes
64 bytes from 119.29.29.29: seq=0 ttl=50 time=7.908 ms

--- 119.29.29.29 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 7.908/7.908/7.908 ms
Server:         223.5.5.5
Address:        223.5.5.5#53

Non-authoritative answer:
www.taobao.com  canonical name = www.taobao.com.danuoyi.tbcache.com.
Name:   www.taobao.com.danuoyi.tbcache.com
Address: 122.225.217.184
Name:   www.taobao.com.danuoyi.tbcache.com
Address: 122.225.217.183
Name:   www.taobao.com.danuoyi.tbcache.com
Address: 240e:f7:8013:409:3::3d2
Name:   www.taobao.com.danuoyi.tbcache.com
Address: 240e:f7:8013:409:3::3d3

Server:         119.29.29.29
Address:        119.29.29.29#53

Non-authoritative answer:
www.qq.com      canonical name = ins-r23tsuuf.ias.tencent-cloud.net.
Name:   ins-r23tsuuf.ias.tencent-cloud.net
Address: 101.91.42.232
Name:   ins-r23tsuuf.ias.tencent-cloud.net
Address: 101.91.22.57
Name:   ins-r23tsuuf.ias.tencent-cloud.net
Address: 240e:e1:a800:120::36
Name:   ins-r23tsuuf.ias.tencent-cloud.net
Address: 240e:e1:a800:120::76

*********************************************************************************

[INFO] ENV
*********************************************************************************

====ENV TEST====
[OK]DATA_writeable-
[OK]DATA_readable-
MEM:100k 200k 200 16mb
prefPC:1
CORES:-1-
POWCORES:-1-
ulimit :-10240-
FDLIM :-1-
TZ:-Asia/Shanghai-
UPDATE:-weekly-
DNS_SERVERNAME:-PaoPaoDNS-
SERVER_IP:-none-
ETHIP:-192.168.10.2-
DNSPORT:-53-
SOCKS5:-IP:PORT-
CNAUTO:-yes-
IPV6:-no-
CNFALL:-yes-
CUSTOM_FORWARD:-192.168.31.198:53-
AUTO_FORWARD:-yes-
AUTO_FORWARD_CHECK:-yes-
USE_MARK_DATA:-no-
RULES_TTL:-0-
CUSTOM_FORWARD_TTL:-0-
SHUFFLE:-no-
CN_TRACKER:-yes-
USE_HOSTS:-no-
HTTP_FILE:-no-
SAFEMODE:-yes-
QUERY_TIME:-2000ms-
ADDINFO:-no-
PLATFORM:-Linux paopaodev 5.10.194 #0 SMP Mon Dec 13 10:43:05 2021 x86_64 Linux-
====ENV TEST====
mosdns kkkgo/mosdns:240322.2
total 352K   
   4.0K drwxrwxrwx    3 0        0           4.0K Mar 26 16:46 .
   4.0K drwxr-xr-x    1 0        0           4.0K Mar 26 16:46 ..
 228.0K -rw-r--r--    1 0        0         225.6K Mar 26 16:46 Country-only-cn-private.mmdb
   4.0K -rwxrwxrwx    1 0        0            108 Mar 26 16:45 custom_env.ini
   4.0K -rw-r--r--    1 0        0            416 Mar 26 16:46 custom_mod.yaml
   4.0K drwxr-xr-x    2 0        0           4.0K Mar 26 16:46 dnscrypt-resolvers
   4.0K -rw-r--r--    1 0        0           3.0K Mar 26 16:46 dnscrypt.toml
   4.0K -rw-r--r--    1 0        0            328 Mar 26 16:46 force_cn_list.txt
   4.0K -rw-r--r--    1 0        0            311 Mar 26 16:46 force_forward_list.txt
   4.0K -rw-r--r--    1 0        0            386 Mar 26 16:46 force_nocn_list.txt
  12.0K -rw-r--r--    1 0        0           9.7K Mar 26 16:46 mosdns.yaml
   8.0K -rw-r--r--    1 0        0           5.7K Mar 26 16:46 redis.conf
  12.0K -rw-r--r--    1 0        0          11.6K Mar 26 16:46 trackerslist.txt
  52.0K -rw-r--r--    1 0        0          50.4K Mar 26 16:46 unbound.conf
   4.0K -rw-r--r--    1 0        0            289 Mar 26 16:46 unbound_custom.conf
*********************************************************************************

[INFO] PS
*********************************************************************************

PID   USER     TIME  COMMAND
    1 root      0:00 {init.sh} /bin/sh /usr/sbin/init.sh
   44 root      0:00 crond
   77 root      0:00 redis-server unixsocket:/tmp/redis.sock
  176 root      0:00 dnscrypt-proxy -config /data/dnscrypt-resolvers/dnscrypt.toml
  201 root      0:00 unbound -c /tmp/unbound_forward.conf -p
  202 root      0:00 mosdns start -d /tmp -c /tmp/mosdns.yaml
  215 root      0:00 {watch_list.sh} /bin/sh /usr/sbin/watch_list.sh
  216 root      0:00 {data_update.sh} /bin/sh /usr/sbin/data_update.sh
  220 root      0:00 tail -f /dev/null
  227 root      0:00 sleep 174
  230 root      0:00 unbound -c /tmp/unbound_raw.conf -p
  249 root      0:00 inotifywait -e modify,delete /etc/unbound/named.cache /data/Country-only-cn-private.mmdb /data/force_cn_list.txt /data/force_nocn_list.txt /data/custom_env.ini /data/trackerslist.txt /data/f
  250 root      0:00 /bin/sh
  255 root      0:00 {debug.sh} /bin/sh /usr/sbin/debug.sh
  271 root      0:00 ps -ef
  230 root      0:00 unbound -c /tmp/unbound_raw.conf -p
unbound OK.
*********************************************************************************

[INFO] TOP
*********************************************************************************

CPU:   0% usr   2% sys   0% nic  97% idle   0% io   0% irq   0% sirq
  PID  PPID USER     STAT   VSZ %VSZ CPU %CPU COMMAND
  176     1 root     S    1210m  32%   2   0% dnscrypt-proxy -config /data/dnscr
  202     1 root     S    1209m  32%   2   0% mosdns start -d /tmp -c /tmp/mosdn
   77     1 root     S    22436   1%   3   0% redis-server unixsocket:/tmp/redis
  201     1 root     S    11656   0%   0   0% unbound -c /tmp/unbound_forward.co
  230     1 root     S    11472   0%   0   0% unbound -c /tmp/unbound_raw.conf -
  215     1 root     S     1704   0%   1   0% {watch_list.sh} /bin/sh /usr/sbin/
  250     0 root     S     1692   0%   2   0% /bin/sh
  216     1 root     S     1632   0%   2   0% {data_update.sh} /bin/sh /usr/sbin
    1     0 root     S     1628   0%   3   0% {init.sh} /bin/sh /usr/sbin/init.s
  255   250 root     S     1624   0%   1   0% {debug.sh} /bin/sh /usr/sbin/debug
  275   255 root     R     1620   0%   0   0% top -n1
  220     1 root     S     1612   0%   3   0% tail -f /dev/null
  227   216 root     S     1608   0%   2   0% sleep 174
  276   255 root     S     1608   0%   2   0% grep %
  249   215 root     S     1068   0%   3   0% inotifywait -e modify,delete /etc/
   44     1 root     S      856   0%   1   0% crond
*********************************************************************************

[INFO] REDIS
*********************************************************************************

used_memory_human:924.62K
used_memory_rss_human:4.11M
used_memory_peak_human:924.62K
total_system_memory_human:3.68G
used_memory_lua_human:31.00K
used_memory_vm_total_human:63.00K
used_memory_scripts_human:181B
maxmemory_human:16.00M
(integer) 0
*********************************************************************************

[TEST] IP ROUTE
*********************************************************************************

CN IP URL:
115.192.36.60
-
115.192.36.60
--
115.192.36.60
CN RAW-IP URL:
------------------
Non-CN IP URL:
-
--
Non-CN RAW-IP URL:
115.192.36.60
-
115.192.36.60
--
115.192.36.60
---
115.192.36.60
------------------
IP INFO:
115.192.36.60
CN,Hangzhou,Zhejiang
ASN4134/China Telecom
HTTP/1.1 
Mozilla/5.0 Gecko/20100101 Firefox/120.0 https://github.com/kkkgo/PaoPaoDNS
Asia/Shanghai Time: 3/26/2024, 4:47:20 PM
[INFO] force_cn_list
domain:whoami.ds.akahelp.net
domain:whoami.03k.org
MOSDNS WHOAMI :
akahelp: "ns" "115.192.36.60"
03k: 115.192.36.60
UNBOUND WHOAMI:
akahelp: "ns" "115.192.36.60"
03k: 115.192.36.60
*********************************************************************************

[TEST] HIJACK
*********************************************************************************

;; communications error to 9.8.7.5#53: timed out
;; no servers could be reached

;; communications error to 9.8.7.6#53: timed out
;; no servers could be reached

HIJACK 127.0.0.1 = 58.217.249.177
*********************************************************************************

[TEST] DIG-CN [taobao]
*********************************************************************************

MOSDNS CN:
www.taobao.com.danuoyi.tbcache.com.
122.225.217.183
122.225.217.184
UNBOUND CN:
[TEST] DIG-NOCN [youtube]
MOSDNS NOCN:
198.18.1.43
DNSCRYPT-UNBOUND NOCN:
youtube-ui.l.google.com.
142.251.220.110
216.58.200.238
DNSCRYPT NOCN:
youtube-ui.l.google.com.
142.251.130.14
142.251.220.78
DNSCRYPT-SOCKS5 NOCN:
;; communications error to 127.0.0.1#5303: connection refused
;; no servers could be reached

*********************************************************************************

[TEST] DUAL CN [IPv6=YES will have aaaa,taobao]
*********************************************************************************

[TEST] DUAL NOCN [IPv6=YES will block aaaa,youtube]
[TEST] ONLY6 [IPv6=only6 will block aaaa if a ok]
checkipv6.synology.com : ip6.03k.org : 6.ipw.cn : 
*********************************************************************************

[info] ALL TEST FINISH.

-> debug end 1711442844 /data # test.sh


images build time : 2024-03-26 08:31:48 UTC check for the latest version , go to https://github.com/kkkgo/PaoPaoDNS/discussions -> test start 1711442857

yyyyyCN-5301 failed:yyyNOCN-5301 failed:yy
[INFO] TEST FAIL.

-> test end 1711442865


kkkgo commented 7 months ago

需要SAFEMODEno的`debug.sh测试;

zkl2333 commented 7 months ago
/data # debug.sh
ping: bad address 'whoami.03k.org'
### == debug.sh : docker exec -it paopaodns sh ==
-> debug start `1711443868`
```rust
[INFO] images build time : 2024-03-26 08:31:48 UTC
[OK]DATA_writeable
[OK]DATA_readable
[INFO] NETWORK
*********************************************************************************

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    inet 127.0.0.1/8 scope host lo
77: eth0@if78: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue state UP 
    inet 192.168.10.2/24 brd 192.168.10.255 scope global eth0
default via 192.168.10.1 dev eth0 
192.168.10.0/24 dev eth0 scope link  src 192.168.10.2 
PING 223.5.5.5 (223.5.5.5): 56 data bytes
64 bytes from 223.5.5.5: seq=0 ttl=118 time=4.272 ms

--- 223.5.5.5 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 4.272/4.272/4.272 ms
PING 119.29.29.29 (119.29.29.29): 56 data bytes
64 bytes from 119.29.29.29: seq=0 ttl=50 time=8.185 ms

--- 119.29.29.29 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 8.185/8.185/8.185 ms
Server:         223.5.5.5
Address:        223.5.5.5#53

Non-authoritative answer:
www.taobao.com  canonical name = www.taobao.com.danuoyi.tbcache.com.
Name:   www.taobao.com.danuoyi.tbcache.com
Address: 122.225.217.183
Name:   www.taobao.com.danuoyi.tbcache.com
Address: 122.225.217.184
Name:   www.taobao.com.danuoyi.tbcache.com
Address: 240e:f7:8013:409:3::3d3
Name:   www.taobao.com.danuoyi.tbcache.com
Address: 240e:f7:8013:409:3::3d2

Server:         119.29.29.29
Address:        119.29.29.29#53

Non-authoritative answer:
www.qq.com      canonical name = ins-r23tsuuf.ias.tencent-cloud.net.
Name:   ins-r23tsuuf.ias.tencent-cloud.net
Address: 101.91.42.232
Name:   ins-r23tsuuf.ias.tencent-cloud.net
Address: 101.91.22.57
Name:   ins-r23tsuuf.ias.tencent-cloud.net
Address: 240e:e1:a800:120::76
Name:   ins-r23tsuuf.ias.tencent-cloud.net
Address: 240e:e1:a800:120::36

*********************************************************************************

[INFO] ENV
*********************************************************************************

====ENV TEST====
[OK]DATA_writeable-
[OK]DATA_readable-
MEM:220m 450m 500000 750mb
prefPC:68
CORES:-2-
POWCORES:-2-
ulimit :-10240-
FDLIM :-2554-
TZ:-Asia/Shanghai-
UPDATE:-weekly-
DNS_SERVERNAME:-PaoPaoDNS-
SERVER_IP:-none-
ETHIP:-192.168.10.2-
DNSPORT:-53-
SOCKS5:-IP:PORT-
CNAUTO:-yes-
IPV6:-no-
CNFALL:-yes-
CUSTOM_FORWARD:-192.168.31.198:53-
AUTO_FORWARD:-yes-
AUTO_FORWARD_CHECK:-yes-
USE_MARK_DATA:-no-
RULES_TTL:-0-
CUSTOM_FORWARD_TTL:-0-
SHUFFLE:-no-
CN_TRACKER:-yes-
USE_HOSTS:-no-
HTTP_FILE:-no-
SAFEMODE:-no-
QUERY_TIME:-2000ms-
ADDINFO:-no-
PLATFORM:-Linux paopaodev 5.10.194 #0 SMP Mon Dec 13 10:43:05 2021 x86_64 Linux-
====ENV TEST====
mosdns kkkgo/mosdns:240322.2
total 352K   
   4.0K drwxrwxrwx    3 0        0           4.0K Mar 26 17:03 .
   4.0K drwxr-xr-x    1 0        0           4.0K Mar 26 16:46 ..
 228.0K -rwxrwxrwx    1 0        0         225.6K Mar 26 16:46 Country-only-cn-private.mmdb
   4.0K -rwxrwxrwx    1 0        0            107 Mar 26 17:03 custom_env.ini
   4.0K -rwxrwxrwx    1 0        0            416 Mar 26 17:04 custom_mod.yaml
   4.0K drwxrwxrwx    2 0        0           4.0K Mar 26 17:04 dnscrypt-resolvers
   4.0K -rwxrwxrwx    1 0        0           3.0K Mar 26 16:46 dnscrypt.toml
   4.0K -rwxrwxrwx    1 0        0            328 Mar 26 16:46 force_cn_list.txt
   4.0K -rwxrwxrwx    1 0        0            311 Mar 26 16:46 force_forward_list.txt
   4.0K -rwxrwxrwx    1 0        0            386 Mar 26 16:46 force_nocn_list.txt
  12.0K -rwxrwxrwx    1 0        0           9.7K Mar 26 16:46 mosdns.yaml
   8.0K -rwxrwxrwx    1 0        0           5.7K Mar 26 16:46 redis.conf
  12.0K -rwxrwxrwx    1 0        0          11.6K Mar 26 16:46 trackerslist.txt
  52.0K -rwxrwxrwx    1 0        0          50.4K Mar 26 16:46 unbound.conf
   4.0K -rwxrwxrwx    1 0        0            289 Mar 26 16:46 unbound_custom.conf
*********************************************************************************

[INFO] PS
*********************************************************************************

PID   USER     TIME  COMMAND
    1 root      0:00 {init.sh} /bin/sh /usr/sbin/init.sh
   32 root      0:00 crond
   65 root      0:00 redis-server unixsocket:/tmp/redis.sock
  142 root      0:00 dnscrypt-proxy -config /data/dnscrypt-resolvers/dnscrypt.toml
  167 root      0:00 mosdns start -d /tmp -c /tmp/mosdns.yaml
  172 root      0:00 unbound -c /tmp/unbound_forward.conf -p
  178 root      0:00 {watch_list.sh} /bin/sh /usr/sbin/watch_list.sh
  179 root      0:00 {data_update.sh} /bin/sh /usr/sbin/data_update.sh
  181 root      0:00 sleep 286
  185 root      0:00 tail -f /dev/null
  211 root      0:00 inotifywait -e modify,delete /etc/unbound/named.cache /data/Country-only-cn-private.mmdb /data/force_cn_list.txt /data/force_nocn_list.txt /data/custom_env.ini /data/trackerslist.txt /data/f
  213 root      0:00 /bin/sh
  218 root      0:00 {debug.sh} /bin/sh /usr/sbin/debug.sh
  235 root      0:00 ps -ef
Try to run unbound...
        num-threads: 2
        outgoing-range: 8192
#lowrmem        outgoing-range: 60
                        outgoing-num-tcp: 2554
                        incoming-num-tcp: 2554
[1711443868] unbound[239:0] notice: Start of unbound 1.19.4.
        msg-cache-size: 220m
        msg-cache-slabs: 2
        num-queries-per-thread: 4096
#lowrmem num-queries-per-thread: 30
        rrset-cache-size: 450m
        rrset-cache-slabs: 2
[1711443868] unbound[239:0] warning: setrlimit: Operation not permitted
[1711443868] unbound[239:0] warning: cannot increase max open fds from 10240 to 26634
[1711443868] unbound[239:0] fatal error: too much tcp. not enough fds.
RealCore:4
ulimit:10240
*********************************************************************************

[INFO] TOP
*********************************************************************************

CPU:   0% usr   0% sys   0% nic 100% idle   0% io   0% irq   0% sirq
  PID  PPID USER     STAT   VSZ %VSZ CPU %CPU COMMAND
  142     1 root     S    1210m  32%   3   0% dnscrypt-proxy -config /data/dnscr
  167     1 root     S    1209m  32%   1   0% mosdns start -d /tmp -c /tmp/mosdn
   65     1 root     S    22384   1%   2   0% redis-server unixsocket:/tmp/redis
  172     1 root     S    20600   1%   0   0% unbound -c /tmp/unbound_forward.co
  178     1 root     S     1704   0%   2   0% {watch_list.sh} /bin/sh /usr/sbin/
  213     0 root     S     1692   0%   2   0% /bin/sh
  179     1 root     S     1632   0%   2   0% {data_update.sh} /bin/sh /usr/sbin
    1     0 root     S     1628   0%   2   0% {init.sh} /bin/sh /usr/sbin/init.s
  218   213 root     S     1624   0%   2   0% {debug.sh} /bin/sh /usr/sbin/debug
  243   218 root     R     1620   0%   3   0% top -n1
  185     1 root     S     1612   0%   1   0% tail -f /dev/null
  181   179 root     S     1608   0%   2   0% sleep 286
  244   218 root     S     1608   0%   1   0% grep %
  211   178 root     S     1068   0%   1   0% inotifywait -e modify,delete /etc/
   32     1 root     S      852   0%   2   0% crond
*********************************************************************************

[INFO] REDIS
*********************************************************************************

used_memory_human:882.33K
used_memory_rss_human:4.06M
used_memory_peak_human:882.33K
total_system_memory_human:3.68G
used_memory_lua_human:31.00K
used_memory_vm_total_human:63.00K
used_memory_scripts_human:181B
maxmemory_human:750.00M
(integer) 0
*********************************************************************************

[TEST] IP ROUTE
*********************************************************************************

CN IP URL:
115.192.36.60
-
115.192.36.60
--
115.192.36.60
CN RAW-IP URL:
------------------
Non-CN IP URL:
-
--
Non-CN RAW-IP URL:
115.192.36.60
-
115.192.36.60
--
115.192.36.60
---
115.192.36.60
------------------
IP INFO:
115.192.36.60
CN,Hangzhou,Zhejiang
ASN4134/China Telecom
HTTP/1.1 
Mozilla/5.0 Gecko/20100101 Firefox/120.0 https://github.com/kkkgo/PaoPaoDNS
Asia/Shanghai Time: 3/26/2024, 5:04:44 PM
[INFO] force_cn_list
domain:whoami.ds.akahelp.net
domain:whoami.03k.org
MOSDNS WHOAMI :
akahelp: "ns" "45.123.188.129"
03k: UNBOUND WHOAMI:
akahelp: ;; communications error to 127.0.0.1#5301: connection refused
;; communications error to 127.0.0.1#5301: connection refused
;; communications error to 127.0.0.1#5301: connection refused
;; no servers could be reached

03k: ;; communications error to 127.0.0.1#5301: connection refused
;; communications error to 127.0.0.1#5301: connection refused
;; communications error to 127.0.0.1#5301: connection refused
;; no servers could be reached

*********************************************************************************

[TEST] HIJACK
*********************************************************************************

;; communications error to 9.8.7.5#53: timed out
;; no servers could be reached

;; communications error to 9.8.7.6#53: timed out
;; no servers could be reached

HIJACK 127.0.0.1 = 58.217.249.177
*********************************************************************************

[TEST] DIG-CN [taobao]
*********************************************************************************

MOSDNS CN:
www.taobao.com.danuoyi.tbcache.com.
122.225.217.184
122.225.217.183
UNBOUND CN:
;; communications error to 127.0.0.1#5301: connection refused
;; communications error to 127.0.0.1#5301: connection refused
;; communications error to 127.0.0.1#5301: connection refused
;; no servers could be reached

[TEST] DIG-NOCN [youtube]
MOSDNS NOCN:
198.18.1.43
DNSCRYPT-UNBOUND NOCN:
youtube-ui.l.google.com.
172.217.24.78
216.58.200.238
DNSCRYPT NOCN:
;; communications error to 127.0.0.1#5302: timed out
youtube-ui.l.google.com.
216.58.203.78
DNSCRYPT-SOCKS5 NOCN:
;; communications error to 127.0.0.1#5303: connection refused
;; no servers could be reached

*********************************************************************************

[TEST] DUAL CN [IPv6=YES will have aaaa,taobao]
*********************************************************************************

[TEST] DUAL NOCN [IPv6=YES will block aaaa,youtube]
[TEST] ONLY6 [IPv6=only6 will block aaaa if a ok]
checkipv6.synology.com : ip6.03k.org : 6.ipw.cn : 
*********************************************************************************

[info] ALL TEST FINISH.

-> debug end 1711443891

kkkgo commented 7 months ago

试试sliamb/paopaodns:dev2能否通过测试,如果不能跑一下debug.sh

zkl2333 commented 7 months ago

ALL TEST PASS 🎉🎉🎉

kkkgo commented 7 months ago

已经推送到sliamb/paopaodns:latest