henices / Tcp-DNS-proxy

A TCP dns proxy which can get the RIGHT ip address
815 stars 192 forks source link

DNS Servers: [u'112.100.100.100:53', #42

Closed bmtwdjxiang closed 1 month ago

bmtwdjxiang commented 1 month ago

C:\Users\185\Desktop\Tcp-DNS-proxy-1.5\win>tcpdns.exe -f dns.json [2024-09-19 11:13:50,384][INFO] TCP DNS Proxy, https://github.com/henices/Tcp-DNS-proxy [2024-09-19 11:13:50,384][INFO] DNS Servers: [u'112.100.100.100:53', u'8.8.4.4:53', u'156.154.70.1:53', u'114.114.114.114:53', u'208.67.222.222:53', u'223.5.5.5:53', u'209.244.0.3:53'] [2024-09-19 11:13:50,400][INFO] Query Timeout: 20.000000 [2024-09-19 11:13:50,400][INFO] Enable Cache: True [2024-09-19 11:13:50,401][INFO] Enable Switch: True [2024-09-19 11:13:50,401][INFO] Testing dns server speed ... [2024-09-19 11:13:51,444][ERROR] 208.67.222.222:53, [Errno 10054] [2024-09-19 11:13:51,697][ERROR] 209.244.0.3:53, [Errno 10054] [2024-09-19 11:13:52,684][ERROR] 208.67.222.222:53, [Errno 10054] [2024-09-19 11:13:52,933][ERROR] 209.244.0.3:53, [Errno 10054] [2024-09-19 11:13:53,229][ERROR] 8.8.4.4:53, [Errno 10054] [2024-09-19 11:13:53,648][ERROR] 208.67.222.222:53, [Errno 10054] [2024-09-19 11:13:53,927][ERROR] 209.244.0.3:53, [Errno 10054] [2024-09-19 11:13:54,217][ERROR] 8.8.4.4:53, [Errno 10054] [2024-09-19 11:13:54,628][ERROR] 208.67.222.222:53, [Errno 10054] [2024-09-19 11:13:54,891][ERROR] 209.244.0.3:53, [Errno 10054] [2024-09-19 11:13:55,187][ERROR] 8.8.4.4:53, [Errno 10054] [2024-09-19 11:13:55,594][ERROR] 208.67.222.222:53, [Errno 10054] [2024-09-19 11:13:55,842][ERROR] 209.244.0.3:53, [Errno 10054] [2024-09-19 11:13:56,165][ERROR] 8.8.4.4:53, [Errno 10054] [2024-09-19 11:13:56,584][ERROR] 208.67.222.222:53, [Errno 10054] [2024-09-19 11:13:56,838][ERROR] 209.244.0.3:53, [Errno 10054] [2024-09-19 11:13:56,838][INFO] Now you can set dns server to 0.0.0.0:53

henices commented 1 month ago

I haven't tested tcpdns.exe on Windows 10 or 11.

Errno 10054, may cause by windows firewall.

bmtwdjxiang commented 1 month ago

Test works but can't set up

henices commented 1 month ago

Test works but can't set up

Would you please show me the debug error messages and dns.json.

BTW, we should set the dns server to 0.0.0.0 , and then tcpdns.exe can proxy the dns traffic.

bmtwdjxiang commented 1 month ago

{ "socket_timeout": 20, "host": "0.0.0.0", "port": 53, "tcp_dns_server": ["112.100.100.100:53", "8.8.4.4:53", "156.154.70.1:53", "114.114.114.114:53", "208.67.222.222:53", "223.5.5.5:53", "209.244.0.3:53"], "udp_dns_server": ["208.67.222.222:5353"], "enable_server_switch": true, "speed_test": true, "enable_lru_cache": true, "lru_cache_size" : 500, "udp_mode" : false, "daemon_process" : false, "internal_dns_server": ["192.168.0.250:5225"], "internal_domain": ["intra"], "private_host" : {"*google.com": "203.117.34.162"} }

bmtwdjxiang commented 1 month ago

image

henices commented 1 month ago

use OpenDNS server tcp 5353

    "tcp_dns_server": [
                       "208.67.222.222:5353",
                       "208.67.220.220:5353"],

run tcpdns.exe -f dns.json -d to see debug messages

bmtwdjxiang commented 1 month ago
C:\Tcp-DNS-proxy-1.5\win>tcpdns.exe -f dns.json -d
[2024-09-20 12:27:22,542][INFO] TCP DNS Proxy, https://github.com/henices/Tcp-DNS-proxy
[2024-09-20 12:27:22,542][INFO] DNS Servers:
[u'208.67.222.222:5353', u'208.67.220.220:5353']
[2024-09-20 12:27:22,542][INFO] Query Timeout: 20.000000
[2024-09-20 12:27:22,542][INFO] Enable Cache: True
[2024-09-20 12:27:22,542][INFO] Enable Switch: True
[2024-09-20 12:27:22,542][INFO] Testing dns server speed ...
[2024-09-20 12:27:32,516][INFO] Now you can set dns server to 0.0.0.0:53
[2024-09-20 12:27:36,650][DEBUG] domain:cn.bing.com, qtype:1c
[2024-09-20 12:27:36,650][DEBUG] domain:cn.bing.com, qtype:1
[2024-09-20 12:27:36,650][DEBUG] domain:cn.bing.com, qtype:41
[2024-09-20 12:27:44,255][DEBUG] domain:bing.com, qtype:1c
[2024-09-20 12:27:44,273][DEBUG] domain:bing.com, qtype:1
[2024-09-20 12:27:44,312][DEBUG] domain:bing.com, qtype:41
[2024-09-20 12:27:44,312][DEBUG] domain:bing.com, qtype:1c
[2024-09-20 12:27:44,312][DEBUG] domain:bing.com, qtype:1
[2024-09-20 12:27:44,312][DEBUG] domain:browser.events.data.msn.cn, qtype:1c
[2024-09-20 12:27:44,313][DEBUG] domain:browser.events.data.msn.cn, qtype:1
[2024-09-20 12:27:44,313][DEBUG] domain:browser.events.data.msn.cn, qtype:41
[2024-09-20 12:27:44,838][DEBUG] domain:cn.bing.com, qtype:1c
[2024-09-20 12:27:44,838][DEBUG] domain:cn.bing.com, qtype:1
[2024-09-20 12:27:45,063][DEBUG] domain:s.cn.bing.net, qtype:1c
[2024-09-20 12:27:45,078][DEBUG] domain:s.cn.bing.net, qtype:1
[2024-09-20 12:27:45,361][DEBUG] domain:s.cn.bing.net, qtype:41
[2024-09-20 12:27:45,368][DEBUG] domain:r.bing.com, qtype:1c
[2024-09-20 12:27:45,368][DEBUG] domain:r.bing.com, qtype:1
[2024-09-20 12:27:45,369][DEBUG] domain:r.bing.com, qtype:41
[2024-09-20 12:27:54,904][DEBUG] domain:assets.msn.cn, qtype:1c
[2024-09-20 12:27:54,953][DEBUG] domain:assets.msn.cn, qtype:1
[2024-09-20 12:27:54,957][DEBUG] domain:assets.msn.cn, qtype:41
[2024-09-20 12:27:55,203][DEBUG] domain:login.microsoftonline.com, qtype:1c
[2024-09-20 12:27:55,213][DEBUG] domain:login.microsoftonline.com, qtype:1
[2024-09-20 12:27:55,220][DEBUG] domain:login.microsoftonline.com, qtype:41
[2024-09-20 12:27:55,220][DEBUG] domain:login.microsoftonline.com, qtype:1c
[2024-09-20 12:27:55,220][DEBUG] domain:login.microsoftonline.com, qtype:1
[2024-09-20 12:27:55,220][DEBUG] domain:cn.bing.com, qtype:1c
[2024-09-20 12:27:55,223][DEBUG] domain:cn.bing.com, qtype:1
[2024-09-20 12:27:55,226][DEBUG] domain:login.live.com, qtype:1c
[2024-09-20 12:27:55,226][DEBUG] domain:login.live.com, qtype:1
[2024-09-20 12:27:55,226][DEBUG] domain:login.live.com, qtype:41
[2024-09-20 12:27:55,227][DEBUG] domain:login.live.com, qtype:1c
[2024-09-20 12:27:55,227][DEBUG] domain:login.live.com, qtype:1
[2024-09-20 12:27:55,229][DEBUG] domain:cn.bing.com, qtype:1c
[2024-09-20 12:27:55,229][DEBUG] domain:cn.bing.com, qtype:1
[2024-09-20 12:27:55,230][DEBUG] domain:www2.bing.com, qtype:1c
[2024-09-20 12:27:55,230][DEBUG] domain:www2.bing.com, qtype:1
[2024-09-20 12:27:55,230][DEBUG] domain:www2.bing.com, qtype:41
[2024-09-20 12:27:55,878][DEBUG] domain:ecs.office.com, qtype:1
[2024-09-20 12:27:55,878][DEBUG] domain:ecs.office.com, qtype:1c
[2024-09-20 12:27:56,453][DEBUG] domain:cn.bing.com, qtype:1c
[2024-09-20 12:27:56,454][DEBUG] domain:cn.bing.com, qtype:1
[2024-09-20 12:27:56,457][DEBUG] domain:login.microsoftonline.com, qtype:1c
[2024-09-20 12:27:56,459][DEBUG] domain:login.microsoftonline.com, qtype:1
[2024-09-20 12:27:56,596][DEBUG] domain:cn.bing.com, qtype:1c
[2024-09-20 12:27:56,598][DEBUG] domain:cn.bing.com, qtype:1
[2024-09-20 12:28:02,513][DEBUG] domain:edge.microsoft.com, qtype:1c
[2024-09-20 12:28:02,513][DEBUG] domain:edge.microsoft.com, qtype:1
[2024-09-20 12:28:02,513][DEBUG] domain:edge.microsoft.com, qtype:41
[2024-09-20 12:28:02,513][DEBUG] domain:clients2.google.com, qtype:1c
[2024-09-20 12:28:02,513][DEBUG] domain:clients2.google.com, qtype:1
[2024-09-20 12:28:02,513][DEBUG] domain:clients2.google.com, qtype:41
[2024-09-20 12:28:02,513][DEBUG] domain:www.bing.com, qtype:1c
[2024-09-20 12:28:02,513][DEBUG] domain:www.bing.com, qtype:1
[2024-09-20 12:28:02,513][DEBUG] domain:www.bing.com, qtype:41
[2024-09-20 12:28:03,381][DEBUG] domain:edge.microsoft.com, qtype:1c
[2024-09-20 12:28:03,381][DEBUG] domain:edge.microsoft.com, qtype:1
[2024-09-20 12:28:03,381][DEBUG] domain:edge.microsoft.com, qtype:41
[2024-09-20 12:28:03,398][DEBUG] domain:self.events.data.microsoft.com, qtype:1
[2024-09-20 12:28:03,398][DEBUG] domain:self.events.data.microsoft.com, qtype:1c
{
    "socket_timeout": 20,
    "host": "0.0.0.0",
    "port": 53,
    "tcp_dns_server": [
                       "208.67.222.222:5353",
                       "208.67.220.220:5353"],
    "udp_dns_server": ["208.67.222.222:5353"],
    "enable_server_switch": true,
    "speed_test": true,
    "enable_lru_cache": true,
    "lru_cache_size"  : 500,
    "udp_mode"        : false,
    "daemon_process"  : false,
    "internal_dns_server": ["192.168.0.250:5225"],
    "internal_domain": ["*intra*"],
    "private_host"    : {"*google.com": "203.117.34.162"}
}
bmtwdjxiang commented 1 month ago

"internal_dns_server": ["192.168.0.250:5225"], Is this configuration wrong? This is local dns

bmtwdjxiang commented 1 month ago
    "tcp_dns_server": [
                       "192.168.0.250:5225",
                       "208.67.220.220:5353"],

This configuration is valid.

bmtwdjxiang commented 1 month ago

windows11 system

henices commented 1 month ago

{ "socket_timeout": 20, "host": "0.0.0.0", "port": 53, "tcp_dns_server": ["112.100.100.100:53", "8.8.4.4:53", "156.154.70.1:53", "114.114.114.114:53", "208.67.222.222:53", "223.5.5.5:53", "209.244.0.3:53"], "udp_dns_server": ["208.67.222.222:5353"], "enable_server_switch": true, "speed_test": true, "enable_lru_cache": true, "lru_cache_size" : 500, "udp_mode" : false, "daemon_process" : false, "internal_dns_server": ["192.168.0.250:5225"], "internal_domain": ["intra"], "private_host" : {"*google.com": "203.117.34.162"} }

{ "socket_timeout": 20, "host": "0.0.0.0", "port": 53, "tcp_dns_server": ["208.67.222.222:5353",], "udp_dns_server": ["208.67.222.222:5353"], "enable_server_switch": true, "speed_test": true, "enable_lru_cache": true, "lru_cache_size" : 500, "udp_mode" : false, "daemon_process" : false, "internal_dns_server": ["192.168.0.250:5225"], "internal_domain": ["intra"], "private_host" : {"*google.com": "203.117.34.162"} }

"208.67.220.220:5353"

It works ! 😄️

henices commented 1 month ago

"internal_dns_server": ["192.168.0.250:5225"], Is this configuration wrong? This is local dns

when the domain match intra , it will use 192.168.0.250:5225 internal dns server to resovle.

Do not set internal dns server ip address in tcp_dns_server instead using internal_dns_server

henices commented 1 month ago

Feel free to reopen this issue.

Thanks a lot.