Compare commits

..

80 Commits

Author SHA1 Message Date
世界
b5d1ba19f1
Handle EDNS version downgrade 2025-05-01 11:01:07 +08:00
世界
d8e41965e0
Add default values for corresponding extensions to the format of rule-sets 2025-05-01 11:01:07 +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
5 changed files with 4 additions and 24 deletions

View File

@ -5,7 +5,6 @@ import (
"context" "context"
"io" "io"
"os" "os"
"path/filepath"
"github.com/sagernet/sing-box/adapter" "github.com/sagernet/sing-box/adapter"
"github.com/sagernet/sing-box/common/srs" "github.com/sagernet/sing-box/common/srs"
@ -57,14 +56,6 @@ func ruleSetMatch(sourcePath string, domain string) error {
if err != nil { if err != nil {
return E.Cause(err, "read rule-set") return E.Cause(err, "read rule-set")
} }
if flagRuleSetMatchFormat == "" {
switch filepath.Ext(sourcePath) {
case ".json":
flagRuleSetMatchFormat = C.RuleSetFormatSource
case ".srs":
flagRuleSetMatchFormat = C.RuleSetFormatBinary
}
}
var ruleSet option.PlainRuleSetCompat var ruleSet option.PlainRuleSetCompat
switch flagRuleSetMatchFormat { switch flagRuleSetMatchFormat {
case C.RuleSetFormatSource: case C.RuleSetFormatSource:

View File

@ -37,12 +37,6 @@ func (l *Listener) ListenUDP() (net.PacketConn, error) {
return udpConn, err return udpConn, err
} }
func (l *Listener) DialContext(dialer net.Dialer, ctx context.Context, network string, address string) (net.Conn, error) {
return ListenNetworkNamespace[net.Conn](l.listenOptions.NetNs, func() (net.Conn, error) {
return dialer.DialContext(ctx, network, address)
})
}
func (l *Listener) ListenPacket(listenConfig net.ListenConfig, ctx context.Context, network string, address string) (net.PacketConn, error) { func (l *Listener) ListenPacket(listenConfig net.ListenConfig, ctx context.Context, network string, address string) (net.PacketConn, error) {
return ListenNetworkNamespace[net.PacketConn](l.listenOptions.NetNs, func() (net.PacketConn, error) { return ListenNetworkNamespace[net.PacketConn](l.listenOptions.NetNs, func() (net.PacketConn, error) {
return listenConfig.ListenPacket(ctx, network, address) return listenConfig.ListenPacket(ctx, network, address)

View File

@ -80,8 +80,6 @@ List of [Headless Rule](./headless-rule/).
Format of rule-set file, `source` or `binary`. Format of rule-set file, `source` or `binary`.
Optional when `path` or `url` uses `json` or `srs` as extension.
### Local Fields ### Local Fields
#### path #### path

View File

@ -80,8 +80,6 @@
规则集格式, `source``binary` 规则集格式, `source``binary`
`path``url` 使用 `json``srs` 作为扩展名时可选。
### 本地字段 ### 本地字段
#### path #### path

View File

@ -154,11 +154,10 @@ func (w *tproxyPacketWriter) WritePacket(buffer *buf.Buffer, destination M.Socks
return err return err
} }
} }
var dialer net.Dialer var listenConfig net.ListenConfig
dialer.LocalAddr = destination.UDPAddr() listenConfig.Control = control.Append(listenConfig.Control, control.ReuseAddr())
dialer.Control = control.Append(dialer.Control, control.ReuseAddr()) listenConfig.Control = control.Append(listenConfig.Control, redir.TProxyWriteBack())
dialer.Control = control.Append(dialer.Control, redir.TProxyWriteBack()) packetConn, err := w.listener.ListenPacket(listenConfig, w.ctx, "udp", destination.String())
packetConn, err := w.listener.DialContext(dialer, w.ctx, "udp", w.source.String())
if err != nil { if err != nil {
return err return err
} }