Giter Site home page Giter Site logo

Comments (25)

wolf-joe avatar wolf-joe commented on August 20, 2024

ts-dns-full.toml中的自定义分组[groups.work]只是一个示例,可以随意添加任何名称的分组。

from ts-dns.

liang-hiwin avatar liang-hiwin commented on August 20, 2024

ts-dns-full.toml中的自定义分组[groups.work]只是一个示例,可以随意添加任何名称的分组。

被防火墙屏蔽的域名无法解析什么情况呢?

`dig www.google.com.hk @127.0.0.1 -p 5500

; <<>> DiG 9.10.3-P4-Debian <<>> www.google.com.hk @127.0.0.1 -p 5500
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 9553
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;www.google.com.hk. IN A

;; Query time: 0 msec
;; SERVER: 127.0.0.1#5500(127.0.0.1)
;; WHEN: Sun Apr 12 12:22:14 CST 2020
;; MSG SIZE rcvd: 46

`

[groups.dirty] # 必选分组,匹配GFWList的域名会归类到该组 #socks5 = "127.0.0.1:1080" # 当使用国外53端口dns解析时推荐用socks5代理解析 dns = ["127.0.0.1:5300", "127.0.0.1:5354"] # 如不想用socks5代理解析时推荐使用国外非53端口dns

`root@iZwz9d1rjhrzzxa4lsoi93Z:~# dig www.google.com.hk @127.0.0.1 -p 5300

; <<>> DiG 9.10.3-P4-Debian <<>> www.google.com.hk @127.0.0.1 -p 5300
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 49900
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;www.google.com.hk. IN A

;; ANSWER SECTION:
www.google.com.hk. 300 IN A 172.217.10.131

;; Query time: 246 msec
;; SERVER: 127.0.0.1#5300(127.0.0.1)
;; WHEN: Sun Apr 12 12:23:41 CST 2020
;; MSG SIZE rcvd: 62

`

from ts-dns.

liang-hiwin avatar liang-hiwin commented on August 20, 2024

我的外网域名的解析正常 地址:127.0.0.1:5354和127.0.0.1:5300
`root@iZwz9d1rjhrzzxa4lsoi93Z:~# dig www.google.com.hk @127.0.0.1 -p 5354

; <<>> DiG 9.10.3-P4-Debian <<>> www.google.com.hk @127.0.0.1 -p 5354
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 20810
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.google.com.hk. IN A

;; ANSWER SECTION:
www.google.com.hk. 231 IN A 172.217.10.131

;; Query time: 0 msec
;; SERVER: 127.0.0.1#5354(127.0.0.1)
;; WHEN: Sun Apr 12 12:24:50 CST 2020
;; MSG SIZE rcvd: 51

root@iZwz9d1rjhrzzxa4lsoi93Z:~# dig www.google.com.hk @127.0.0.1 -p 5300

; <<>> DiG 9.10.3-P4-Debian <<>> www.google.com.hk @127.0.0.1 -p 5300
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 55714
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.google.com.hk. IN A

;; ANSWER SECTION:
www.google.com.hk. 148 IN A 172.217.10.131

;; Query time: 0 msec
;; SERVER: 127.0.0.1#5300(127.0.0.1)
;; WHEN: Sun Apr 12 12:26:13 CST 2020
;; MSG SIZE rcvd: 68

`

from ts-dns.

liang-hiwin avatar liang-hiwin commented on August 20, 2024

