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.
honk
English
honk is a Rust transparent-proxy engine for Linux, inspired by dae (eBPF datapath & config surface) and sing-box (outbound groups, multi-protocol dialers, Clash-compatible API).
It is not a line-for-line port of either project. The kernel path follows dae’s TC + match_set + dae0/daens model; the userspace outbound/control stack follows sing-box-oriented designs. honk means: dae sing.
Status: experimental (
v0.0.1.alpha). honk is an early alpha release — expect breaking changes, incomplete features (see TODO), and limited real-world validation. Not recommended for production use.
License: GPL-3.0-only.
Documentation
| Doc | English | 中文 |
|---|---|---|
| Design | doc/design.en.md | doc/design.zh.md |
| Configuration | doc/configuration.en.md | doc/configuration.zh.md |
| Component reference | doc/components.en.md | doc/components.zh.md |
| Index | doc/README.md | same |
Architecture (crates)
crates/
├── honk-core/ # Engine binary: control plane, DNS, relay, Clash API, eBPF attach
├── honk-config/ # Config schema + dae-syntax parser + share links
├── honk-outbound/ # Proxy handlers, groups, health checks
├── honk-ebpf-common/ # Shared no_std #[repr(C)] types (kernel ↔ userspace)
└── honk-ebpf/ # Kernel eBPF programs (bpfel-unknown-none; outside workspace)
High-level path: TC classify → redirect via dae0/daens → sk_lookup TPROXY listeners → userspace dial/relay. Details in the design doc.
Completed and verified (summary)
Status reflects the current tree and unit/integration tests. Prefer re-running cargo test --all on your machine for a live gate.
eBPF / datapath (maintainer focus)
- TC LAN/WAN ingress & egress (L2/L3), bond/bridge slave attach
dae0/dae0peer+daensdelivery,sk_lookup+ SockMap listeners- MatchSet routing machine, LPM (dest/src/MAC), domain bitmaps, must/OR/AND indices
- Conntrack / redirect track / routing handoff maps
- cgroup cookie→pid for process-name rules
- DNS fast path (redirect DNS to userspace without full route loop)
- Per-outbound
OUTBOUND_STATS+EVENT_RINGBUFdrain - Connectivity map fed by userspace health checks
- Mock eBPF backend for unprivileged tests
Config & routing (userspace)
- dae syntax load, include/glob composition & validate
- Share-link parse (ss/ssr/vmess/vless/trojan/anytls/hy2/tuic/juicity/…)
- Userspace
Router(domain/IP/port/proto/process/MAC/geosite/geoip) - TCP sniff (TLS SNI, HTTP Host); QUIC Initial SNI decrypt
- Dial modes
ip/domain/domain+/domain++ - Built-in
directnode injection;blockoutbound
Outbound & groups
- Handlers: Direct, Block, SOCKS5, SS(+2022), SSR, Trojan, Trojan-Go, VMess, VLESS, Hysteria2, TUIC, Juicity, AnyTLS
- Shared transport (TLS/WS/gRPC) + h2mux (
node.mux) - Groups: Selector / URLTest / LoadBalance / Fallback + nested groups
- URLTest: tolerance, separate TCP/UDP picks, idle_timeout, interrupt_connections
AliveDialerSet: concurrent probes, hysteresis, TCP+UDP probes, eBPF push- Subscription fetch + background merge (in-memory nodes)
Review Status
- ebpf pat
- control plan
- anytls / trojan / juicity /socks5
- ss/ ssr/ vless/ vmess/ tuic
- dns logic
- ech
- quic
TODO
- UDP relay for VMess / VLESS / SSR / Trojan-Go
- REALITY + uTLS (deferred — no mature rustls hooks)
- smux/yamux; verified h2mux interop with official sing-box multiplex inbounds
- Real DoT/DoH/DoQ/DoH3 upstreams (pooled TLS/H2/QUIC sessions)
- Hysteria2 brutal (up/down Mbps), port hopping (
mport/mhop),pinSHA256, QUIC receive-window/PMTUD knobs; live-verified against the official server - Hysteria2 residue:
maxStreamReceiveWindow/maxConnReceiveWindow(no quinn autotuning equivalent),fastOpen, configurable UDP-session/connection idle timeouts (hardcoded 90s/120s) - Consolidate QUIC client options:
QuicClientOptionsfor transport tuning,BoringQuicOptionsfor the TLS backend - FakeIP engine
- Kernel-side eBPF DNS answer cache (userspace cache exists)
- Consistent-hash load balancing (round-robin LoadBalance exists)
- Broader live interop tests vs production peers; routine root-only netns gates
Prerequisites
- Rust (edition 2024 / recent stable; eBPF object build needs nightly +
bpf-linker) - Linux kernel 5.8+ for real eBPF
clang,llvm,libbpfheaders for eBPF builds
# Debian/Ubuntu example
sudo apt-get install -y clang llvm libbpf-dev build-essential pkg-config
Quick start
# Workspace
cargo build --release
cargo test --all
# Engine with real eBPF (root)
cargo build --release -p honk-core --features ebpf
sudo ./target/release/honk-core --config /etc/honk/config.dae
# Dev without kernel eBPF
cargo run --release -p honk-core -- --config config.dae --mock-ebpf
Day-to-day tasks: see Justfile (just build-core, just run, just clean-all, …).
Docker
Default image builds honk-core without the ebpf feature (mock backend). For real eBPF, build with --features ebpf (nightly + bpf-linker in the build stage) or pass --bpf-object.
docker compose up -d
# privileged, host network, /sys + /etc/honk mounts — see docker-compose.yml
Configuration (sketch)
global {
tproxy_port: 12345
lan_interface: eth0
dial_mode: domain
}
node {
trojan-node: 'trojan://secret@example.com:443'
}
group {
proxy {
filter: name(keyword: 'node')
policy: min_moving_avg
}
}
routing {
domain(suffix: google.com) -> proxy
fallback: direct
}
Full guides: doc/configuration.en.md, doc/components.en.md.
Acknowledgments
- dae / daed-rs — eBPF transparent proxy lineage
- sing-box — outbound group & Clash API patterns
- daeuniverse/outbound — protocol reference
- juicity-rs by Markson Pigeonzilla Plus — Juicity protocol implementation reference; the wire-format alignment and live interop testing of honk's Juicity outbound were done against it
- aya-rs — Rust eBPF
License
SPDX-License-Identifier: GPL-3.0-only
Copyright (c) 2025, glassyiris <honk@catmint.cc> and honk contributors