Commit graph

274 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
Niko Marmeladkov
da8366eb8a
feat: L3 VPN tunnel, FileMask noise, Hysteria outbound
- Network: Layer 3 IP tunnel over QUIC with TUN interfaces and IP pool
- FileMask: new noise/obfuscation layer masking traffic as encrypted file downloads
- Hysteria outbound: chain Hysteria servers via pluggable outbound
2026-06-16 16:07:55 +03:00
HaizakiKu
4c593412fb
fix(firewall): Fix nftables redirect failure when binding to a specific IPv6 address / 修复 nftables 在绑定特定 IPv6 地址时重定向失效的问题 (#1598)
* fix(firewall): 修复 nftables 在绑定特定 IPv6 地址时重定向失效的问题

* fix(firewall): use DNAT for specific IPv6 bind in iptables port redirect

* chore: format fix

---------

Co-authored-by: Toby <tobyxdd@gmail.com>
2026-06-13 12:17:43 -07:00
Toby
42ebbc5576
feat(realm): add ipMode option to restrict connections to v4 or v6 (#1602)
Adds a new realm "ipMode" config option (v4 | v6 | dual, default dual)
on both client and server that restricts realm connections to a single
IP family end-to-end: the UDP socket is bound to udp4/udp6, STUN only
gathers addresses of that family, and hole punching only tries peer
candidates of that family.
2026-06-13 12:07:05 -07:00
Toby
33bb55a208
feat(realm): UPnP/NAT-PMP port mapping support (#1600) 2026-06-10 18:16:27 -07:00
白日梦主义
8e78342c2b
fix(http): decode proxy Basic auth with standard base64 (#1596)
The HTTP proxy server's dispatch method decodes the Proxy-Authorization
Basic credential using base64.URLEncoding, but RFC 7617 specifies that
Basic authentication uses standard Base64 encoding (base64.StdEncoding).
The two encodings differ in their use of +/ vs -_ characters, so any
credential containing 0xff or other bytes that encode to / or + in
standard Base64 will fail to decode with URLEncoding, causing valid
authentication attempts to always be rejected with 407.

Additionally, the "Basic " scheme prefix check was case-sensitive, but
RFC 7235 section 2.1 specifies that auth-scheme is case-insensitive.

Fix both issues by switching to base64.StdEncoding and using
strings.ToLower for the scheme comparison.
2026-06-04 15:14:58 -07:00
l27001
f4c9de56cc
fix(certloader): add SKI, AKI, KeyUsage extensions to test certs (#1589)
OpenSSL 3.x requires Subject Key Identifier, Authority Key Identifier,
and Key Usage (keyCertSign) extensions for CA certificate chain
validation. The test certificate generator was missing these, causing
test failures on systems with OpenSSL 3.x.

Co-authored-by: Vladislav Tatjanin <l27001@altlinux.org>
2026-06-03 12:52:29 -07:00
Toby
c3a806b5cb
feat: gecko obfs (experimental) (#1584) 2026-05-22 20:35:41 -07:00
Toby
2639b064b8 fix: add "sniGuard: disable" to cert command output 2026-05-10 01:06:05 -07:00
Toby
97a341690a chore: log server address on connect, log realm peer address candidates 2026-05-09 13:24:13 -07:00
Toby
c1868d5c14 feat(realm): STUN on connect 2026-05-08 19:13:20 -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
Lenar Khannanov
fca7ece7b2
fix(app): invalid priority in output hook when setting redirect with nft (#1551)
* fix(app): invalid priority in output hook when setting redirect with nft

Server startup fails with nftables before v1.0.9, as it doesn't support
dstnat mnemonic in the output hook. Work around this by using the raw
number (-100) as recommended by Florian Westphal [1].

1. https://bugzilla.netfilter.org/show_bug.cgi?id=1694#c1

* chore(app): use "-100" instead of "dstnat" for both chains

---------

Co-authored-by: Toby <tobyxdd@gmail.com>
2026-04-22 13:46:59 -07:00
Toby
25a2530ac7 fix: add -w flag to iptables commands and env var for firewall backend 2026-03-30 12:21:04 -07:00
Toby
d08b493ff9 fix: quic-go congestion datagram size panic issue 2026-03-29 22:16:13 -07:00
Toby
6ef838d2c8 feat: port hopping random interval 2026-03-29 14:00:12 -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
Toby
3c9dd620ad
Merge pull request #1459 from latecrown/xforwarded
Add an option to enable XForwarded headers
2026-03-19 13:50:45 -07:00
tobyxdd
4063551f79 chore: rename to xForwarded 2026-03-19 13:49:40 -07:00
tobyxdd
5252803b35 feat: time-based speed test 2026-02-21 17:42:43 -08: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
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
shabbywu(伍镜滔)
e8d99b5c7a refactor: initialize a Viper instance to replace with the global singleton 2026-01-09 13:56:40 +08:00
tobyxdd
6e59b176a6 fix: memory leak in quic-go 2025-10-23 19:49:21 -07:00
latecrown
9801373b46 Add an option to enable XForwarded headers 2025-10-15 03:44:35 +03:00
Toby
2146852c48
Merge pull request #1449 from InvisibleRain/master
Fix the MITM vulnerability
2025-09-29 22:18:46 -07:00
Valeriy Manzhos
9ec5b63386
Fix MITM vulnerability
A malicious actor was capable of intercepting quic traffic between the client
and the server. The attack requires to use certificate pinning with CA-issued certificates.
2025-09-25 17:20:17 +03:00
Haruue
a746ace238
fix(tun): dirty address family block for UDP
ref: apernet/sing-tun#1
2025-09-20 21:21:36 +09: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
Toby
a695a9ce44
Merge pull request #1434 from apernet/wip-replace-doh
fix: remove license-conflicted doh library
2025-09-10 21:36:14 -07:00
Haruue
c6488c21c1
fix: remove license-conflicted doh library 2025-09-10 16:29:48 +09:00
shadow
6cb18ff5ad Add optional mTLS support for client & server 2025-08-27 12:17:24 +08:00
Haruue
bc41b5f5d6
fix(tun): dns error on systemd-resolved 2025-07-26 16:09:14 +09:00
Haruue
7d9a4cc226
fix(tun): blocked on ctx.Done()
close: #1399
2025-07-26 14:24:16 +09:00
Toby
b5ddcb5bc4 feat: quic-go v0.52.0 2025-06-07 11:59:30 -07:00
Haruue
3a9e952af0
fix(client): remove share uri in log
close: #1355

Since we already have the "share" subcommand, this feature is
unnecessary for the "client" subcommand.

This commit disables printing the share URI after the client starts, but
keeps this behavior for users who specified the `--qr` flag (who may
still rely on it) and shows a deprecation warning.
2025-05-27 18:27:54 +09: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
Toby
ffab01730a chore: add LICENSE to packages 2025-03-18 20:44:59 -07:00
Toby
401ed5245d
Merge pull request #1306 from apernet/wip-userpass-ignore-case
Make username of userpass case insensitive
2025-02-03 18:05:27 -08:00