Commit graph

173 commits

Author SHA1 Message Date
Niko Marmeladkov
1e77bbe7b7
feat: TLS 1.3 mimicry obfuscation, multi-mode (auto + plain), session recreation
Some checks are pending
Build master branch / build (push) Waiting to run
Tests / Test (push) Waiting to run
- tlsmimic: wrap QUIC packets in TLS 1.3 record headers
- multi: auto-detect Salamander/TLS-mimic/plain on the same port
- multi: random padding and jitter support for DPI evasion
- reconnect: periodic session recreation via MaxSessionDuration
- client/server: wire tlsmimic/auto/plain obfs types and config
- NEW_FEATURES: translated to English
2026-06-17 16:36:29 +03:00
Toby
2412f23646
Merge commit from fork
The UDP relay treated the destination address as packet-scoped while
applying ACL/outbound policy only once when a new session was created.
After an authenticated client opened a UDP session using a permitted
first destination, later packets carrying a different Addr in the same
SessionID were written via the established outbound socket without
re-checking policy, allowing the client to reach destinations that ACL
should reject — including localhost and RFC1918 from the server's
network perspective. See GHSA-vgrc-hq28-p3xp.

Add a no-I/O CheckUDP method to the Outbound / PluggableOutbound
chain. The UDP session entry now consults CheckUDP for every packet
whose destination differs from the session's first one, dropping
rejected packets before WriteTo. Decisions are cached per destination
within the session (bounded at 256 entries with simple eviction) so
steady-state cost is one map lookup per packet and no extra sockets
or dials. CheckUDP propagates through the existing chain:

  - aclEngine routes through the matched outbound's CheckUDP, with
    aclRejectOutbound returning the rejection error.
  - directOutbound / socks5Outbound / speedtestHandler return nil.
  - httpOutbound returns errHTTPUDPNotSupported.
  - Resolvers (system / dot / doh) run resolve() then forward to
    Next.CheckUDP so IP-based ACL rules keep matching.

