31 Commits
Author SHA1 Message Date
eries cb531a0f69 ci(release): add full, clash-api and native-api artifacts 2026-10-20 22:40:19 +08:00
eries 1a32bf3900 fix(ebpf): preserve stable flow values and live ownership 2026-10-20 05:34:57 +11:00
eries 6692de5271 bench(core): gate the real-I/O bench harness behind udp-bench 2026-10-20 05:34:56 +11:00
eries 786317f57d feat(just): add build-musl-embedded-ui recipe 2026-10-07 22:35:15 +11:00
Zakk da2936620d build(native-ui): fetch doona at packaging time instead of vendoring it 2026-10-07 22:24:42 +11:00
eriesandZakk 99e6c690fa chore(ci): build, test and release the native API features
Co-authored-by: Zakk <zakk@gentoozh.org>
2026-10-07 22:24:41 +11: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
Zakk e6fe0d7036 test(config): compare the dae-config parser with dae's parser in CI, with authored dialect cases and fuzzing (#255)
* test(config): add the conformance projection and the authored dialect cases

* test(config): compare the manifest against dae's parser

* test(config): fuzz targets with shared checks and a replayed corpus

* chore(ci): add the parser lane and the weekly fuzz job
2026-09-17 13:41:28 +08:00
M0re Co1ors 3b90784c1f fix(dns): route LAN DNS before local socket bypass (#256)
* fix(dns): route LAN DNS before local socket bypass

* fix(dns): admit reassembled LAN queries through NFQUEUE
2026-09-17 08:47:26 +08:00
Zakk 5752c72ce5 ci: run the DNS smoke on the release honk-core in its own lane (#244)
* ci: run the DNS smoke on the release honk-core in its own lane

* ci: report the release binary size and cap the smoke CPU

* ci: floor the slowest-test limit at 30 s
2026-09-14 10:40:45 +08:00
M0re Co1ors d6ccc15f94 test(workspace): consolidate suites and tighten regression coverage (#243) 2026-09-14 09:45:23 +08:00
Zakk 92097cf1a0 ci: pin toolchains and inputs, bound and cache every job, run the suites under nextest (#238)
* ci: bound every job, cancel superseded pull-request runs, scope permissions

* build: pin the stable and eBPF toolchains in rust-toolchain files

* ci: pin downloads and actions, cache them and the cargo builds

* ci: compile the eBPF job's host side in parallel and keep the guest output

* test(core): ignore the config.dae routing test in code rather than on the command line

* ci: run the suites under nextest with per-test timeouts and JUnit output
2026-09-13 20:11:57 +08:00
Zakk 16ddc68735 Rename README_CN.md, match the Justfile to CI, note the geosite test assets (#150)
* docs(readme): rename the Chinese readme to README.zh.md

* fix(just): match the lint and format recipes to CI

* docs(agents): say where the geosite tests find their assets
2026-09-09 12:52:58 +08:00
M0re Co1ors 517fe04b06 feat(routing): compile canonical policy into native eBPF (#181)
* feat(routing): compile canonical policy into native eBPF

* fix(routing): restore capacity and bound native emission

* refactor(routing): simplify compiled policy ownership and identity

* fix(ebpf): support compiled routing on Linux 6.12

* fix(routing): bound domain projection and repair review gates
2026-09-09 05:00:43 +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 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
M0re Co1ors 41ec601855 feat(group): add always-on score policy (#43)
* feat(group): add adaptive honk policy

* docs(group): document optional honk policy

* ci(group): test optional honk policy

* feat(group): score real QUIC probe outcomes

* feat(group): make score policy always-on and time-aware

* docs(group): document built-in score policy

* perf(group): avoid decayed score snapshot copies
2026-08-19 09:16:27 +08:00
eries 43974f6c1e feat(datapath): prefer netkit for dae0 links 2026-08-14 20:36:54 +08:00
eries 05d8bc8438 fix(nfqueue): harden production safeguards 2026-08-10 17:43:25 +08:00
eries 0a7f1e2019 test(nfqueue): cover verdict lifecycle and real kernel path 2026-08-10 01:15:07 +08:00
eries 0b79ac530f test(dns): add compatibility smoke gate 2026-08-09 11:10:30 +08:00
eries 0a6499975a fix(ebpf): hold cgroup program links for the backend lifetime 2026-08-05 16:13:48 +08:00
eries b3c4e498e6 perf(core): integrate audited runtime optimizations 2026-08-02 07:11:46 +08:00
glassyiris 7b2daf3eb7 fix(netlink): harden recv path and send FRA_FWMASK with rules 2026-07-31 00:42:00 +08:00
eries 37858d36b1 docs(dns): complete observability benchmarks and rollout 2026-07-30 15:09:19 +08:00
glassyiris 311a92e9b7 ci: add clash-ci gate (clash_api_test + integration_test) 2026-07-29 06:07:21 +08:00
glassyiris 8ff7dde70a feat(dns): route all control-plane name resolution through internal DNS
Audit of every resolver in the tree found six spots still bypassing
honk's DNS stack; all now share it:

- urltest (clash delay): optional UrltestResolver hook, installed by
  honk-core against DnsController::resolve_domain — delay measurements
  follow dns.routing/cache/serve-stale instead of the system resolver
- alive: raw-TCP fallback probe and startup check-URL seed resolution
  use the same ResolveHook instead of lookup_host
- udp_check_dns: domain entries resolve through the internal DNS hook
  (literal entries still win), reload-safe via DnsController
- subscriptions: reqwest gets a reqwest::dns::Resolve backed by the
  bootstrap resolver (bypass-marked), so subscription fetches no
  longer depend on a poisonable system resolver

Verified live on the gateway with a split-DNS config
(223.5.5.5 UDP + dns.alidns.com DoH + dns.alidns.com DoQ + 1.1.1.1
DoH3): baidu/google/bing resolve via their designated upstreams, the
environment-blocked DoH3 upstream fails isolated (other domains
unaffected), and health-check resolution degrades to the system
fallback when the internal path has no answer.

Adds ci/dns-ci.sh + just dns-ci gate (fmt, clippy, config, dns,
control, outbound suites) — ALL GREEN.
2026-07-28 02:10:33 +08:00
glassyiris 30e6fb3587 refactor(outbound): deduplicate, drop unnecessary unsafe, unify style
Audit-driven cleanup (4-way parallel audit):

- ProxyHandler::test_connectivity gets a default implementation;
  eight byte-identical copies across handlers deleted
- util.rs TCP keepalive now uses socket2's safe API (was two raw
  libc::setsockopt blocks) and connect_marked_addr is one code path
  instead of two 90-line branches; marked UDP socket creation unified
  between quic.rs and util.rs
- alive: remove the RecoveryState dead state machine (~100 lines),
  extract probe_backoff, DialerCollection::update_moving_average and
  PerProtocolState::reset_on_success (each was triplicated)
- group: std RwLock -> parking_lot (drops a dozen unwraps, matches
  the rest of the crate)
- quic_boring: HKDF expand-label info builder shared between
  sha256/sha384 variants; anytls md5_hex hand-roll replaced with a
  fmt::Write fold; transport wrote_preface/wrote_headers dead fields
  removed

No behavior change intended; 264 lib tests + clippy clean.
2026-07-28 01:30:38 +08:00
glassyiris 8a9752b20a build: fix cross builds, eBPF BTF embedding, and the release workflow
eBPF BTF: build.rs now verifies the object it embeds actually contains
.BTF (aya refuses BTF-less objects at runtime on the gateway), rebuilds
when missing or BTF-less, and strips RUSTFLAGS/CARGO_ENCODED_RUSTFLAGS
from the child env — an environment RUSTFLAGS overrides
crates/honk-ebpf/.cargo/config.toml's --btf flags and silently produces
BTF-less objects (the 'no BTF parsed for object' incident). A stale
BTF-less copy from an earlier build also sat in the musl OUT_DIR
because build.rs never reran there.

Cross builds (ci/zigcc, ci/zigcxx, ci/zig-bindgen-env): boring-sys
needs a clang-compatible toolchain under cross — CMake injects
clang-style --target flags into its ASM rules that real GCC rejects
and zig rejects in Rust-triple spelling, and bindgen needs zig's target
headers instead of the host's. The wrappers strip/rewrite those flags
(plus rustc's aarch64 errata linker args); musl targets link with
-C link-self-contained=no so zig supplies the CRT (duplicate _start
otherwise). Verified locally: x86_64-musl (static, runs), aarch64-gnu
(glibc 2.28), aarch64-musl (static) — all with BTF-ful embedded objects.

Justfile: build-musl uses the zig wrappers; build-ebpf warns on
RUSTFLAGS and verifies .BTF; test-ci mirrors the CI gate; clean-all
also removes the live table-100 policy routes (2023/iptables lines are
now marked legacy); dropped run/deploy/docker* recipes whose scripts/
Dockerfile don't exist in this tree.

release.yml: test job installs cmake+libclang and skips only the 3
known-failing pre-existing tests; build job verifies eBPF BTF and
cross-builds via the zig wrappers (zig 0.14.1) instead of cross.
2026-07-23 03:28:24 +08:00
glassyiris 2d7d61d47a feat(tls): ECH discovery via DNS HTTPS RR, wire utls_imitate, track quic_boring
- tls.rs: ech_enabled without a static ech_config now discovers the
  ECHConfigList from DNS HTTPS records (RFC 9460) at connect time, via
  the bootstrap resolver or the first system nameserver, cached per
  domain (record TTL hits, 5min negative). Best-effort/fail-open;
  Chrome mode still GREASEs when nothing is found. Covers TCP TLS
  (TlsConnector::connect) and QUIC (client_config is now async).
- bootstrap.rs: raw query helpers + HTTPS (65) query + SVCB ech
  SvcParam parsing behind query_ech_config; GLOBAL_TEST_LOCK
  serializes set_global tests.
- utls_imitate is wired: chrome* uses the Chrome profile, any other
  value warns and falls back (only the Chrome profile exists);
  ControlPlane applies both tls_implementation and utls_imitate.
- quic::client_config made async for discovery; client_for() in
  tuic/juicity/hysteria2 builds outside the client lock; DoQ/DoH3
  client constructors and UpstreamPool::build_transport follow.
- Track crates/honk-outbound/src/quic_boring.rs and tests/fixtures/
  (previously untracked); Justfile musl toolchain notes for boring-sys.
- Docs: components.en/zh.md ECH + utls_imitate, AGENTS.md sync.

Tests: 4 new (SVCB parse, stub-DNS ech lookup, discovery cache
pos/neg, discovery-driven real ECH handshake); honk-outbound 235 pass,
workspace green except the two pre-existing suites.
2026-07-23 02:29:18 +08:00
glassyiris 00df52851e Initial commit: honk — Rust eBPF transparent proxy engine 2026-07-21 00:53:43 +08:00