Commit Graph
539 Commits
Author SHA1 Message Date
世界 59069b3373 Fix route-level network strategy ignoring outbound restrictions 2026-11-25 21:25:46 +08:00
世界 1011659782 Fix ALPN negotiation for inbounds with ACME
acme-tls/1 was stored in the server NextProtos so that TLS-ALPN-01
validation could negotiate it. With no other ALPN configured, the server
then only offered acme-tls/1 and rejected every client that sends ALPN
with no_application_protocol, and NextProtos() reported it as configured,
so protocols that set their default ALPN only on an empty list (hysteria,
hysteria2, QUIC, HTTP upgrade, naive, DERP) never did.

Negotiate acme-tls/1 only for RFC 8737 validation ClientHellos through
GetConfigForClient and leave NextProtos to the inbound. Inline ACME is now
a certificate provider like certificate_provider.
2026-11-25 21:25:46 +08:00
世界 d17f68f626 Fix STUN test when server address is an IP literal 2026-11-25 21:25:46 +08:00
世界 ef3c5a4f0a Fix listener interface follow race and oversized UDP write errors 2026-11-24 22:45:23 +08:00
世界 cb3b7a7c4b Fix kTLS read waiter disconnecting on TLS 1.3 session tickets 2026-11-24 22:45:20 +08:00
世界 37fffa325b Fix URLTest selection and idle connection references 2026-11-24 22:45:20 +08:00
世界 70e4310bfa Fix network strategy falling back to other interfaces on address family failures 2026-11-24 22:45:20 +08:00
世界 3b4ea5cc83 Fix CGO write barrier crash in Darwin certificate anchors 2026-11-24 22:45:19 +08:00
世界 f41c2e62ca Fix public key verification with empty certificate chain 2026-11-24 22:45:19 +08:00
世界 d553a29433 Fix DNS reverse mapping pollution and ECH public name matching 2026-11-24 22:45:19 +08:00
世界 0cdfc45e26 Fix ECH client cache sharing, retry and protocol wiring 2026-11-24 22:45:19 +08:00
世界 9d3a1825d5 Fetch ECH config from DNS for QUIC
QUIC clients took the standard TLS config directly, so with ECH enabled
and no static config, hysteria, hysteria2, tuic and DNS over QUIC never
queried the ECH config list and sent the real server name in the clear
without reporting an error. Query it before the QUIC handshake as the
TCP path does.
2026-11-16 06:50:44 +00:00
世界 961b56b176 Use domain resolver for ECH config queries
When ECH is enabled without a static config, the HTTPS record query for
the ECH config list went through the DNS rules instead of the domain
resolver, and the migration of outbound DNS rule items to the domain
resolver left no way to select a DNS server for it. A rule rejecting
HTTPS records refused the query, and a default DNS server detoured
through the same outbound waited for its own connection until the query
timed out.

Send the query to the domain resolver of the dial fields, then the
default domain resolver, then the only DNS server, and fail it when
none of them is available. DNS servers must set their own domain
resolver for it, as they do for a domain server address.
2026-11-16 06:50:44 +00:00
世界 08eaa2878c Send reality fallback request before returning
When authentication failed, the reality client returned the error and
sent the fallback request from a goroutine on the same connection. The
TLS dialer closes the connection when the handshake returns an error, so
the request always failed with "use of closed network connection" and
the client closed the connection right after the target's handshake.
Send the request within the handshake context before returning the
error, so the caller owns the connection again once it gets the error.
2026-11-14 07:52:37 +00:00
世界 25d6a21f75 Use configured time and root pool in reality client
The reality session id carried time.Now() instead of the configured
time, which is the NTP clock when ntp is enabled, so a client whose
system clock was off failed every handshake against a server that sets
max_time_difference. The certificate check after a failed
authentication also used the system clock and system roots instead of
the configured clock and certificate store, so it rejected a valid
target and skipped the fallback request.
2026-11-14 07:52:37 +00:00
世界 0a03261e79 Send reality client version 1.8.2
Xray-core v26.7.11 to v26.9.7 refused REALITY clients older than
26.3.27 unless the server set minClientVer, and operators set it to
1.8.2, the version mihomo sends, to let third-party clients connect.
The setting stays after Xray-core dropped that default, and it rejects
sing-box, which sends 1.8.1. The version is only checked against the
server's minClientVer and maxClientVer, and Xray-core never released a
1.8.2, so send the same version as mihomo.
2026-11-14 07:52:37 +00:00
世界 92724ee548 Drop Edge 85 and iOS 14 from random uTLS fingerprint
The random fingerprint picked one of chrome, firefox, edge, safari and
ios per process. Edge 85 and iOS 14 are no longer current browsers and
send no X25519MLKEM768 key share, so a process that picked one of them
failed every REALITY handshake against Xray-core v26.9.8 and later
servers. Pick only from fingerprints of current browsers.
2026-11-14 07:52:37 +00:00
世界 2cd3e2f848 Remove ineffective ALPN override from reality client
BuildHandshakeState already copied the fingerprint's ALPN into the
config, so the loop assigned the extension its own protocols. The
reality ClientHello keeps carrying the fingerprint's ALPN, as in
Xray-core.
2026-11-14 07:52:37 +00:00
世界 39501357a5 Stop removing X25519MLKEM768 from reality ClientHello
Xray-core v26.9.8 and later REALITY servers reject a ClientHello that
has no X25519MLKEM768 key share ahead of X25519 and fall back to the
target, so sing-box reality clients failed against them with "reality
verification failed". Removing the group and share also made the chrome
hello differ from the browser it imitates. Send the fingerprint's key
shares unchanged, as Xray-core does.