Regression tests in core/internal/integration_tests/udp_acl_test.go
use an in-package stub Outbound to assert that a rejected destination
is not relayed after the session is opened on a permitted one, and
that multi-destination sessions over permitted addresses still work.

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 14:09:41 -07:00
白日梦主义
d6f24e13d7
Merge commit from fork
Signed-off-by: Cherrling <me@cherr.cc>
2026-05-21 13:11:40 -07:00
prudhvi
0e2b37ad6c
Reuse 32KB buffers in copyBufferLog with sync.Pool (#1572)
* Bolt: Reuse 32KB buffers in copyBufferLog with sync.Pool

Delete .jules directory

* Add benchmark test for copyBufferLog function
2026-05-15 22:19:36 -07:00
Toby
97a341690a chore: log server address on connect, log realm peer address candidates 2026-05-09 13:24:13 -07:00
Toby
93f68c526b
feat: Hysteria Realms (#1560)
* feat(wip): hysteria realms

* feat: port prediction for punching symmetric NAT

* feat: add "cert" subcommand for easy self signed cert generation

* refactor: update address scheme from "hysteria2+realm" to just "realm"

* fix: give up on realm register fatal errors

* chore: update formatting (gofumpt)

* perf: realm proxy UDP methods on PunchPacketConn so quic-go and obfs keep DF/PMTU and buffer sizing

* feat: add support for local UDP source port config in realm addresses

* doc: README for realm pkg
2026-05-08 14:16:21 -07:00
Toby
697203f49d feat: omit datagram TP 2026-04-25 17:07:05 -07:00
Toby
6476d21c59
feat: client & server use quic.Transport (#1550) 2026-04-21 14:02:37 -07:00
Toby
d08b493ff9 fix: quic-go congestion datagram size panic issue 2026-03-29 22:16:13 -07:00
Toby
14500fdb40 ci: test workflow 2026-03-29 14:52:14 -07:00
Toby
5fd6d4d887 feat: server side UDP port range listening (nftables/iptables) 2026-03-29 11:47:09 -07:00
Toby
b3f2193f10 feat: add configurable congestion modes and BBR profiles 2026-03-28 13:11:17 -07:00
Toby
61c75a260f fix: BBR scale window for datagram size 2026-03-27 18:13:57 -07:00
tobyxdd
18960685d3 Merge remote-tracking branch 'origin/master' into refactor/app-client 2026-02-21 17:14:47 -08:00
tobyxdd
dd913426c5 chore: code tweaks 2026-02-21 17:07:28 -08:00
tobyxdd
ea2e858c06 chore: bump cobra & viper versions 2026-02-21 17:03:34 -08:00
Hari
6da70e80aa
fix: consume TCP request frame type with StreamDispatcher 2026-02-18 10:18:52 +08:00
tobyxdd
aa2768627c fix: apernet/quic-go go mod tag ref 2026-02-17 12:16:26 -08:00
Hari
275bcccaa4
feat: quic-go v0.59.0 2026-02-17 17:37:20 +08:00
tobyxdd
f68d036bff feat: migrate to new monotime congestion interface 2026-01-11 11:06:12 -08:00
tobyxdd
9efcdef6e9 feat: quic-go v0.57.1 2026-01-10 12:32:34 -08:00
tobyxdd
4bf55a99ed fix: logic issues with BBR impl 2025-12-29 19:24:30 -08:00
tobyxdd
6e59b176a6 fix: memory leak in quic-go 2025-10-23 19:49:21 -07:00
tobyxdd
7d727cfeaa chore: update Go version to 1.25 in workflows and go.mod files 2025-09-13 16:22:21 -07:00
tobyxdd
44235d3de9 feat: quic-go v0.54.0 2025-09-13 16:17:59 -07:00
tobyxdd
36370ffbbb fix: race in udpSessionManager cleanup & update code formatting (gofumpt) 2025-09-11 20:14:41 -07:00
shadow
6cb18ff5ad Add optional mTLS support for client & server 2025-08-27 12:17:24 +08:00
Toby
b5ddcb5bc4 feat: quic-go v0.52.0 2025-06-07 11:59:30 -07:00
Toby
b2567df63c
Merge pull request #1347 from apernet/bump-quic
feat: quic-go v0.51.0
2025-04-20 14:29:31 -07:00
Toby
c2c4a9545e fix: broken cc after connection migration 2025-04-20 14:27:45 -07:00
Toby
29cd04fdef feat: quic-go v0.51.0 (wip) 2025-04-20 14:04:53 -07:00
dropbigfish
5239a23aee chore: fix function name in comment
Signed-off-by: dropbigfish <fillfish@foxmail.com>
2025-04-20 12:06:13 +08:00
Toby
ffab01730a chore: add LICENSE to packages 2025-03-18 20:44:59 -07:00
Toby
e11ad2b93b feat: quic-go v0.49.0 2025-02-03 18:04:17 -08:00
Toby
8aa80c233e fix: rename insecureSkipVerify to insecure for consistency 2024-12-29 11:25:08 -08:00
Toby
5e11ea18fb chore: update core/go.mod 2024-12-10 22:42:25 -08:00
Toby
3e8c20518d chore: minor code tweaks 2024-11-08 14:29:50 -08:00
Toby
9cb8cb4f53 Merge branch 'master' into wip-dumpstream 2024-11-08 14:15:11 -08:00
Haruue
7ac8d87dda
test: fix integration_tests for trafficlogger 2024-11-08 16:03:48 +09:00
Haruue
0681638568
feat(trafficlogger): dump streams stats 2024-11-08 15:28:50 +09:00
Toby
04cf6f2e1a feat: quic-go v0.48.1 2024-11-04 11:32:58 -08:00
Toby
b960beabbd
Merge pull request #1216 from apernet/bump-quic
feat: quic-go v0.47.0
2024-10-04 22:33:56 -07:00
Haruue
1001b2b1ad
chore: fix comments 2024-10-05 10:23:43 +08:00
Toby
ef6da94927 feat: quic-go v0.47.0 2024-10-04 11:21:30 -07:00
Toby
b3116c6268 feat: update TestUDPSessionManager to cover the fragmented msg hook 2024-10-04 10:47:41 -07:00
Toby
947701897b fix: TestClientServerHookUDP 2024-10-04 10:29:25 -07:00
Haruue
4e2f138008
chore: fix comments 2024-10-04 16:57:32 +08:00
Haruue
dc023ae13a
fix: udpSessionManager.mutex reentrant by cleanup 2024-10-04 16:33:41 +08:00
Haruue
931fc2fdb2
chore: replace guard routine with CloseWithErr() 2024-10-04 11:27:36 +08:00
Haruue
4ecbd57294
fix: quic sniff not work if udp msg fragmentated 2024-09-22 22:53:47 +08:00