Compare commits

..

80 Commits

Author SHA1 Message Date
世界
ec4d472912
Handle EDNS version downgrade 2025-04-30 20:03:02 +08:00
世界
6a0657ec4b
documentation: Bump version 2025-04-30 19:42:24 +08:00
世界
6b5d425e3b
documentation: Fix anytls padding scheme description 2025-04-30 19:42:23 +08:00
安容
ae5b299f3a
Report invalid DNS address early 2025-04-30 19:42:23 +08:00
世界
8ce567797c
Fix wireguard listen_port 2025-04-30 19:42:23 +08:00
世界
c7139ba0dc
clash-api: Add more meta api 2025-04-30 19:42:23 +08:00
世界
cd54e2a9aa
Fix DNS lookup 2025-04-30 19:42:23 +08:00
世界
c92d1b3be5
Fix tailscale sending unexpected stuff 2025-04-30 19:42:23 +08:00
世界
47372b0eeb
Fix fetch ECH configs 2025-04-30 19:42:14 +08:00
reletor
10a090d49c
documentation: Minor fixes 2025-04-30 19:42:13 +08:00
caelansar
366e6891d9
Fix callback deletion in UDP transport 2025-04-30 19:42:13 +08:00
世界
24755924bd
documentation: Try to make the play review happy 2025-04-30 19:42:13 +08:00
世界
69922d6273
Fix missing handling of legacy domain_strategy options 2025-04-30 19:42:12 +08:00
世界
fbac783590
Improve local DNS server 2025-04-30 19:42:12 +08:00
anytls
80fe59cadc
Update anytls
Co-authored-by: anytls <anytls>
2025-04-30 19:42:12 +08:00
世界
65d6db9638
Fix DNS dialer 2025-04-30 19:42:11 +08:00
世界
c92b4eda1c
release: Skip override version for iOS 2025-04-30 19:42:11 +08:00
iikira
f787f569b6
Fix UDP DNS server crash
Signed-off-by: iikira <i2@mail.iikira.com>
2025-04-30 19:42:11 +08:00
ReleTor
a83af4aed3
Fix fetch ECH configs 2025-04-30 19:42:11 +08:00
世界
211655a8f9
release: Update Go to 1.24.2 2025-04-30 19:42:11 +08:00
世界
9e572d52d1
Allow direct outbounds without domain_resolver 2025-04-30 19:42:10 +08:00
世界
c3e060ef7c
Fix Tailscale dialer 2025-04-30 19:42:10 +08:00
dyhkwong
8e242e4ede
Fix DNS over QUIC stream close 2025-04-30 19:42:01 +08:00
anytls
a9a991d6bb
Update anytls
Co-authored-by: anytls <anytls>
2025-04-30 19:42:01 +08:00
Rambling2076
2e7e94a485
Fix missing with_tailscale in Dockerfile
Signed-off-by: Rambling2076 <Rambling2076@proton.me>
2025-04-30 19:42:00 +08:00
世界
01e35b74db
Fail when default DNS server not found 2025-04-30 19:41:59 +08:00
世界
6c3aa066fb
Update gVisor to 20250319.0 2025-04-30 19:41:59 +08:00
世界
23fbd49733
release: Do not build tailscale on iOS and tvOS 2025-04-30 19:41:59 +08:00
世界
2ecfacc70a
Explicitly reject detour to empty direct outbounds 2025-04-30 19:41:59 +08:00
世界
2d9063507d
Add netns support 2025-04-30 19:41:58 +08:00
世界
1491e2644c
Add wildcard name support for predefined records 2025-04-30 19:41:58 +08:00
世界
0957f5d839
Remove map usage in options 2025-04-30 19:41:57 +08:00
世界
36622784cd
Fix unhandled DNS loop 2025-04-30 19:41:57 +08:00
世界
a341ea4293
Add wildcard-sni support for shadow-tls inbound 2025-04-30 19:41:57 +08:00
世界
5a207a6b68
Fix Tailscale DNS 2025-04-30 19:41:57 +08:00
k9982874
2ebe64896f
Add ntp protocol sniffing 2025-04-30 19:41:47 +08:00
世界
d8bf75915b
option: Fix marshal legacy DNS options 2025-04-30 19:41:47 +08:00
世界
460466e711
Make domain_resolver optional when only one DNS server is configured 2025-04-30 19:41:47 +08:00
世界
319b70d029
Fix DNS lookup context pollution 2025-04-30 19:41:47 +08:00
世界
61d3dc9734
Fix http3 DNS server connecting to wrong address 2025-04-30 19:41:46 +08:00
Restia-Ashbell
e1325a3270
documentation: Fix typo 2025-04-30 19:41:46 +08:00
anytls
95aa47aa1c
Update sing-anytls
Co-authored-by: anytls <anytls>
2025-04-30 19:41:46 +08:00
k9982874
4d32f52c88
Fix hosts DNS server 2025-04-30 19:41:45 +08:00
世界
fd3ecc53aa
Fix UDP DNS server crash 2025-04-30 19:41:45 +08:00
世界
b515fbbcef
documentation: Fix missing ip_accept_any DNS rule option 2025-04-30 19:41:45 +08:00
世界
ef2c6ea852
Fix anytls dialer usage 2025-04-30 19:41:45 +08:00
世界
e2780877e9
Move predefined DNS server to rule action 2025-04-30 19:41:44 +08:00
世界
42b072971c
Fix domain resolver on direct outbound 2025-04-30 19:41:44 +08:00
Zephyruso
12292ca177
Fix missing AnyTLS display name 2025-04-30 19:41:43 +08:00
anytls
eb07c5a4a7
Update sing-anytls
Co-authored-by: anytls <anytls>
2025-04-30 19:41:43 +08:00
Estel
16898cb10b
documentation: Fix typo
Signed-off-by: Estel <callmebedrockdigger@gmail.com>
2025-04-30 19:41:43 +08:00
TargetLocked
95956da914
Fix parsing legacy DNS options 2025-04-30 19:41:43 +08:00
世界
3ca344a3e2
Fix DNS fallback 2025-04-30 19:41:42 +08:00
世界
730a2a36eb
documentation: Fix missing hosts DNS server 2025-04-30 19:41:42 +08:00
anytls
5b9241f79e
Add MinIdleSession option to AnyTLS outbound
Co-authored-by: anytls <anytls>
2025-04-30 19:41:42 +08:00
ReleTor
757e8ecd0b
documentation: Minor fixes 2025-04-30 19:41:42 +08:00
libtry486
a5fc910fe6
documentation: Fix typo
fix typo

