Closed Janet-Baker closed 2 years ago
能发一下完整的日志和配置吗?我怀疑是字面意思:DoH服务器不支持TLS协议。代码里目前是强制要求v1.2及以上的TLS
我使用你上次提供的配置无法复现:
2021-11-19 18:48:41,593 INFO [dcompass] dcompass ready!
2021-11-19 18:48:41,594 TRACE [mio::poll] registering event source with poller: token=Token(1), interests=READABLE | WRITABLE
2021-11-19 18:48:43,610 INFO [droute::router::table::rule] domain "www.google.com" matches at rule `start`
2021-11-19 18:48:43,610 INFO [droute::router::upstreams::upstream] querying with upstream: dlut4
2021-11-19 18:48:43,610 INFO [droute::router::upstreams::upstream] querying with upstream: qq4
2021-11-19 18:48:43,610 TRACE [mio::poll] registering event source with poller: token=Token(2), interests=READABLE | WRITABLE
2021-11-19 18:48:43,611 DEBUG [reqwest::connect] starting new connection: https://doh-qjflggzs-dcompass.doh.pub/
2021-11-19 18:48:43,611 TRACE [mio::poll] registering event source with poller: token=Token(3), interests=READABLE | WRITABLE
2021-11-19 18:48:43,611 DEBUG [rustls::client::hs] No cached session for DNSNameRef("doh-qjflggzs-dcompass.doh.pub")
2021-11-19 18:48:43,611 DEBUG [rustls::client::hs] Not resuming any session
2021-11-19 18:48:43,611 TRACE [rustls::client::hs] Sending ClientHello Message {
typ: Handshake,
version: TLSv1_0,
payload: Handshake(
HandshakeMessagePayload {
typ: ClientHello,
payload: ClientHello(
ClientHelloPayload {
client_version: TLSv1_2,
random: Random(
[
7,
77,
67,
138,
203,
253,
93,
136,
13,
244,
53,
157,
177,
3,
109,
196,
221,
124,
54,
14,
186,
94,
161,
176,
129,
112,
188,
153,
63,
137,
94,
246,
],
),
session_id: SessionID(
142,
18,
139,
99,
145,
30,
61,
169,
174,
145,
191,
54,
114,
45,
91,
136,
9,
196,
66,
120,
4,
209,
212,
82,
138,
105,
136,
126,
235,
149,
151,
177,
),
cipher_suites: [
TLS13_CHACHA20_POLY1305_SHA256,
TLS13_AES_256_GCM_SHA384,
TLS13_AES_128_GCM_SHA256,
TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,
TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256,
TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
TLS_EMPTY_RENEGOTIATION_INFO_SCSV,
],
compression_methods: [
Null,
],
extensions: [
SupportedVersions(
[
TLSv1_3,
],
),
ECPointFormats(
[
Uncompressed,
],
),
NamedGroups(
[
X25519,
secp384r1,
secp256r1,
],
),
SignatureAlgorithms(
[
ECDSA_NISTP384_SHA384,
ECDSA_NISTP256_SHA256,
ED25519,
RSA_PSS_SHA512,
RSA_PSS_SHA384,
RSA_PSS_SHA256,
RSA_PKCS1_SHA512,
RSA_PKCS1_SHA384,
RSA_PKCS1_SHA256,
],
),
ExtendedMasterSecretRequest,
CertificateStatusRequest(
OCSP(
OCSPCertificateStatusRequest {
responder_ids: [],
extensions: PayloadU16(
[],
),
},
),
),
KeyShare(
[
KeyShareEntry {
group: X25519,
payload: PayloadU16(
[
162,
203,
243,
240,
24,
27,
19,
196,
207,
63,
239,
247,
0,
200,
103,
239,
231,
187,
101,
40,
14,
126,
245,
75,
14,
4,
206,
30,
42,
202,
113,
101,
],
),
},
],
),
PresharedKeyModes(
[
PSK_DHE_KE,
],
),
Protocols(
[
PayloadU8(
[
104,
50,
],
),
],
),
SessionTicketRequest,
],
},
),
},
),
}
2021-11-19 18:48:43,657 INFO [droute::router::upstreams::upstream] query successfully completed.
2021-11-19 18:48:43,657 TRACE [mio::poll] deregistering event source from poller
2021-11-19 18:48:43,657 INFO [droute::router::table] domain "www.google.com" has finished routing
2021-11-19 18:48:43,657 INFO [dcompass::worker] response completed. Sent back to 127.0.0.1:54860 successfully.
https://github.com/compassd/dcompass/releases/tag/build-20211119_1907
可以尝试一下这个 release 能不能修正问题
编译好了,上机测试
OK 可以正常使用了。
Describe the bug 发生了什么 DoH表现异常,报错是
peer is incompatible: server does not support TLS v1.2/v1.3
,但是DoH服务器和我的机器都是支持 TLS v1.2/v1.3 的。客户端请求:
服务端dcompass日志:
To Reproduce 如何重现
设定服务端配置:
然后测试即可复现。
Version & Platform (please complete the following information) 版本信息
dcompass-x86_64-unknown-linux-gnu-full
Linux lubuntu 18.04
Automated build 20211023_1004