Commit Graph
124 Commits
Author SHA1 Message Date
世界 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
世界 42f487bd0d Fix IPv6 literal host handling 2026-10-23 19:57:05 +08:00
世界 42cae14c63 Fix Apple TLS engine connection leak 2026-10-23 19:57:03 +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
世界 60f0a0369b Fix half-close not propagating through connection wrappers 2026-09-20 22:24:38 +08:00
世界 b9572e5812 Fix start lifecycle 2026-08-30 17:41:43 +08:00
世界 0a4e4c8061 boxdd: Add insecure mode 2026-08-30 17:41:43 +08:00
世界 154d74b7a0 tls: Fix read wait buffer sizing 2026-08-30 17:41:41 +08:00
世界 704853b3be Fix lint errors 2026-08-30 17:41:40 +08:00
世界 9895d60484 Fix TLS server close 2026-08-30 17:41:40 +08:00
macronutand世界 d9290bc940 Add more spoof method
Signed-off-by: macronut <4027187+macronut@users.noreply.github.com>
2026-08-30 17:41:40 +08:00
nekohasekai 9471dde765 Add Windows TLS engine 2026-08-30 17:41:40 +08:00
世界 7963713314 Add ACME profile support for IP address certificates 2026-08-30 17:41:40 +08:00
世界 a33858523f Fix tls-spoof 2026-08-30 17:41:40 +08:00
世界 9bcc0f1d37 Fix Apple TLS metadata capture 2026-08-30 17:41:40 +08:00
世界 2ddfecb47a Reject IP literal server name with TLS spoof 2026-08-30 17:41:39 +08:00
世界 40e2b5fd4b Add TLS spoof support 2026-08-30 17:41:39 +08:00
世界 2515811356 Refactor: HTTP clients, unified HTTP2/QUIC options, Apple engines 2026-08-30 17:41:39 +08:00
nekohasekai 01b3d19d6d Refactor ACME support to certificate provider 2026-08-30 17:41:38 +08:00
世界 1f1d6d9a87 Fix string type 2026-07-27 15:51:12 +08:00
世界 5e7fd7ad78 Fix lint errors 2026-05-13 23:39:27 +08:00
世界 8ae93a98e5 Remove overdue deprecated features 2026-03-01 12:30:43 +08:00
BalthildandGitHub 60a1e4c866 Add acmedns support 2026-01-17 20:52:43 +08:00
世界 ddec2ab282 Update dependencies 2026-01-17 05:48:15 +08:00
世界 0585f6d065 Add ECH support for NaiveProxy outbound and tls.ech.query_server_name option
- Enable ECH for NaiveProxy outbound with DNS resolver integration
- Add query_server_name option to override domain for ECH HTTPS record queries
- Update cronet-go dependency and remove windows_386 support
2026-01-17 05:47:42 +08:00
世界 3dc285be8c Fix missing mTLS support in client options 2026-01-17 05:46:23 +08:00
世界 79bbce3db3 Add curve preferences, pinned public key SHA256 and mTLS for TLS options 2026-01-17 05:46:22 +08:00
世界 9ac0539ffd Remove compatibility codes 2026-01-17 05:46:14 +08:00
世界 e9c46cc359 Improve compatibility for kTLS 2026-01-17 05:46:00 +08:00
世界 9110851af3 ktls: Add warning for inappropriate scenarios 2026-01-17 05:44:43 +08:00
世界 107f92381b Add support for kTLS
Reference: https://gitlab.com/go-extension/tls
2026-01-17 05:44:42 +08:00
世界 fecdbf20de Fix ECH retry support 2026-01-17 05:44:26 +08:00
neletorand世界 1f03080540 Add support for ech retry configs 2026-01-17 05:44:26 +08:00
世界 41b30c91d9 Improve HTTPS DNS transport 2025-10-09 23:45:23 +08:00
世界 146383499e Fix race codes 2025-09-12 21:58:48 +08:00
世界 e81a76fdf9 Fix DNS exchange 2025-09-12 18:05:02 +08:00
世界 1468d83895 Make realityClientConnWrapper replaceable 2025-08-20 16:26:27 +08:00
wwqgtxxand世界 83f02d0bfb Make utlsConnWrapper replaceable 2025-08-20 08:45:09 +08:00
wwqgtxxand世界 52fa5f20a3 Make realityConnWrapper replaceable 2025-08-20 08:45:09 +08:00
世界 378e39f70c Update golangci-lint to v2 2025-08-13 23:37:40 +08:00
世界 a11384b286 Fix time service wrapper 2025-07-24 09:21:08 +08:00
dyhkwongand世界 9dd9fb27cd Fix disable_sni nil time func 2025-07-24 09:21:08 +08:00
世界 0f2035149c Remove dependency on circl 2025-07-23 11:26:06 +08:00
dyhkwongand世界 687343f6ca Fix disable_sni not working with custom RootCAs 2025-07-22 19:20:09 +08:00