wwqgtxx
4aa9cc17fc
chore: avoid redundant select calculations in DomainSet
...
Once the key is exhausted, a terminal node completes the match; otherwise only saved wildcard branches can still succeed. No input remains to match the current node's child edges, so their starting position is unnecessary.
Defer the child-edge select in Has until more input needs matching, both after matching a byte and when restoring a wildcard. Keep the node-terminator select needed to resume saved wildcard branches.
Earlier candidate benchmarks show median query times ~3%/~1% lower for short/long queries and ~11%/~8% lower for exact/mixed-rule workloads, with no additional allocations or changes to the index layout.
2026-09-10 09:25:15 +08:00
wwqgtxx
8e2f18a1a9
chore: avoid redundant rank calculations in DomainSet
...
Child edges are 0 bits and each node ends with a 1 bit in labelBitmap. An edge of nodeId has exactly nodeId preceding 1 bits, so its label index is bmIdx - nodeId. Child nodes follow the same order as labels, starting at 1 because node 0 is the root. Therefore, the child node ID is bmIdx - nodeId + 1.
Use this identity in Has and keys instead of countZeros. Keep rank for wildcard restoration, where the cursor lacks the parent node ID.
Existing short/long query benchmarks take ~12%/~11% less time, with no additional allocations or changes to the index layout.
2026-09-10 09:04:52 +08:00
wwqgtxx
5f9510988c
fix: DomainSet wildcard matching with overlapping rules
...
These queries now correctly return true:
- Query: a.example.com
Rules: [*.example.com, dead.a.example.com]
- Query: b.a.example.com
Rules: [*.*.example.com, dead.*.a.example.com, dead.b.a.example.com]
- Query: b.c.a.example.com
Rules: [*.*.*.example.com, *.a.example.com]
2026-09-10 08:19:36 +08:00
NuoFang
a91201f1fc
fix: correct android amd64 core asset name in updater ( #3167 )
2026-09-08 14:22:19 +08:00
wwqgtxx
bbb8cb924b
chore: add standalone DomainSetBuilder
2026-09-08 10:27:49 +08:00
wwqgtxx
2f7eae5a26
chore: report detailed errors for invalid Clash-style domain patterns
2026-08-17 09:35:10 +08:00
Ember Moth
26c635f69b
chore: avoid string reversal allocation in DomainSet.Has ( #3049 )
2026-07-30 15:25:45 +08:00
TWO666
9574a46c32
fix: truncate udp dns replies to the client's advertised buffer size ( #3043 )
2026-07-29 08:54:18 +08:00
wwqgtxx
94a89fb70f
chore: reject oversized sniff reads before filling the buffer
2026-07-28 22:53:06 +08:00
wwqgtxx
669db1ba22
chore: harden QUIC Initial packet processing
2026-07-28 22:45:59 +08:00
wwqgtxx
63f15f2d46
fix: keep connections open after initial sniffing failures
2026-07-28 22:11:26 +08:00
wwqgtxx
ea9c544e04
fix: avoid unnecessary waits in TLS and QUIC sniffing
2026-07-28 22:03:52 +08:00
wwqgtxx
8d1b66166d
fix: avoid unnecessary waits in HTTP/2 sniffing
2026-07-28 22:03:52 +08:00
wwqgtxx
f83a072187
fix: let QUIC sniffer handle Retry key changes
2026-07-28 20:25:22 +08:00
wwqgtxx
f298cd2e96
fix: normalize HTTP hosts and avoid unnecessary sniffing delays
2026-07-28 20:12:20 +08:00
wwqgtxx
c1603f4d90
fix: coordinate TCP sniffers on overlapping ports
2026-07-28 19:18:00 +08:00
wwqgtxx
efd63d8746
chore: extract bitmap handling from QUIC crypto reassembly
2026-07-28 18:26:08 +08:00
wwqgtxx
4fcf9aedea
fix: track QUIC crypto stream coverage without repeated range sorting
2026-07-28 17:24:59 +08:00
wwqgtxx
c807c9a040
chore: let the HTTP/2 sniffer assemble header blocks across continuation frames
2026-07-28 17:24:52 +08:00
wwqgtxx
4859d14254
chore: let quic sniffer handle coalesced packets and larger client hello
2026-07-28 16:40:58 +08:00
wwqgtxx
c235dc18cd
chore: let the sniffer assemble client hello across TLS records
2026-07-28 16:00:56 +08:00
wwqgtxx
2bade2940a
chore: allow the sniffer to read more data if possible
2026-07-28 15:10:05 +08:00
wwqgtxx
cb8e9900f6
chore: let sniffer support multi-round reading
2026-07-28 10:32:18 +08:00
Kosta
e889b68955
feat: support H2C and QUICv2 sniffing ( #3036 )
2026-07-28 08:44:16 +08:00
TWO666
fb002210ff
fix: tun dns hijack sending zero-filled or stale packets when PackBuffer reallocates ( #3037 )
...
D.Msg.PackBuffer sizes its scratch space by the uncompressed message length
and silently allocates a new slice when that exceeds the given buffer, even
though the compressed result would fit. The udp hijack path in
listener/sing_tun/dns.go always sends the original buffer, producing a
correct-length datagram full of zeros or stale bytes whenever a reply's
uncompressed size exceeds SafeDnsPacketSize (e.g. 100+ A records for one
name). Copy the packed result back into the caller's buffer when it fits.
The tcp path in RelayDnsConn already guards against this; the udp path did
not.
2026-07-27 13:03:03 +08:00
wwqgtxx
6bb8b98314
chore: strictly verify the syntax for Clash-style domain wildcards
2026-07-26 13:13:59 +08:00
wwqgtxx
5677fd3808
feat: add name-cert-verify to support separate certificate verification name
2026-07-12 18:12:59 +08:00
kasumikira
26edbaae0b
fix: dualStackDialContext not close the fallback connection when the preferred IP family won
2026-06-30 18:56:53 +08:00
wwqgtxx
1095055136
chore: upgrade bbolt to 1.5.0
2026-06-28 22:46:16 +08:00
wwqgtxx
da28fe33c8
chore: more code sharing
2026-06-12 15:43:17 +08:00
wwqgtxx
d67572bbae
feat: support routing-mark for listeners except tun/redir/tproxy and top-level external-controller-routing-mark
2026-06-12 10:05:53 +08:00
Guanni Qu
11848509fb
fix: quic sniffer out-of-bounds read causes process crash via single UDP packet
2026-06-06 01:03:54 +08:00
wwqgtxx
e928ef59c1
feat: add path-in-bundle to rule-providers to support extract from BundleMRS.7z when the local file does not exist
2026-06-05 12:13:12 +08:00
wwqgtxx
f99d4e1be6
chore: adjust internal age component api
2026-06-04 09:30:58 +08:00
wwqgtxx
b60e687eb7
chore: support convert age-secret-key to age-public-key for build-in age tool
2026-06-03 16:15:02 +08:00
wwqgtxx
316f5df1f1
chore: add WithDialer option to component/http for api user
2026-06-03 12:25:51 +08:00
wwqgtxx
d7ac7b5239
chore: support std input/output for age encrypt/decrypt tool
2026-06-03 12:25:37 +08:00
wwqgtxx
358fa5eb24
feat: add age-secret-key for proxy-provider and -age-secret-key for cmdline to support age armor format config decryption
2026-06-03 11:53:58 +08:00
wwqgtxx
bd72c65b5e
feat: remove global-client-fingerprint, please set client-fingerprint directly on the proxy instead
2026-06-02 10:40:38 +08:00
wwqgtxx
72f133f4bd
chore: more logging for tailscale debug
2026-05-21 09:54:07 +08:00
wwqgtxx
a2aca027e4
fix: pinger in tailscale not under our control
2026-05-20 09:33:22 +08:00
wwqgtxx
a05c94b4ad
chore: make the proxydialer module no longer directly depend on the tunnel module
2026-05-17 21:55:16 +08:00
wwqgtxx
802b0b2449
fix: netlink permission denied on android for tailscale
2026-05-15 14:46:03 +08:00
xream
8a28dce512
fix: validate Linux process netlink matches
2026-05-15 08:41:02 +08:00
wwqgtxx
e933ca82d9
fix: netlink permission denied on android for tailscale
2026-05-14 22:22:14 +08:00
wwqgtxx
faa58f27fc
chore: add some comments for using the new net/http API
2026-05-12 09:57:25 +08:00
wwqgtxx
95946a5fb2
fix: net/http.Transport's UnencryptedHTTP2 does not work TLS without ALPN
2026-05-09 11:50:15 +08:00
wwqgtxx
028b480ae6
chore: remove unused http server code
2026-05-08 15:47:39 +08:00
wwqgtxx
a1c68a4346
chore: using new net/http api in reality client fallback
2026-05-07 18:47:54 +08:00
wwqgtxx
2f51cb0330
fix: conn maybe not closed in error handling
2026-05-07 09:54:00 +08:00