Signed-off-by: libtry486 <89328481+libtry486@users.noreply.github.com>
2025-04-30 19:41:42 +08:00
Alireza Ahmadi
7e6503c2ce
Fix Outbound deadlock 2025-04-30 19:41:42 +08:00
世界
43c9a137b4
documentation: Fix AnyTLS doc 2025-04-30 19:41:42 +08:00
anytls
a2d7039a8f
Add AnyTLS protocol 2025-04-30 19:41:42 +08:00
世界
61ba43e2a3
Migrate to stdlib ECH support 2025-04-30 19:41:41 +08:00
世界
a50d467245
Add fallback local DNS server for iOS 2025-04-30 19:41:41 +08:00
世界
e4714af97b
Get darwin local DNS server from libresolv 2025-04-30 19:41:41 +08:00
世界
23a7950a9f
Improve resolve action 2025-04-30 19:41:41 +08:00
世界
565a032131
Fix toolchain version 2025-04-30 19:41:41 +08:00
世界
f5d27a8d97
Add back port hopping to hysteria 1 2025-04-30 19:41:41 +08:00
世界
cd92db4589
Update dependencies 2025-04-30 19:41:41 +08:00
xchacha20-poly1305
eb23610bff
Remove single quotes of raw Moziila certs 2025-04-30 19:41:41 +08:00
世界
c3f82168e3
Add Tailscale endpoint 2025-04-30 19:41:40 +08:00
世界
a119fff914
Build legacy binaries with latest Go 2025-04-30 19:41:04 +08:00
世界
80bf6405d3
documentation: Remove outdated icons 2025-04-30 19:41:04 +08:00
世界
214c0fab9a
documentation: Certificate store 2025-04-30 19:41:03 +08:00
世界
e00e472364
documentation: TLS fragment 2025-04-30 19:41:03 +08:00
世界
9b695c656f
documentation: Outbound domain resolver 2025-04-30 19:41:03 +08:00
世界
b2fb7789b6
documentation: Refactor DNS 2025-04-30 19:41:03 +08:00
世界
9733979663
Add certificate store 2025-04-30 19:41:02 +08:00
世界
dbe95fa068
Add TLS fragment support 2025-04-30 19:41:02 +08:00
世界
84817d10fb
refactor: Outbound domain resolver 2025-04-30 19:40:51 +08:00
世界
c8ea5f3170
refactor: DNS 2025-04-30 19:40:46 +08:00
世界
d574e9eb52
Update smux to v1.5.34 2025-04-30 19:39:15 +08:00
3 changed files with 24 additions and 9 deletions

