48 Commits
Author SHA1 Message Date
eries 9a146ed7de test(udp): prove shared-source full-cone through the real kernel path 2026-10-20 05:34:53 +11:00
eries 6b192defb1 build(deps): bump the quinn fork to the receive window autotune 2026-10-07 22:50:23 +11:00
eries 8221837458 test(vless): count Encryption frame allocations instead of comparing addresses 2026-10-07 22:36:08 +11:00
Zakk baa0a527a5 perf(native-ui): embed UI text precompressed and negotiate its encoding 2026-10-07 22:36:04 +11:00
eries 8c166f0706 perf(core): purge freed mimalloc pages after 100 ms 2026-10-07 22:35:16 +11:00
Zakk 870928d4b7 test(native-api): validate responses against the bundled OpenAPI 2026-10-07 22:24:42 +11:00
eriesandZakk 5640886704 build(deps): add the native-api and native-ui features
Co-authored-by: Zakk <zakk@gentoozh.org>
2026-10-07 21:56:12 +11:00
M0re Co1ors 72d7c7f01d feat(outbound): add H2 XHTTP transport for Trojan, VMess and VLESS (#315)
* feat(config): admit XHTTP as a stream transport

* feat(outbound): add H2 XHTTP transport for Trojan, VMess and VLESS

* fix(config): require canonical H2 ALPN at XHTTP admission

* fix(config): repin conformance fences after the XHTTP node reference

* test(core): cover the new XHTTP record rejection guards

* fix(outbound): complete stream-up shutdown at upload EOF

* fix(outbound): replace the Referer query with the generated padding

* fix(outbound): escape configured XHTTP paths like Xray

* test(outbound): drop the XHTTP direct-TLS setup test that pins no XHTTP behavior

* fix(outbound): publish draining prepared carriers at winner commit

* fix(outbound): defer XHTTP carrier commit for speculative VLESS H2 UDP

* fix(outbound): warm the H2 mux pool for XHTTP session requirements

* fix(outbound): release dead private carriers during XHTTP preparation

* fix(outbound): surface ready upload errors before stream-up shutdown completes

* docs(outbound): record XHTTP ownership and bounds

* fix(outbound): retain reset XHTTP streams until in-flight frames drain

* fix(outbound): flush VMess uploads only when input is drained

* fix(xhttp): batch packet uploads across flush calls

* fix(xhttp): drain unusable reserved upload carriers

* test(xhttp): consolidate path and refusal coverage

* test(session): remove mirrored carrier publication tests

* fix(session): publish excess detached winners drain-only

* test(outbound): streamline profile and capacity regressions

* fix(config): preserve legacy transport export options

* fix(config): accept XHTTP URI exporter metadata

* fix(config): parse v2rayN XHTTP mode and ALPN

* fix(config): honor XHTTP extra request fallbacks

* fix(config): admit escaped literal XHTTP paths

* fix(config): include XHTTP in transport diagnostics

* test(config): merge overlapping XHTTP admission cases

* refactor(config): normalize XHTTP ALPN in place

* fix(config): ignore VMess JSON certificate verification flags for XHTTP

* refactor(vless): share the boxed carrier start path

* refactor(xhttp): merge streaming upload modes

* fix(xhttp): confirm the first packet-up flush against its POST

* fix(xhttp): recheck flow errors before sending a paced batch

* fix(config): bound the XHTTP path length at admission

* docs(xhttp): list XHTTP in the Trojan and VMess node rows

* docs(agents): scope the eight-response packet-up bound to a flow

* test(tool): rederive the node ID before the XHTTP mux rejection case

* fix(xhttp): confirm the first datagram against its POST

* fix(xhttp): rebind replacement dials to the published owner

* refactor(xhttp): drop the pass-through upload constructors

* refactor(runtime): rebind pooled admission through the lifecycle traversal

* refactor(config): share the XHTTP ALPN list normalization

* test(config): repin the zh configuration conformance fences
2026-10-07 18:46:53 +08:00
dependabot[bot] c1594e9e4b chore(deps): bump the minor-and-patch group across 2 directories with 8 updates (#308)
Bumps the minor-and-patch group with 8 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [thiserror](https://github.com/dtolnay/thiserror) | `2.0.20` | `2.0.21` |
| [hyper](https://github.com/hyperium/hyper) | `1.11.0` | `1.11.1` |
| [hyper-util](https://github.com/hyperium/hyper-util) | `0.1.20` | `0.1.21` |
| [clap](https://github.com/clap-rs/clap) | `4.6.6` | `4.6.7` |
| [tokio-rustls](https://github.com/rustls/tokio-rustls) | `0.26.5` | `0.26.6` |
| [rustls-platform-verifier](https://github.com/rustls/rustls-platform-verifier) | `0.7.0` | `0.7.1` |
| [rand](https://github.com/rust-random/rand) | `0.10.2` | `0.10.3` |
| [lru](https://github.com/jeromefroe/lru-rs) | `0.18.4` | `0.18.5` |

Bumps the minor-and-patch group with 1 update in the /crates/honk-ebpf directory: [thiserror](https://github.com/dtolnay/thiserror).


Updates `thiserror` from 2.0.20 to 2.0.21
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/2.0.20...2.0.21)

Updates `hyper` from 1.11.0 to 1.11.1
- [Release notes](https://github.com/hyperium/hyper/releases)
- [Changelog](https://github.com/hyperium/hyper/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/hyper/compare/v1.11.0...v1.11.1)

Updates `hyper-util` from 0.1.20 to 0.1.21
- [Release notes](https://github.com/hyperium/hyper-util/releases)
- [Changelog](https://github.com/hyperium/hyper-util/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/hyper-util/compare/v0.1.20...v0.1.21)

Updates `clap` from 4.6.6 to 4.6.7
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/main/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.6.6...clap_complete-v4.6.7)

Updates `tokio-rustls` from 0.26.5 to 0.26.6
- [Release notes](https://github.com/rustls/tokio-rustls/releases)
- [Commits](https://github.com/rustls/tokio-rustls/compare/v/0.26.5...v/0.26.6)

Updates `rustls-platform-verifier` from 0.7.0 to 0.7.1
- [Release notes](https://github.com/rustls/rustls-platform-verifier/releases)
- [Changelog](https://github.com/rustls/rustls-platform-verifier/blob/main/CHANGELOG)
- [Commits](https://github.com/rustls/rustls-platform-verifier/compare/v/0.7.0...v/0.7.1)

Updates `rand` from 0.10.2 to 0.10.3
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-random/rand/compare/0.10.2...0.10.3)

Updates `lru` from 0.18.4 to 0.18.5
- [Changelog](https://github.com/jeromefroe/lru-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jeromefroe/lru-rs/compare/0.18.4...0.18.5)

Updates `thiserror` from 2.0.20 to 2.0.21
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/2.0.20...2.0.21)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-version: 2.0.21
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: hyper
  dependency-version: 1.11.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: hyper-util
  dependency-version: 0.1.21
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: clap
  dependency-version: 4.6.7
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: tokio-rustls
  dependency-version: 0.26.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: rustls-platform-verifier
  dependency-version: 0.7.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: rand
  dependency-version: 0.10.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: lru
  dependency-version: 0.18.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: thiserror
  dependency-version: 2.0.21
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-02 13:33:36 +08:00
M0re Co1ors 7ef8a339f1 feat(vless): Vision uplink padding, uplink Direct and splice handover (#304)
* feat(vless): pad Vision uplink and switch it to Direct

* perf(relay): splice Vision carriers once both directions are Direct

* test(vless): run the official Vision interop case weekly

* docs(vless): document Vision uplink support

* fix(pr-304): refresh node documentation conformance ranges

* fix(pr-304): fall back when splice capability probes are denied

* docs(pr-304): clarify conditional Vision Direct transitions

* refactor(pr-304): stack-pin the shared copy futures

* refactor(pr-304): bound random Direct write buffers

* docs(pr-304): correct Vision and splice termination invariants

* test(pr-304): reserve matching bootstrap DNS listeners
2026-09-30 09:46:15 +08:00
M0re Co1ors 5efb8c5a48 feat(routing): apply configurable socket and direct routing marks (#295)
* feat(routing): apply configurable socket and direct routing marks

* feat(core): download subscriptions and UI over marked sockets
2026-09-26 09:32:24 +08:00
M0re Co1ors c38871c5ca feat(vless)!: align UDP multiplexing and harden outbound boundaries (#246)
* fix(vless): align default UDP selection with Xray

* feat(vless): separate UDP encoding and multiplex ownership

* fix(shadowsocks): preserve UDP buffers and replay state

* refactor(outbound): simplify ownership and harden transport boundaries

* fix(dns): preserve terminal refusals through outer fallbacks

* fix(config): preserve safe VLESS rejection diagnostics

* docs(vless): clarify breaking migration and carrier limits

* fix(dns): preserve terminal refusals across datagram attempts

* fix(outbound): make warm retention transitions idempotent

* refactor(config): preserve typed VLESS parse failures

* refactor(vless): share speculative UDP preparation

* refactor(core): separate reused and fresh source preparation

* refactor(config): derive the borrowed flat node output

* refactor(subscription): split admission tests by ownership

* fix(relay): flush buffered writes before waiting for input

* fix(session): preserve active warm carriers during linear reaping

* fix(health): retry unresolved UDP probe target initialization

* fix(config): report ignored VLESS flat fields

* fix(session): wake waiters when pool capacity changes

* fix(vless): preserve shared source cancellation causes

* fix(config): validate structured VLESS mux before normalization

* fix(session): retain initiating dial outcomes

* fix(udp): serialize source retirement with send state

* fix(session): fence dial startup and publication capacity

* fix(udp): preserve source outcomes during flow cleanup

* fix(session): wake capacity waiters on warm release

* fix(session): wake waiters after maintenance drains

* fix(reality): reject incomplete settings before transport selection

* test(outbound): gate public loopback interop weekly

* test(vless): characterize downstream-only Vision on the wire

* refactor(outbound): extract inline test modules without renaming

* fix(outbound): omit VLESS runtime resources without rprx

* refactor(outbound): organize protocol and runtime ownership

* docs(outbound): record mechanical blame exclusions

* test(rprx): cover handler availability in both build modes

* fix(relay): restore frame-sized reads with idle flushing

* fix(session): wake capacity waiters when carriers terminate

* test(ci): run isolated feature-off regressions

* fix(groups): resolve nested final paths across health domains

* fix(vless): allow UDP443 by default

* fix(core): preserve pending UDP attachments and feature budgets

* fix(probes): preserve refusal and capability boundaries

* fix(session): classify capacity races and simplify UDP reset

* fix(config): preserve explicit TLS security and identity
2026-09-16 16:47:46 +08:00
dependabot[bot] f2a8a75288 chore(deps): bump brotli from 8.0.4 to 9.0.0 (#241)
Bumps [brotli](https://github.com/dropbox/rust-brotli) from 8.0.4 to 9.0.0.
- [Release notes](https://github.com/dropbox/rust-brotli/releases)
- [Commits](https://github.com/dropbox/rust-brotli/compare/8.0.4...9.0.0)

---
updated-dependencies:
- dependency-name: brotli
  dependency-version: 9.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-13 20:52:42 +08:00
dependabot[bot] 109b7d9d58 chore(deps): bump the minor-and-patch group across 1 directory with 10 updates (#240)
Bumps the minor-and-patch group with 10 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [toml](https://github.com/toml-rs/toml) | `1.1.4+spec-1.1.0` | `1.1.5+spec-1.1.0` |
| [tower-http](https://github.com/tower-rs/tower-http) | `0.7.0` | `0.7.1` |
| [reqwest](https://github.com/seanmonstar/reqwest) | `0.13.4` | `0.13.5` |
| [tokio-rustls](https://github.com/rustls/tokio-rustls) | `0.26.4` | `0.26.5` |
| [aes](https://github.com/RustCrypto/block-ciphers) | `0.9.2` | `0.9.3` |
| [chacha20](https://github.com/RustCrypto/stream-ciphers) | `0.10.1` | `0.10.2` |
| [ipnet](https://github.com/krisprice/ipnet) | `2.12.1` | `2.12.2` |
| [uuid](https://github.com/uuid-rs/uuid) | `1.26.0` | `1.26.1` |
| [lru](https://github.com/jeromefroe/lru-rs) | `0.18.2` | `0.18.4` |
| [rcgen](https://github.com/rustls/rcgen) | `0.14.9` | `0.14.10` |



Updates `toml` from 1.1.4+spec-1.1.0 to 1.1.5+spec-1.1.0
- [Commits](https://github.com/toml-rs/toml/compare/toml-v1.1.4...toml-v1.1.5)

Updates `tower-http` from 0.7.0 to 0.7.1
- [Release notes](https://github.com/tower-rs/tower-http/releases)
- [Commits](https://github.com/tower-rs/tower-http/compare/tower-http-0.7.0...tower-http-0.7.1)

Updates `reqwest` from 0.13.4 to 0.13.5
- [Release notes](https://github.com/seanmonstar/reqwest/releases)
- [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/reqwest/compare/v0.13.4...v0.13.5)

Updates `tokio-rustls` from 0.26.4 to 0.26.5
- [Release notes](https://github.com/rustls/tokio-rustls/releases)
- [Commits](https://github.com/rustls/tokio-rustls/compare/v/0.26.4...v/0.26.5)

Updates `aes` from 0.9.2 to 0.9.3
- [Commits](https://github.com/RustCrypto/block-ciphers/compare/aes-v0.9.2...aes-v0.9.3)

Updates `chacha20` from 0.10.1 to 0.10.2
- [Commits](https://github.com/RustCrypto/stream-ciphers/compare/chacha20-v0.10.1...chacha20-v0.10.2)

Updates `ipnet` from 2.12.1 to 2.12.2
- [Release notes](https://github.com/krisprice/ipnet/releases)
- [Changelog](https://github.com/krisprice/ipnet/blob/master/RELEASES.md)
- [Commits](https://github.com/krisprice/ipnet/commits)

Updates `uuid` from 1.26.0 to 1.26.1
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/v1.26.0...v1.26.1)

Updates `lru` from 0.18.2 to 0.18.4
- [Changelog](https://github.com/jeromefroe/lru-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jeromefroe/lru-rs/compare/0.18.2...0.18.4)

Updates `rcgen` from 0.14.9 to 0.14.10
- [Release notes](https://github.com/rustls/rcgen/releases)
- [Commits](https://github.com/rustls/rcgen/compare/v/0.14.9...v0.14.10)

---
updated-dependencies:
- dependency-name: toml
  dependency-version: 1.1.5+spec-1.1.0
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: tower-http
  dependency-version: 0.7.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: reqwest
  dependency-version: 0.13.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: tokio-rustls
  dependency-version: 0.26.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: aes
  dependency-version: 0.9.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: chacha20
  dependency-version: 0.10.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: ipnet
  dependency-version: 2.12.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: uuid
  dependency-version: 1.26.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: lru
  dependency-version: 0.18.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: rcgen
  dependency-version: 0.14.10
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-13 20:49:59 +08:00
Zakkanderies 27426b2cbd config: one vocabulary, one validation gate, diagnostics as data (#232)
* feat(config): define failure-preserving, redacted diagnostic and error data with legacy projections

* refactor(config): make standalone node flat-serde conversion diagnostic-aware

* refactor(config): thread diagnostic sinks through the json, yaml and toml loaders and the format fallback

* refactor(config): return parser and share-link warnings through data entrypoints

* feat(core): render startup and sighup diagnostic attempts exactly once

* fix(config): resolve tls-name and optional-flow claims before lossy assignment

* fix(config): resolve certificate-verification booleans and inverse aliases

* fix(config): resolve credential aliases and numeric feed scalars

* fix(config): normalize stream-transport claims without confusing packet capability

* fix(config): resolve packet-network and anytls udp-capability conflicts

* fix(config): normalize and validate vmess cipher aliases

* fix(config): validate tuic relay and hy2 obfuscation claims before dropping them

* fix(config): check duration arithmetic and normalize subsecond feed durations

* fix(config): share checked hopping-set decoding and reject repeated ports

* fix(config): enforce policy a at every canonical adapter completion

* fix(core): preserve original indexed outcomes through structured subscription normalization

* fix(core): preserve physical-line outcomes for uri and record subscriptions

* fix(core): enforce partial-body acceptance and last-valid-body persistence

* fix(core): admit canonical assembled config and registry collections before shortcuts

* fix(core): reject reload changes to startup-owned health inputs and tls mode

* fix(outbound): guard one-shot runtime creation and migrate production callers to fallible factories

* fix(config): reject unsafe traffic terms and omit whole invalid dns rules

* fix(config): retain explicit empty subgroup contributions through serde and refresh

* fix(config): share normalized dns ip-or-cidr conversion across admission and consumers

* fix(core): decode configured udp dns check targets once with default port 53

* fix(outbound): decode health and urltest http targets with correct authority boundaries

* fix(config): diagnose ineffective structured group options and unsafe custom api binds

* bench(core): give the reload benchmark valid nodes with canonical ids

* perf(core): admit a configuration equal to the active one without re-deriving identities

* fix(config): preserve diagnostics and bound subscription admission

---------

Co-authored-by: eries <coloredflowers@outlook.com>
2026-09-12 16:50:53 +08:00
M0re Co1ors 8b2ad586fe refactor(ebpf): prune legacy APIs and restore RX/NDP handling (#172)
* test(hysteria2): read the complete salamander TCP echo

* test(dns): disable NFQUEUE in the mock smoke fixture

* refactor(ebpf): prune legacy APIs and restore RX/NDP handling
2026-09-07 23:56:44 +08:00
M0re Co1ors afa06c78d7 chore(deps): bump boring stack to 5.2.0 with rebased REALITY fork (#118) 2026-09-02 09:28:26 +08:00
M0re Co1ors 9ecfbbac88 perf(quic): adapt flow control to measured BDP (#115) 2026-09-02 00:30:07 +08:00
M0re Co1orsandCopilot Autofix powered by AI 899dbb4a3d perf(quic): add path telemetry and bounded recovery (#111)
* perf(quic): add path telemetry and bounded recovery

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-09-01 19:08:32 +08:00
M0re Co1orsandGlassy Iris d6e3b5c038 fix(quic): patch quinn-proto receive-assembler chunk bound for lossy paths (#110)
Co-authored-by: Glassy Iris <glassyiris@users.noreply.github.com>
2026-08-31 22:14:23 +08:00
M0re Co1ors 5924f450e9 fix(config): close typed node review gaps (#90)
* fix(config): ignore unrelated legacy node fields

* fix(tls): reject nodes without TLS options

* test(config): pin protocol node identities

* fix(config): warn on stripped node fields

* fix(config): warn on unused username credentials
2026-08-29 03:33:26 +08:00
M0re Co1ors d67a2748af fix(build): upgrade dependencies and bpf-linker (#79)
* fix(build): upgrade dependencies and bpf-linker

* style(ebpf): satisfy latest clippy

* test(runtime): avoid blocking worker barriers

* fix(ci): limit eBPF test build memory
2026-08-28 01:17:03 +08:00
eries c6c25cf914 feat(dns): add automatic client subnet presets 2026-08-17 21:25:14 +08:00
eries 6357843be8 fmt(delete): delete noneed describe 2026-08-11 19:43:44 +08:00
eries 6aaea2ad02 feat(vless): add Xray VLESS Encryption 2026-08-10 13:40:36 +08:00
eries b83ae6a337 refactor(cleanup): remove unused surfaces 2026-08-10 10:54:11 +08:00
eries f39bce1535 feat(nfqueue): add minimal raw-netlink queue and nft owner 2026-08-10 01:13:44 +08:00
eries 197791f673 feat(tool): probe VLESS subscriptions safely 2026-08-08 10:54:46 +08:00
eries e7bf8e9bd5 refacror(core): change libc syscall to safe aya::Pod and aya::sys 2026-08-07 18:51:01 +08:00
eries 6a0ea18adf Merge remote-tracking branch 'origin/main' into feat/rprx 2026-08-06 01:59:15 +08:00
eries c492495876 feat(tool): add geosite/geoip dat search subcommands 2026-08-06 00:13:43 +08:00
eries 36cc0c2a59 fix(outbound): rewrite the vmess wire format to match Xray AEAD 2026-08-05 09:36:58 +08:00
agent 8a4ca47dfc feat(config): derive stable node IDs from node content 2026-08-04 03:52:40 +08:00
glassyiris 23160dd47f perf(core): collect mimalloc arenas every minute 2026-07-31 03:01:08 +08:00
glassyiris d98d712c29 Merge feat/analyze-dns: DNS runtime generations + bounded cache/singleflight + versioned persistence
31-commit DNS subsystem migration, reviewed and merged:
- RuntimeGeneration: config+forwarder+router+group+policy+projection
  published/retired atomically; reload = build → eBPF push → one commit,
  push failure replays the old plan and latches datapath_healthy=false.
- Routing projection replaces the raw async channel (worker + desired
  state, 10k domain cap).
- Per-key atomic singleflight (leader-cancel cleanup, keyed caps,
  bypass on saturation); waiters render their own txid via
  ResponseTemplate (wire identity preserved).
- Sharded bounded LRU cache; HDNS v2 persistence (sha256-keyed dns:v2:
  namespace, PolicyId-checked restore, legacy dns: rows ignored).
- Concurrent A/AAAA resolution; bounded name parsing; owned prefetch
  tasks; lifecycle-singleflight transport shutdown; upstream admission
  without async locks.
Conflict resolution: control/reload.rs takes the branch pipeline + the
per-node runtime registry swap from dev (2A/2B); control/mod.rs keeps
dev's runtime_registry + connection_pool accessors alongside the
branch's dns_service; anytls.rs/mux.rs/doc benchmarks take dev;
benches/dns.rs takes the branch split + dev's nodelay fixture fix;
AGENTS.md dns section rewritten for the new layout.
Gates: clippy clean, workspace tests green (2 known TOML failures),
dns-ci / outbound-ci / clash-ci ALL GREEN.
2026-07-30 23:32:56 +08:00
glassyiris 81ee837ffe refactor(core): remove ip/nsenter — FD-owned namespace + rtnetlink
The engine no longer shells out to `ip`/`nsenter`/`sysctl` binaries:

- New `src/netlink.rs`: a minimal hand-rolled synchronous rtnetlink
  client (kernel ABI structs — the musl libc crate doesn't export all
  of them) covering veth pair creation, link up/down/netns-move/delete,
  v4/v6 address add/del, routes (incl. table 100 + RTN_LOCAL), fwmark
  rules, and static neighbours. A netlink socket opened inside a scoped
  setns operates on that namespace, so all daens-internal setup happens
  in ONE `with_daens_netns` scope instead of ~20 nsenter spawns.
- FD-owned daens: a throwaway thread `unshare(CLONE_NEWNET)`s and hands
  its `/proc/self/ns/net` FD back, pinned process-wide in a OnceLock —
  no `ip netns add/delete`, no dependence on the iproute2 registry.
  `/var/run/netns/daens` remains as a best-effort compat bind-mount for
  external tooling (`ip netns exec`, debug shells); startup/shutdown
  cleanup umounts it instead of `ip netns delete`.
- Interface reads: `getifaddrs` replaces `ip addr show` (honk-config
  `interface_host_cidrs` — gains a `libc` dep; ebpf `iface_ipv4`), and
  the default route comes from `/proc/net/route`.
- Deleted: `find_iproute2` (incl. the hardcoded Nix-store paths),
  `ensure_veth_peer_name`, `parse_mac_from_ip_link`, all nsenter blocks.

All `std::process::Command` call sites for `ip`/`nsenter` are gone from
honk-core and honk-config; `set_sysctl` already wrote /proc/sys directly
(the `sysctl` binary remains only as a fallback).
2026-07-30 18:34:56 +08:00
glassyiris cea1c587ad perf(ss): BoringSSL AEAD for Shadowsocks data paths — 5339 → 9388 Mbps
Micro-benchmark (benches/ss_aead.rs, AES-NI host): RustCrypto aes-gcm
runs at 0.4–0.5 GB/s (its AES-NI path is not engaged in this build)
while BoringSSL's AeadCtx does 3.3–6.7 GB/s — a 7–18× gap that made
SS2022 single-core-bound at 5339 Mbps / 1.01 cores in the lab while
dae's Go AES-GCM assembly idled at 9396 Mbps / 0.49 cores.

AeadCipher's AES-128/256-GCM and ChaCha20-Poly1305 variants now wrap
boring::aead::AeadCtx (in-place seal/open, same signatures, errors mapped
to the existing RustCrypto-shaped error type). Only XChaCha20-Poly1305 —
which BoringSSL doesn't have — stays on RustCrypto.

Lab (iperf3 -R, median): ss2022 5339 → 9388 Mbps at 1.01 → 0.37 cores —
line rate, now ahead of dae on CPU (0.37 vs 0.49). SSR (TCP-only, same
AeadCipher) benefits identically. benches/ss_aead.rs added so the gap is
re-checkable.
2026-07-30 15:28:15 +08:00
eries 37858d36b1 docs(dns): complete observability benchmarks and rollout 2026-07-30 15:09:19 +08:00
glassyiris 9a2c12242f perf(core): mimalloc for the shipped binary + AES-NI benchmark refresh
- honk-core binary switches the global allocator to mimalloc: musl's
  stock malloc showed up as ~8% malloc+lock time in perf and capped the
  QUIC path — A/B on the same build: 5096 vs 3037 Mbps (hy2). Cost is
  ~40 MB of retained RSS (49-66 MB, parity with dae); noted in the docs.
- Benchmark docs rewritten for the host-passthrough lab CPU (AES-NI):
  honk hy2 5239 / tuic 5351 Mbps (+75%/+36% vs dae kdae), trojan line
  rate at 0.42 cores; ss2022 (5339 vs dae 9396) is now the documented
  optimization target. anytls rows use -P8 (single-stream iperf3 is the
  known lab artifact). dae rows are the kdae build; its direct path is
  broken on the lab kernel (noted).
- Lab engine VM moved 10.10.10.50 -> 10.10.10.57 (docs + bench README).
2026-07-30 14:40:12 +08:00
glassyiris b1d62367fe feat(runtime): per-node runtime registry (v3.1 phase 2A)
The single owner of every outbound's session-layer resources:
ControlPlane → OutboundRuntimeRegistry → Node.id → NodeRuntime
(immutable node config, capabilities, protocol runtime slot). Groups
stay pure selection policies; ProxyRegistry stays stateless handlers.

- Validation: nil/duplicate Node UUIDs fail startup and abort reloads
  (two-phase build → swap → old registry shutdown, matching the
  existing generation pipeline).
- Node::default() now assigns a v4 UUID — the derive-Default nil UUID
  silently poisoned every struct-literal construction (incl. the
  built-in direct node) for the new registry.
- OutboundCapabilities (tcp/udp/multiplexed) derived from protocol +
  node fields, the base for capability-based pooling in phase 5.
- ProtocolRuntime is None for now; AnyTLS ownership lands in 2B.
2026-07-30 01:06:25 +08:00
glassyiris 4a79f8ae87 test(hysteria2): env-gated port-hopping soak tests
hop_soak_tcp / hop_soak_udp run against a real hysteria2 server
(HONK_HY2_SERVER, optional HONK_HY2_MPORT/MHOP): a rate-limited
300MB download with a per-read stall detector, and a UDP echo loop
counting losses across hops. Used to verify port hopping against a
live server behind nftables DNAT: 300MB across ~58 hops with zero
stalls, 592/592 UDP datagrams across ~24 hops.

Also syncs Cargo.lock with the honk-tool workspace entry.
2026-07-26 22:27:21 +08:00
TnZzZHlp 2a33cc8501 feat(config): support include syntax 2026-07-25 11:08:25 +08:00
glassyiris 6edc585ef5 fix(deps): adapt to rand 0.10 / aes 0.9 / criterion update
- rand 0.10 restructured its traits: fill_bytes now lives on
  rand_core::Rng (re-exported as rand::Rng), random_range on the new
  RngExt, and RngCore became a marker trait no longer needed here.
  Update imports in salamander/shadowsocks/ssr/shadowsocks_2022/vmess/
  hysteria2 accordingly.
- aes 0.9 (cipher 0.5) renamed BlockEncrypt -> BlockCipherEncrypt
  (quic_boring header protection).
- criterion deprecated criterion::black_box; use std::hint::black_box.
- Silence clippy::await_holding_lock on the four DNS/ECH discovery
  tests that intentionally serialize on GLOBAL_TEST_LOCK.

cargo clippy --all --all-targets -- -D warnings clean; workspace tests
green (only the 3 pre-existing failures remain).
2026-07-23 22:07:44 +08:00
glassyiris 1d47f0a72d chore(log): demote per-connection logs to debug
On a router, ~100 lines/min of per-connection INFO logs mean constant
journald writes and flash wear for zero operational value. The two
per-connection info! lines (normal TCP path and eBPF offload) are now
debug!; lifecycle/admin events stay at info.

The clash /logs broadcast layer is installed unfiltered by design, so
debug events remain available on demand via /logs?level=debug while the
default info view and journald stay quiet. Verified live on the
gateway: 0 'TCP connection:' lines in journald and in the default
/logs view, full stream intact at /logs?level=debug.
2026-07-23 21:54:01 +08:00
eries 1fadaf1d93 .. 2026-07-23 01:54:17 +08:00
glassyiris 78493e0f41 feat(dns): encrypted transports, dae routing rules, and dial-path proxy
Add DoT/DoH/DoQ/DoH3 with session reuse and drop hickory-resolver.
Implement dae request/response DNS routing (qname/qtype/reject/asis,
response re-query, fixed_domain_ttl, optimistic_cache_ttl).

Upstream dial: explicit `name: 'uri' -> group|node`, or implicit traffic
Route(dns server) + GroupManager selection (dae chooseBestDnsDialer).
Wire SharedGroupManager and traffic Router into UpstreamPool; cache
H2/TLS sessions per leaf node.
2026-07-22 03:06:45 +08:00
glassyiris e67206879d ci: add tag-triggered release workflow; set version v0.0.1.alpha and mark README experimental 2026-07-21 01:15:14 +08:00
glassyiris 00df52851e Initial commit: honk — Rust eBPF transparent proxy engine 2026-07-21 00:53:43 +08:00