-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
新增ECH客户端支持 #3162
新增ECH客户端支持 #3162
Conversation
At least you need to use |
我暂时没有考虑把它整合进ray里的系统 这个doh是随手糊的 没用dispatcher也没用ray里的internet包 虽然改也很简单不过 作为一个go软件难道连用http包发出一个小请求都会炸么 |
其实还不如拆分一下 TLS 这里就不搞DOH了请求了,就只留下ECHConfig。然后直接给DoH请求的部分给放进命令行工具,这样也就没必要完全遵守那些针对于协议实现的规则了。 |
UseAlternativeSystemDialer 一般来说是给 Android VpnService 绕过 core 自己发出的流量用的。在这种情况下如果 core 自己不使用 DialSystem 发出,会导致流量回环。用别的方法绕过另说。 |
个人觉得没必要搞命令行工具 这个记录的格式非常简单 一个典型的 type65记录就长这样 稍微dig一下就出来了
我只是构建了一个最基础的doh请求然后用正则表达式把里面的ech=xxx匹配出来而已 做这个的原因是cloudflare的ECH公钥似乎是轮换滚动的 写死不方便用而已 |
utls 是在 https://github.com/v2fly/v2ray-core/blob/master/transport/internet/tls/utls/utls.go#L29 。 |
写了cache的呀
|
哦 抱歉是我蠢了。。。没看到。。。我的锅。。。 |
if config.ServerName == "" { | ||
return newError("Using DOH for ECH needs serverName") | ||
} | ||
ECHConfig, err = QueryRecord(c.ServerName, c.Ech_DOHserver) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consider the situation that server address will be filled into config.ServerName
if no c.ServerName
specified and server address is a domain name, should use ECHConfig, err = QueryRecord(config.ServerName, c.Ech_DOHserver)
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Fangliding Now that #3176 and #3177 will be merged, I think you can also make a fix for this too?
从这copy东西走了 copy点东西回来才叫礼尚往来基本就是从 XTLS/Xray-core#3813 copy来的
新增两个tlsSettings字段 指定ECH Config 或者从一个指定的DOH服务器查询(需要设置serverName)
还没测试~~(因为手上没可用的config)~~ 不过隔壁测试是OK的 两边应该大差不差