Commit Graph
34 Commits
Author SHA1 Message Date
Mxmilu666andClaude Opus 5.5 ae7135ab64 feat(tls): reassemble hello messages split across TLS records
A handshake message may span any number of records, and splitting the
ClientHello into tiny records hides the SNI from analyzers that expect it
in the first one. The tls analyzer read the first record header and then
cut the handshake body straight out of the stream, so fragmented hellos
either stalled until Limit() or failed to parse, and every SNI rule was
bypassed.

The record layer is now peeled off and the hello rebuilt from the record
bodies before parsing, for both ClientHello and ServerHello. The number of
records a hello spanned is exposed as tls.req_records / tls.resp_records,
kept outside req/resp so a non-nil req still means a fully parsed hello.
Fragmentation is published as soon as a second record shows up, since
1-byte records can stretch a hello past Limit() and it never completes.

docs: add TLS record fragmentation doc, correct the claim in the TCP
window evasion doc that tls is unaffected by splitting.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-09-24 17:31:57 +08:00
Mxmilu666andClaude Fable 5.1 cc6ad72706 feat(udp): add EasyTier analyzer for tcp:// and udp:// transports
Port of NoBrand-Cloud/OpenGFW-RS commit 1177ff7 to Go.

EasyTier's ciphers cover only the payload: the 16-byte PeerManagerHeader
stays in the clear, so peer ids, packet type and two redundant length
fields are readable even on an encrypted mesh. The plaintext handshake
also carries the network name, which lets a rule block one mesh and
leave the rest alone (easytier.network_name). A Syn answered by a Sack
echoing the same connection id and magic, or a handshake carrying the
0xd1e1a5e1 magic, settles a flow on its own; otherwise two consistent
frames are required. Hole-punch probes are reported but never set yes.

The wg://, quic:// and wss:// transports are left to the wireguard, quic
and tls analyzers. fet does not cover the tcp:// transport because it
classifies the plaintext handshake segment and is then done.

Rules must be written as `easytier != nil && ...`: the rule engine only
exposes analyzers that have published properties.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RjQ1CTBn8j65cUZ2JKsY7L
2026-09-12 17:05:39 +08:00
Mxmilu666 f6342c4bcf feat(tcp): add Minecraft analyzer for handshake detection
feat(tcp): implement FETAnalyzer with segment buffering
feat(tcp): enhance TCP engine with window scale detection
test(tcp): add tests for Minecraft and FET analyzers
docs: add documentation for Minecraft analyzer and TCP evasion
2026-07-27 01:09:41 +08:00
Toby dd9ecc3dd7 docs: update readme feature list 2024-04-01 21:49:06 -07:00
Toby 0735fa831d docs: move to website 2024-03-29 13:06:29 -07:00
Toby 4e604904af docs: update dependency install command for openwrt 2024-03-24 11:41:17 -07:00
Toby 57c818038c feat: io tcp reset support (forward only) 2024-03-20 19:01:26 -07:00
TobyandGitHub f3b72895ad Merge pull request #106 from apernet/wip-new-trojan
feat: new heuristics for trojan analyzer
2024-03-20 18:11:09 -07:00
Toby 0732dfa7a5 docs: no longer use trojan-killer 2024-03-20 18:10:22 -07:00
macie ede70e1a87 docs: Fix badge URL 2024-03-14 08:06:27 +01:00
macie d98136bac7 ci: Add quality check
Runs tests and linters after each commit.
2024-03-11 22:19:26 +01:00
Haruue e77c2fabea docs: instruction for OpenWrt 22.02 or earlier 2024-03-09 21:42:49 +08:00
Toby 50cc94889f feat: netlink rcv/snd buffer config options 2024-02-28 17:45:24 -08:00
Toby 531a7b0ceb chore: update gfw report links 2024-02-26 15:17:07 -08:00
TobyandGitHub 8b07826de6 Merge pull request #71 from apernet/wip-log
feat: logging support in ruleset
2024-02-23 19:51:18 -08:00
Toby 182a6cf878 chore: better README 2024-02-23 15:43:08 -08:00
Toby ed9e380a57 fix: variable support & update example in doc 2024-02-23 14:37:05 -08:00
Toby f598cb572d docs: add telegram group link 2024-02-17 22:34:38 -08:00
TobyandGitHub e177837301 Merge branch 'master' into wip-quic 2024-02-17 14:38:19 -08:00
ebff4308e4 Add CIDR support for expr (#62)
* feat: add cidr support for expr

* docs: add example for cidr

* minor code tweaks

---------

Co-authored-by: Toby <tobyxdd@gmail.com>
2024-02-17 14:21:12 -08:00
94cfe7b2c1 Add the configuration for the path of geoip and geosite. (#57)
* Update README.md

* Update README.zh.md

* Update README.ja.md

* minor tweaks

---------

Co-authored-by: Toby <tobyxdd@gmail.com>
2024-02-17 14:03:50 -08:00
Toby ef352450a2 docs: add QUIC 2024-02-17 13:56:33 -08:00
TobyandGitHub 7a52228ec6 docs: add a section about openwrt (#53) 2024-02-11 13:12:49 -08:00
TobyandGitHub f8f0153664 feat: rules hot reload via SIGHUP (#44) 2024-02-03 10:55:20 -08:00
8d94400855 Add WireGuard analyzer (#41)
* feat: add WireGuard analyzer

* chore(wg): reduce map creating for non wg packets

* chore: import format

* docs: add wg usage

---------

Co-authored-by: Toby <tobyxdd@gmail.com>
2024-01-30 18:05:51 -08:00
f07a38bc47 Add GeoIP and GeoSite support for expr (#38)
* feat: copy something from hysteria/extras/outbounds/acl

* feat: add geoip and geosite support for expr

* refactor: geo matcher

* fix: typo

* refactor: geo matcher

* feat: expose config options to specify local geoip/geosite db files

* refactor: engine.Config should not contains geo

* feat: make geosite and geoip lazy downloaded

* chore: minor code improvement

* docs: add geoip/geosite usage

---------

Co-authored-by: Toby <tobyxdd@gmail.com>
2024-01-30 17:30:35 -08:00
Toby e23f8e06a2 docs: add socks4 2024-01-27 13:58:35 -08:00
Toby 3367cccf8c docs: update socks rules 2024-01-27 13:56:08 -08:00
Toby a2475d3722 fix: remove "reject with tcp reset" for now as it doesn't work properly 2024-01-27 13:27:27 -08:00
Toby 90542be7f2 docs: add SOCKS5 2024-01-26 14:03:22 -08:00
Toby d7d3437d3c docs: analyzers 2024-01-24 20:01:53 -08:00
Toby 7441d24aea docs: trivial updates 2024-01-21 16:11:01 -08:00
Toby 1041d5fde1 feat: Trojan analyzer based on github.com/XTLS/Trojan-killer 2024-01-21 14:48:54 -08:00
Toby 4f86f91a15 first 2024-01-19 16:45:01 -08:00