The randomized fingerprint picked the X25519MLKEM768 group and key share
with separate coin flips. A group without a share makes post-quantum
preferring servers send a HelloRetryRequest, which uTLS cannot answer
for X25519MLKEM768 and REALITY cannot relay; a share without the group
is rejected by OpenSSL with illegal_parameter. Always offer both.
2026-11-14 07:52:37 +00:00
世界 f2816c2582 Fix sniffed ECH public name overriding DNS mapped domain 2026-11-14 05:28:22 +00:00
世界 dfc2204298 Fix sniffers clearing reverse mapped domain 2026-11-14 04:42:41 +00:00
世界 758708747a Fix dialing IPv6 link-local addresses without zone 2026-11-09 14:37:27 +00:00
世界 e3ca1835ae Rebind interface-bound listeners when the interface is recreated 2026-11-09 13:21:41 +00:00
世界 f989700103 Fix interface binding in network namespaces 2026-11-09 13:21:41 +00:00
世界 ddf3d10b19 Fix disabled UDP domain unmapping ignored by direct outbound 2026-11-09 11:38:26 +00:00
世界 f5e92e18b2 Fix process path of replaced executables on Linux 2026-11-08 11:05:31 +00:00
世界 73698e4374 Update built-in certificates 2026-10-23 20:45:21 +08:00
世界 5372a195b3 Fix URL test failover for routed connections 2026-10-23 19:57:09 +08:00
世界 0164ce7b8e Fix shared connections inheriting external interrupt mark 2026-10-23 19:57:08 +08:00
世界 03335338a0 Fix outbound group resolution and interruption for nested groups 2026-10-23 19:57:08 +08:00
世界 2054998cec Follow resolved address order in parallel dial 2026-10-23 19:57:08 +08:00
世界 8e90fc34e6 Fix network namespace with TCP Fast Open 2026-10-23 19:57:07 +08:00
世界 79d2e8084e Fix Android package name lookup 2026-10-23 19:57:05 +08:00
世界 42f487bd0d Fix IPv6 literal host handling 2026-10-23 19:57:05 +08:00
世界 9c24112d12 Fix unshare network namespace with capabilities 2026-10-23 19:57:05 +08:00
世界 0d264e4ec7 Fix TLS sniffer storing IP literal server names as domain 2026-10-23 19:57:05 +08:00
世界 38bf6879bb Fix network strategy for ICMP 2026-10-23 19:57:04 +08:00
世界 42cae14c63 Fix Apple TLS engine connection leak 2026-10-23 19:57:03 +08:00
世界 9073ef8290 Fix tls spoof raw socket routing on Linux 2026-10-23 19:57:03 +08:00
世界 6564c26d40 Fix IPv6 original destination port on big-endian 2026-10-23 19:57:02 +08:00
世界 a691a44023 Refactor lifecycle to scoped cleanup 2026-10-09 12:36:03 +08:00
世界 a364ff4794 Remove unimplemented hot reload from managers 2026-10-09 12:36:03 +08:00
世界 bff5acf292 Handle connected UDP EOF on BSD 2026-10-09 12:36:03 +08:00
世界 52f9bad034 Fix protocol input validation 2026-10-09 12:36:03 +08:00
世界 07130365d1 Improve idle connection management 2026-10-02 18:00:09 +08:00
世界 eb7deeae8a Improve power report attribution and sampling 2026-10-02 18:00:09 +08:00
世界 fd9a076d25 Close idle connections of unreferenced outbounds and DNS servers 2026-10-02 18:00:09 +08:00
embogomolovand世界 d2cf9747d7 Fix interrupt group holding lock while closing connections 2026-10-02 18:00:09 +08:00
世界 d41e1745e6 Fix UDP fragmentation 2026-10-02 18:00:09 +08:00
世界 17c52d03b3 Fix hysteria2 realm STUN resolution ignoring default domain resolver 2026-09-24 17:23:36 +08:00