View File

@ -232,10 +232,17 @@ func (c *Client) Exchange(ctx context.Context, transport adapter.DNSTransport, m
record.Header().Ttl = timeToLive
}
}
response.Id = messageId
if !disableCache {
c.storeCache(transport, question, response, timeToLive)
}
response.Id = messageId
requestEDNSOpt := message.IsEdns0()
responseEDNSOpt := response.IsEdns0()
if responseEDNSOpt != nil && (requestEDNSOpt == nil || requestEDNSOpt.Version() < responseEDNSOpt.Version()) {
response.Extra = common.Filter(response.Extra, func(it dns.RR) bool {
return it.Header().Rrtype != dns.TypeOPT
})
}
logExchangedResponse(c.logger, ctx, response, timeToLive)
return response, err
}

4
go.mod
View File

@ -27,14 +27,14 @@ require (
github.com/sagernet/quic-go v0.49.0-beta.1
github.com/sagernet/reality v0.0.0-20230406110435-ee17307e7691
github.com/sagernet/sing v0.6.8-0.20250429124449-59dfe1dbfdbf
github.com/sagernet/sing-mux v0.3.1
github.com/sagernet/sing-mux v0.3.2
github.com/sagernet/sing-quic v0.4.1-0.20250423030647-0eb05f373a76
github.com/sagernet/sing-shadowsocks v0.2.7
github.com/sagernet/sing-shadowsocks2 v0.2.0
github.com/sagernet/sing-shadowtls v0.2.1-0.20250316154757-6f9e732e5056
github.com/sagernet/sing-tun v0.6.6-0.20250428031943-0686f8c4f210
github.com/sagernet/sing-vmess v0.2.1
github.com/sagernet/smux v0.0.0-20231208180855-7041f6ea79e7
github.com/sagernet/smux v1.5.34-mod.1
github.com/sagernet/tailscale v1.80.3-mod.4
github.com/sagernet/utls v1.6.7
github.com/sagernet/wireguard-go v0.0.1-beta.7

20
go.sum
View File

@ -30,6 +30,7 @@ github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46t
github.com/cretz/bine v0.2.0 h1:8GiDRGlTgz+o8H9DSnsl+5MeBK4HsExxgl6WgzOCuZo=
github.com/cretz/bine v0.2.0/go.mod h1:WU4o9QR9wWp8AVKtTM1XD5vUHkEqnf2vVSo6dBqbetI=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dblohm7/wingoes v0.0.0-20240119213807-a09d6be7affa h1:h8TfIT1xc8FWbwwpmHn1J5i43Y0uZP97GqasGCzSRJk=
@ -177,11 +178,11 @@ github.com/sagernet/quic-go v0.49.0-beta.1 h1:3LdoCzVVfYRibZns1tYWSIoB65fpTmrwy+
github.com/sagernet/quic-go v0.49.0-beta.1/go.mod h1:uesWD1Ihrldq1M3XtjuEvIUqi8WHNsRs71b3Lt1+p/U=
github.com/sagernet/reality v0.0.0-20230406110435-ee17307e7691 h1:5Th31OC6yj8byLGkEnIYp6grlXfo1QYUfiYFGjewIdc=
github.com/sagernet/reality v0.0.0-20230406110435-ee17307e7691/go.mod h1:B8lp4WkQ1PwNnrVMM6KyuFR20pU8jYBD+A4EhJovEXU=
github.com/sagernet/sing v0.2.18/go.mod h1:OL6k2F0vHmEzXz2KW19qQzu172FDgSbUSODylighuVo=
github.com/sagernet/sing v0.6.7/go.mod h1:ARkL0gM13/Iv5VCZmci/NuoOlePoIsW0m7BWfln/Hak=
github.com/sagernet/sing v0.6.8-0.20250429124449-59dfe1dbfdbf h1:WLlIJ2+Z4ZjQQAJlxYvASMIopFFk5aQBbq7fwIPS3u0=
github.com/sagernet/sing v0.6.8-0.20250429124449-59dfe1dbfdbf/go.mod h1:ARkL0gM13/Iv5VCZmci/NuoOlePoIsW0m7BWfln/Hak=
github.com/sagernet/sing-mux v0.3.1 h1:kvCc8HyGAskDHDQ0yQvoTi/7J4cZPB/VJMsAM3MmdQI=
github.com/sagernet/sing-mux v0.3.1/go.mod h1:Mkdz8LnDstthz0HWuA/5foncnDIdcNN5KZ6AdJX+x78=
github.com/sagernet/sing-mux v0.3.2 h1:meZVFiiStvHThb/trcpAkCrmtJOuItG5Dzl1RRP5/NE=
github.com/sagernet/sing-mux v0.3.2/go.mod h1:pht8iFY4c9Xltj7rhVd208npkNaeCxzyXCgulDPLUDA=
github.com/sagernet/sing-quic v0.4.1-0.20250423030647-0eb05f373a76 h1:iwpCX6H3nZEOGUGwx0q5azcgYOA9f6v9YssihXoRKHk=
github.com/sagernet/sing-quic v0.4.1-0.20250423030647-0eb05f373a76/go.mod h1:tqPa0/Wqa19MkkSlKVZZX5sHxtiDR9BROcn4ufcbVdY=
github.com/sagernet/sing-shadowsocks v0.2.7 h1:zaopR1tbHEw5Nk6FAkM05wCslV6ahVegEZaKMv9ipx8=
@ -194,8 +195,8 @@ github.com/sagernet/sing-tun v0.6.6-0.20250428031943-0686f8c4f210 h1:6H4BZaTqKI3
github.com/sagernet/sing-tun v0.6.6-0.20250428031943-0686f8c4f210/go.mod h1:fisFCbC4Vfb6HqQNcwPJi2CDK2bf0Xapyz3j3t4cnHE=
github.com/sagernet/sing-vmess v0.2.1 h1:6izHC2+B68aQCxTagki6eZZc+g5eh4dYwxOV5a2Lhug=
github.com/sagernet/sing-vmess v0.2.1/go.mod h1:jDAZ0A0St1zVRkyvhAPRySOFfhC+4SQtO5VYyeFotgA=
github.com/sagernet/smux v0.0.0-20231208180855-7041f6ea79e7 h1:DImB4lELfQhplLTxeq2z31Fpv8CQqqrUwTbrIRumZqQ=
github.com/sagernet/smux v0.0.0-20231208180855-7041f6ea79e7/go.mod h1:FP9X2xjT/Az1EsG/orYYoC+5MojWnuI7hrffz8fGwwo=
github.com/sagernet/smux v1.5.34-mod.1 h1:xZljMK3fVOX4HC+ND1N7eOiweqEa9bxRTKlliqe9DJE=
github.com/sagernet/smux v1.5.34-mod.1/go.mod h1:qI3fpNiLZmwrh83DmbJHX7sAsc2R/gbqdWw0/WzciU0=
github.com/sagernet/tailscale v1.80.3-mod.4 h1:9UgYq8m9mwX5dbTbueVxbRh+bq7AayxemJGM2PkJQnE=
github.com/sagernet/tailscale v1.80.3-mod.4/go.mod h1:EBxXsWu4OH2ELbQLq32WoBeIubG8KgDrg4/Oaxjs6lI=
github.com/sagernet/utls v1.6.7 h1:Ep3+aJ8FUGGta+II2IEVNUc3EDhaRCZINWkj/LloIA8=
@ -209,7 +210,14 @@ github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3k
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
github.com/tailscale/certstore v0.1.1-0.20231202035212-d3fa0460f47e h1:PtWT87weP5LWHEY//SWsYkSO3RWRZo4OSWagh3YD2vQ=
@ -288,7 +296,7 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20220817070843-5a390386f1f2/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.14.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=
golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=