Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNS and Dialer Update #234

Merged
merged 7 commits into from Mar 6, 2021
Merged

DNS and Dialer Update #234

merged 7 commits into from Mar 6, 2021

Conversation

ghost
Copy link

@ghost ghost commented Feb 4, 2021

This PR:

  • 增加了DNS查询日志:DOH//doh.server got answer: domain.com -> [ip1, ip2] 1.097ms
  • 修复DoH遗留问题:DoH 在每一次查询时均建立新连接
  • 修复http传输方式SockoptObject不生效的问题。
  • 将每一个建立的系统连接,尝试通过内置DNS服务器解析地址后,使用IP地址建立连接:
    • 在SockoptObject添加DomainStrategy,用法与freedom中一致。
    • 此功能默认不启用。
    • 一定程度上解决安卓设备上的DNS问题。
    • 启用后,会导致代理服务器的域名由xray解析,请检查配置文件以避免出现死循环或超时。
      • 例如:解析代理服务器域名需要经过代理。
      • 已经添加了对死循环的检测:如果检测到使用目标地址解析目标地址,将会使用系统DNS。
      • 注:修复了 DoH 遗留问题后,在正常情况下不会出现死循环。
      • 注2:配置不当可能会导致超时问题,但似乎并没有行之有效的检测方式。
      • 注3:设置hosts可以规避上述问题。
      • 注4:local模式的DoH强制使用AsIs
  • 链式代理支持StreamSettings:
    • sockopt.dialerProxy
    • 与 v2fly 的实现不同,配置文件不同,但兼容v2的配置。

infra/conf/log.go Outdated Show resolved Hide resolved
@rurirei
Copy link
Contributor

rurirei commented Feb 19, 2021

将每一个建立的系统连接,尝试通过内置DNS服务器解析地址后,使用IP地址建立连接

least Android system do remoteserver-domain parsing, rather v2ray-core (AndroidLibV2ray), as it excepts Android.

@ghost
Copy link
Author

ghost commented Feb 20, 2021

@rurirei
很抱歉,我未能理解您的意思。但是,这个功能默认不启用。

@ghost ghost changed the title enhance DNS DNS and Dialer Update Mar 1, 2021
@ghost ghost requested a review from AkinoKaede March 3, 2021 09:25
@ghost ghost closed this Mar 4, 2021
@ghost ghost reopened this Mar 4, 2021
@RPRX
Copy link
Member

RPRX commented Mar 5, 2021

这个可以合并了吗

@ghost
Copy link
Author

ghost commented Mar 5, 2021

可以了

@RPRX
Copy link
Member

RPRX commented Mar 6, 2021

需要 resolve conflicts

@RPRX
Copy link
Member

RPRX commented Mar 6, 2021

TransportLayerProxy 被干掉了

@RPRX RPRX merged this pull request into XTLS:main Mar 6, 2021
@RPRX
Copy link
Member

RPRX commented Mar 6, 2021

感谢 PR,请补充文档说明

@RPRX
Copy link
Member

RPRX commented Mar 6, 2021

重开一个 PR 吧。。。

@RPRX RPRX mentioned this pull request Mar 6, 2021
@elvisw
Copy link

elvisw commented Apr 1, 2021

v2fly的transportLayer我试了没法把h2通过http代理发送,而xray的sockopt.dialerProxy我刚测试成功了,这下不需要用dokodemo-door桥接了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants