Compare commits

..

27 Commits

Author SHA1 Message Date
renovate[bot]
2e5d8c2d62
[dependencies] Update github-actions 2025-09-08 13:38:26 +00:00
世界
34892f4c7e
ktls: Add warning for inappropriate scenarios 2025-09-08 21:27:13 +08:00
世界
94103df562
ktls: Fix parse kernel version 2025-09-08 21:27:13 +08:00
世界
a832c26a2f
documentation: Bump version 2025-09-08 19:46:45 +08:00
世界
c3ac036aee
Update Go to 1.25.1 2025-09-08 19:46:45 +08:00
世界
c3d6f42a5a
documentation: Add kTLS 2025-09-08 19:46:45 +08:00
世界
73595dd75c
Add support for kTLS
Reference: https://gitlab.com/go-extension/tls
2025-09-08 19:46:44 +08:00
世界
61bb706ad7
Add proxy support for ICMP echo request 2025-09-08 19:46:43 +08:00
世界
f89ff2fb66
Fix resolve using resolved 2025-09-08 19:46:43 +08:00
世界
49c7ab402a
documentation: Update behavior of local DNS server on darwin 2025-09-08 19:46:43 +08:00
世界
2ff8e0babc
Stop using DHCP on iOS and tvOS
We do not have the `com.apple.developer.networking.multicast` entitlement and are unable to obtain it for non-technical reasons.
2025-09-08 19:46:43 +08:00
世界
bac7a5bc9e
Remove use of ldflags -checklinkname=0 on darwin 2025-09-08 19:46:43 +08:00
世界
ffc065bd74
Fix local DNS server on darwin
We mistakenly believed that `libresolv`'s `search` function worked correctly in NetworkExtension, but it seems only `getaddrinfo` does.

This commit changes the behavior of the `local` DNS server in NetworkExtension to prefer DHCP, falling back to `getaddrinfo` if DHCP servers are unavailable.

It's worth noting that `prefer_go` does not disable DHCP since it respects Dial Fields, but `getaddrinfo` does the opposite. The new behavior only applies to NetworkExtension, not to all scenarios (primarily command-line binaries) as it did previously.

In addition, this commit also improves the DHCP DNS server to use the same robust query logic as `local`.
2025-09-08 19:46:42 +08:00
世界
ca4bbff6f4
Fix legacy DNS config 2025-09-08 19:46:42 +08:00
世界
dea7b79d43
Fix rule-set format 2025-09-08 19:46:41 +08:00
世界
bf342408b8
documentation: Remove outdated icons 2025-09-08 19:46:41 +08:00
世界
d2856cea06
documentation: Improve local DNS server 2025-09-08 19:46:41 +08:00
世界
ff0c266ef0
Use libresolv in local DNS server on darwin 2025-09-08 19:46:41 +08:00
世界
bc11350397
Use resolved in local DNS server if available 2025-09-08 19:46:41 +08:00
xchacha20-poly1305
76a9d68566
Fix rule set version 2025-09-08 19:46:40 +08:00
世界
83a94a4384
documentation: Add preferred_by route rule item 2025-09-08 19:46:40 +08:00
世界
9ee622b807
Add preferred_by route rule item 2025-09-08 19:46:40 +08:00
世界
f8338b15e1
documentation: Add interface address rule items 2025-09-08 19:46:39 +08:00
世界
485405d350
Add interface address rule items 2025-09-08 19:46:39 +08:00
neletor
084c5f3797
Add support for ech retry configs 2025-09-08 19:46:39 +08:00
Zephyruso
55f7fa1243
Add /dns/flush-clash meta api 2025-09-08 19:46:39 +08:00
世界
79c0b9f51d
Fix tls options ignored in mixed inbounds 2025-09-08 19:45:52 +08:00
3 changed files with 9 additions and 0 deletions

View File

@ -81,6 +81,10 @@ func parsePreReleaseIdentifier(identifier string) int {
return 0
}
func (v Version) VersionString() string {
return F.ToString(v.Major, ".", v.Minor, ".", v.Patch)
}
func (v Version) String() string {
version := F.ToString(v.Major, ".", v.Minor, ".", v.Patch)
if v.PreReleaseIdentifier != "" {

View File

@ -10,6 +10,7 @@ import (
"github.com/sagernet/fswatch"
"github.com/sagernet/sing-box/adapter"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing-box/option"
"github.com/sagernet/sing/common"
@ -273,6 +274,9 @@ func NewSTDServer(ctx context.Context, logger log.ContextLogger, options option.
echKeyPath: echKeyPath,
}
if options.KernelTx || options.KernelRx {
if !C.IsLinux {
return nil, E.New("kTLS is only supported on Linux")
}
config = &KTlSServerConfig{
ServerConfig: config,
logger: logger,

View File

@ -88,6 +88,7 @@ func (h *Inbound) Close() error {
h.tlsConfig,
)
}
func (h *Inbound) NewConnectionEx(ctx context.Context, conn net.Conn, metadata adapter.InboundContext, onClose N.CloseHandlerFunc) {
err := h.newConnection(ctx, conn, metadata, onClose)
N.CloseOnHandshakeFailure(conn, onClose, err)