ZJG4H CE156W~$){BJIH5{E

from ts-dns.

wolf-joe avatar wolf-joe commented on August 20, 2024

ts-dns默认使用的配置文件为ts-dns.toml,提bug时请给出完整的配置文件和ts-dns的日志。

from ts-dns.

liang-hiwin avatar liang-hiwin commented on August 20, 2024

ts-dns默认使用的配置文件为ts-dns.toml,提bug时请给出完整的配置文件和ts-dns的日志。

老哥配置文件和log这里
log.zip

from ts-dns.

liang-hiwin avatar liang-hiwin commented on August 20, 2024

默认的gfw列表是加密的,不懂是否支持不加密的格式。比如这种:https://pexcn.me/daily/gfwlist/gfwlist.txt

from ts-dns.

wolf-joe avatar wolf-joe commented on August 20, 2024

默认的gfw列表是加密的,不懂是否支持不加密的格式。比如这种:https://pexcn.me/daily/gfwlist/gfwlist.txt

这种非base64编码的gfwlist会在后续的版本添加支持。

from ts-dns.

liang-hiwin avatar liang-hiwin commented on August 20, 2024

默认的gfw列表是加密的,不懂是否支持不加密的格式。比如这种:https://pexcn.me/daily/gfwlist/gfwlist.txt

这种非base64编码的gfwlist会在后续的版本添加支持。

配置文件和log发了你看到了吗?
我看log发现它通这个组解析
4NDUO3EI4A TGC5TJ4 4U K

from ts-dns.

wolf-joe avatar wolf-joe commented on August 20, 2024

ts-dns默认使用的配置文件为ts-dns.toml,提bug时请给出完整的配置文件和ts-dns的日志。

老哥配置文件和log这里
log.zip

注意日志中的如下部分:

time="2020-04-12T13:39:33+08:00" level=info msg="cn/empty ipv4" domain=www.google.com.hk. group=clean src=127.0.0.1 type=A

注意看readme中所写的DNS查询请求处理流程。ts-dns收到www.google.com.hk的解析请求时,首先向clean组DNS上游(即127.0.0.1:5353)转发请求,得到的响应中没有出现非CNIP(实际上是空响应),流程结束。

from ts-dns.

liang-hiwin avatar liang-hiwin commented on August 20, 2024

ts-dns默认使用的配置文件为ts-dns.toml,提bug时请给出完整的配置文件和ts-dns的日志。

老哥配置文件和log这里
log.zip

注意日志中的如下部分:

time="2020-04-12T13:39:33+08:00" level=info msg="cn/empty ipv4" domain=www.google.com.hk. group=clean src=127.0.0.1 type=A

注意看readme中所写的DNS查询请求处理流程。ts-dns收到www.google.com.hk的解析请求时,首先向clean组DNS上游(即127.0.0.1:5353)转发请求,得到的响应中没有出现非CNIP(实际上是空响应),流程结束。

那怎么解决?

from ts-dns.

liang-hiwin avatar liang-hiwin commented on August 20, 2024

我还以为这样解析的呢,即ts-dns收到www.google.com.hk的解析请求时,如果这个域名在gfw名单中,直接用groups.dirty这个组解析,不经过groups.clean解析。

而程序的流程是:
如未匹配规则,则假设域名为clean组,向clean组的上游DNS转发查询请求,并做如下判断:
如果查询结果中所有IPv4地址均为CN IP,则直接返回;
如果查询结果中出现非CN IP,进一步判断:
如果该域名匹配GFWList列表,则向dirty组的上游DNS转发查询请求并返回;
否则返回查询结果。

所以空解析出现了!!呜呜呜

from ts-dns.

wolf-joe avatar wolf-joe commented on August 20, 2024

我还以为这样解析的呢,即ts-dns收到www.google.com.hk的解析请求时,如果这个域名在gfw名单中,直接用groups.dirty这个组解析,不经过groups.clean解析。

早期的版本是这样的,但后来发现有icloud.cdn-apple.com这种在gfw名单、但实际上其解析并没有被污染的域名存在,于是改成现在这种优先判断IP所属地的情况。

from ts-dns.

liang-hiwin avatar liang-hiwin commented on August 20, 2024

我还以为这样解析的呢,即ts-dns收到www.google.com.hk的解析请求时,如果这个域名在gfw名单中,直接用groups.dirty这个组解析,不经过groups.clean解析。

早期的版本是这样的,但后来发现有icloud.cdn-apple.com这种在gfw名单、但实际上其解析并没有被污染的域名存在,于是改成现在这种优先判断IP所属地的情况。

这也怪gfw的维护者了

from ts-dns.

liang-hiwin avatar liang-hiwin commented on August 20, 2024

我还以为这样解析的呢,即ts-dns收到www.google.com.hk的解析请求时,如果这个域名在gfw名单中,直接用groups.dirty这个组解析,不经过groups.clean解析。

早期的版本是这样的,但后来发现有icloud.cdn-apple.com这种在gfw名单、但实际上其解析并没有被污染的域名存在,于是改成现在这种优先判断IP所属地的情况。

现在估计只有对google经行单独的分组解析才能避免空解析,但是数量太多了,一个个加好累。

from ts-dns.

wolf-joe avatar wolf-joe commented on August 20, 2024

而且实际上www.google.com.hk这个域名并没有被污染,使用国内的公共DNS都可以正常解析,所以奇怪的是你配置的127.0.0.1:5353为什么会返回空响应。

from ts-dns.

liang-hiwin avatar liang-hiwin commented on August 20, 2024

而且实际上www.google.com.hk这个域名并没有被污染,使用国内的公共DNS都可以正常解析,所以奇怪的是你配置的127.0.0.1:5353为什么会返回空响应。

我的127.0.0.1:5353是unbound递归解析的,开了ECS,国内所有域名都走这个,国外走doh

from ts-dns.

wolf-joe avatar wolf-joe commented on August 20, 2024

而且实际上www.google.com.hk这个域名并没有被污染,使用国内的公共DNS都可以正常解析,所以奇怪的是你配置的127.0.0.1:5353为什么会返回空响应。

我的127.0.0.1:5353是unbound递归解析的,开了ECS,国内所有域名都走这个,国外走doh

意思是unbound在做递归解析时会携带ecs信息吗

from ts-dns.

liang-hiwin avatar liang-hiwin commented on August 20, 2024

而且实际上www.google.com.hk这个域名并没有被污染,使用国内的公共DNS都可以正常解析,所以奇怪的是你配置的127.0.0.1:5353为什么会返回空响应。

我的127.0.0.1:5353是unbound递归解析的,开了ECS,国内所有域名都走这个,国外走doh

意思是unbound在做递归解析时会携带ecs信息吗

是的会携带客户端的ip信息。也就是所谓的一些隐私的信息

from ts-dns.

wolf-joe avatar wolf-joe commented on August 20, 2024

而且实际上www.google.com.hk这个域名并没有被污染,使用国内的公共DNS都可以正常解析,所以奇怪的是你配置的127.0.0.1:5353为什么会返回空响应。

我的127.0.0.1:5353是unbound递归解析的,开了ECS,国内所有域名都走这个,国外走doh

意思是unbound在做递归解析时会携带ecs信息吗

是的会携带客户端的ip信息。也就是所谓的一些隐私的信息

ts-dns在后续版本也会支持转发dns请求时添加ecs信息

from ts-dns.

liang-hiwin avatar liang-hiwin commented on August 20, 2024

而且实际上www.google.com.hk这个域名并没有被污染,使用国内的公共DNS都可以正常解析,所以奇怪的是你配置的127.0.0.1:5353为什么会返回空响应。

我的127.0.0.1:5353是unbound递归解析的,开了ECS,国内所有域名都走这个,国外走doh

意思是unbound在做递归解析时会携带ecs信息吗

是的会携带客户端的ip信息。也就是所谓的一些隐私的信息

ts-dns在后续版本也会支持转发dns请求时添加ecs信息

doh也可以

@HTQ8A8HPJI7T@9)9D(HC(C

from ts-dns.

wolf-joe avatar wolf-joe commented on August 20, 2024

默认的gfw列表是加密的,不懂是否支持不加密的格式。比如这种:https://pexcn.me/daily/gfwlist/gfwlist.txt

v0.11.0发布,可选是否以base64解码gfwlist,支持默认附带ECS信息转发DNS请求(DOH暂不支持)。

from ts-dns.

wolf-joe avatar wolf-joe commented on August 20, 2024

而且实际上www.google.com.hk这个域名并没有被污染,使用国内的公共DNS都可以正常解析,所以奇怪的是你配置的127.0.0.1:5353为什么会返回空响应。

我的127.0.0.1:5353是unbound递归解析的,开了ECS,国内所有域名都走这个,国外走doh

意思是unbound在做递归解析时会携带ecs信息吗

是的会携带客户端的ip信息。也就是所谓的一些隐私的信息

ts-dns在后续版本也会支持转发dns请求时添加ecs信息

doh也可以

@HTQ8A8HPJI7T@9)9D(HC(C

这是哪个doh服务器?RFC 8484规范里完全没提到ECS啊😂

from ts-dns.

liang-hiwin avatar liang-hiwin commented on August 20, 2024

而且实际上www.google.com.hk这个域名并没有被污染,使用国内的公共DNS都可以正常解析,所以奇怪的是你配置的127.0.0.1:5353为什么会返回空响​​应。

我的127.0.0.1:5353是unbound递归解析的,开了ECS,国内所有域名都走这个,国外走doh

意思是unbound在做递归解析时会携带ecs信息吗

是的会携带客户端的ip信息。也就是所谓的一些专有的信息

ts-dns在后续版本也会支持转发dns请求时添加ecs信息

doh也可以
@ HTQ8A8HPJI7T @ 9)9D(HC(C

RFC 8484规范里完全没提到ECS啊

对的

from ts-dns.

liang-hiwin avatar liang-hiwin commented on August 20, 2024

而且实际上www.google.com.hk这个域名并没有被污染,使用国内的公共DNS都可以正常解析,所以奇怪的是你配置的127.0.0.1:5353为什么会返回空响​​应。

我的127.0.0.1:5353是unbound递归解析的,开了ECS,国内所有域名都走这个,国外走doh

意思是unbound在做递归解析时会携带ecs信息吗

是的会携带客户端的ip信息。也就是所谓的一些专有的信息

ts-dns在后续版本也会支持转发dns请求时添加ecs信息

ts-dns_0.11.0_Linux_x86_64版本我经过测试已经OK

Q6 %}J$}R ~XN_K5I}DG@3V

from ts-dns.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.