[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-115064":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":19,"compositeScore":20,"rankGlobal":10,"rankLanguage":10,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":24,"topics":25,"createdAt":10,"pushedAt":26,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":16,"starSnapshotCount":16,"syncStatus":15,"lastSyncTime":30,"discoverSource":31},115064,"keen-proxy","ordo-systems\u002Fkeen-proxy","ordo-systems","Keenetic proxy repository","https:\u002F\u002Fordo-systems.github.io\u002Fkeen-proxy\u002F",null,"Go",153,7,1,2,0,3,73,19,76.01,"GNU General Public License v3.0",false,"main",true,[],"2026-11-21 13:16:50","2026-11-23 13:20:10","\u003Cimg src=\"docs\u002Fassets\u002Flogo.png\" alt=\"KeenProxy logo\" width=\"128\" align=\"middle\">&nbsp;&nbsp;\u003Cimg src=\"docs\u002Fassets\u002Fordo-systems-logo.png\" alt=\"Ordo Systems\" width=\"160\" align=\"middle\">\n\n# KeenProxy\n\nSelective traffic routing for Keenetic and Netcraze routers running Entware, with an embedded [sing-box-lx](https:\u002F\u002Fgithub.com\u002FLeadaxe\u002Fsing-box-lx) engine and a Vue web interface. This experimental branch pins lx.35 on the sing-box 1.14.4 base.\n\nKeenProxy lets you choose which devices, domains, IP ranges, and countries use a tunnel, connect directly, or are blocked. The web panel shows router load and lets you install, schedule, or roll back releases on managed Entware and native OpenWrt installations. Router compatibility and protocol support depend on the firmware, kernel modules, and build tags. The project is experimental.\n\nKeenProxy requires **at least 256 MiB of total router RAM** on Keenetic\u002FNetcraze and OpenWrt. Leave memory headroom for firmware and other services; this is not a guarantee that every workload fits. Experimental OpenWrt builds target x86-64, 32-bit x86 with SSE2, ARM32, ARM64, little-endian MIPS, and big-endian MIPS. [Router requirements](docs\u002Fen\u002Fgetting-started.md#experimental-openwrt-support)\n\n[![KeenProxy web panel overview with tunnel traffic, router load, and connection status (synthetic demo data)](docs\u002Fassets\u002Fscreenshots\u002Freadme-overview.png)](https:\u002F\u002Fordo-systems.github.io\u002Fkeen-proxy\u002Fdemo\u002F)\n\n## Documentation and live demo\n\n- [English documentation](https:\u002F\u002Fordo-systems.github.io\u002Fkeen-proxy\u002F) · [Russian documentation](https:\u002F\u002Fordo-systems.github.io\u002Fkeen-proxy\u002Fru\u002F)\n- [Interactive browser demo](https:\u002F\u002Fordo-systems.github.io\u002Fkeen-proxy\u002Fdemo\u002F) with live simulated traffic, CPU and memory, and a simulated update and rollback flow. Changes reset on reload.\n\n## What works today\n\n- Device and network policies: split routing, full tunneling, direct access, and per-device overrides identified by MAC address.\n- Domain, IP\u002FCIDR, and country groups, including country exclusions. Within routed policies, explicit domain\u002Faddress rules precede country rules; global block groups are applied first.\n- Domain detection from TLS SNI or HTTP Host, with a bounded IPv4 DNS-answer cache as a fallback when the connection has no readable hostname.\n- WireGuard, AmneziaWG 2\u002F3 single-peer `.conf` profiles, supported sing-box connection links, raw sing-box outbounds\u002Fendpoints, and embedded TrustTunnel.\n- Connection failover with recovery hysteresis and explicit direct fallback where configured.\n- A UDP\u002FTCP DNS frontend, public resolver presets, DoH\u002FDoT, selectable DNS routing, and DNS-only blocklists.\n- Community domain presets with preview and managed updates that preserve manual additions and exclusions.\n- YAML configuration, a shared draft\u002FApply workflow, import\u002Fexport, and a previous-configuration backup.\n- Dark\u002Flight themes, responsive navigation, connection wizards, file import, and bulk group route changes.\n- Routing, audit, and system journals; connection statistics; and separate HTTP, verified HTTPS, and bounded transfer diagnostics. The panel can export a [diagnostic ZIP](docs\u002Fen\u002Ftroubleshooting.md#download-the-diagnostic-zip).\n- Release notifications, manual installation and rollback, and optional scheduled updates from the web panel. [Update guide](docs\u002Fen\u002Fgetting-started.md#update-from-the-panel)\n\n## How routing works\n\nThe compiler combines configuration and discovered LAN addresses into sing-box rule sets and a firewall plan. The daemon starts the required services before enabling interception and removes interception first during shutdown.\n\nTCP uses REDIRECT. The `tproxy` mode also enables UDP TPROXY. Client-specific policies take precedence over network policies. Within a routed policy, a country exclusion is applied after explicit domain and address rules. Global blocking rules, including country blocks, are evaluated before those policies.\n\nReadable hostnames remain the primary routing signal. DNS-derived IP rules are used only when no hostname is available. This fallback depends on observed\u002Fresolved answers and TTLs; it cannot reliably recover hidden names from ECH or a device's independent encrypted DNS cache.\n\n## Build and try the interface\n\nRequirements:\n\n- Go **1.27.3**, declared by the `go` directive in `go.mod`; Makefile commands select this compiler through `GOTOOLCHAIN`.\n- Node.js **22.12+** (or another Vite-compatible version) and npm.\n- Docker with privileged-container support and at least 2 engine CPUs, Python 3.12+, and repository history for the mandatory build-time memory gates and the network-namespace integration suite.\n- For a router: Entware or native OpenWrt\u002Fprocd, supported Linux kernel facilities, and compatible iptables tools.\n\nFrom the repository root:\n\nDownload the pinned Go modules; no Git submodules are required:\n\n```sh\ngo mod download\n```\n\nThe root `go.mod` preserves upstream import paths and pins sing-box-lx `v1.14.4-lx.35` plus its matching WireGuard\u002FAWG, sing-tun, gVisor and uTLS forks through five versioned `replace` directives. Update these pins as a reviewed release snapshot, not with `@latest`.\n\n```sh\nmake ui-demo\n```\n\nOpen `http:\u002F\u002F127.0.0.1:8086\u002F`. Demo mode uses synthetic traffic and keeps configuration changes in memory; it does not configure host routing or a firewall. The initial token is printed to the terminal and stored at the path specified in `examples\u002Fdemo.yaml`.\n\nFor frontend development, keep the demo API running and use a second terminal:\n\n```sh\ncd web\nnpm ci\nnpm run dev\n```\n\nThe development server proxies `\u002Fapi` to `http:\u002F\u002F127.0.0.1:8086`. Set `KEENPROXY_URL` to use a different local backend.\n\n```sh\nmake build               # Host binary with the embedded UI\nmake build-router        # Linux x86-64, x86\u002FSSE2, ARMv5, ARM64, and both MIPS byte orders\nmake build-router-lite   # Smaller protocol set for constrained routers\n```\n\nThe full build enables QUIC, uTLS, WireGuard\u002FAmneziaWG, gVisor, XHTTP and native TrustTunnel. The lite registry retains XHTTP and TrustTunnel over TCP\u002FTLS but excludes QUIC\u002FHTTP\u002F3 and several other protocols; see `internal\u002Fengine\u002Fregistry_lite.go`. See the [connection guide](docs\u002Fen\u002Fuser-guide.md#sing-box-lx-compatibility) for supported link parameters and migration limits.\n\nThese three public local build targets run both the [memory regression gate](docs\u002Fen\u002Fdevelopment.md#memory-regression-gate) and the continuous AWG stress gate before producing binaries. Run `make memory-regression` or `make memory-stress` to inspect one report, or `make memory-regression-unit` for the contract tests. Docker absence, invalid evidence, a regression, or a stress failure blocks binary production; neither gate is silently skipped.\n\nCI exposes independent **Memory regression**, **AWG stress (320 MiB)**, and **Router builds** checks. The router job uses compilation-only `build-router-ci` and `build-router-lite-ci`; it does not certify memory. Tagged release assets run both gates in separate steps before acknowledging those same-job successes with `make -o memory-stress -o memory-regression` and the public router targets. Neither the CI-only targets nor `-o` are local shortcuts around failed checks.\n\n## Configuration and router installation\n\nThe bilingual documentation source is in [docs\u002Fen\u002F](docs\u002Fen\u002Findex.md) and [docs\u002Fru\u002F](docs\u002Fru\u002Findex.md), including an illustrated user guide. A separate browser demo is built from the same Vue interface with an in-memory API adapter; see [documentation build instructions](docs\u002Fen\u002Fdevelopment.md).\n\nStart with [examples\u002Fconfig.yaml](examples\u002Fconfig.yaml) and [examples\u002Fconnections.yaml](examples\u002Fconnections.yaml). Example keys, addresses, and credentials are placeholders and must be replaced. Keep real configuration files and support exports out of Git.\n\nThe managed installation paths are:\n\n| Item | Entware | Native OpenWrt |\n| --- | --- | --- |\n| Binary | `\u002Fopt\u002Fbin\u002Fkeenproxy` | `\u002Fusr\u002Fbin\u002Fkeenproxy` |\n| Configuration | `\u002Fopt\u002Fetc\u002Fkeenproxy\u002Fconfig.yaml` | `\u002Fetc\u002Fkeenproxy\u002Fconfig.yaml` |\n| API token on a clean install | `\u002Fopt\u002Fetc\u002Fkeenproxy\u002Ftoken` | `\u002Fetc\u002Fkeenproxy\u002Ftoken` |\n| Rule sets and derived state | `\u002Fopt\u002Fvar\u002Flib\u002Fkeenproxy\u002F` | `\u002Fvar\u002Flib\u002Fkeenproxy\u002F` |\n| Service | `\u002Fopt\u002Fetc\u002Finit.d\u002FS99keenproxy` | `\u002Fetc\u002Finit.d\u002Fkeenproxy` (procd) |\n| Release record and updater settings | `\u002Fopt\u002Fshare\u002Fkeenproxy\u002F` and `\u002Fopt\u002Fvar\u002Flib\u002Fkeenproxy\u002Fupdates\u002F` | `\u002Fusr\u002Fshare\u002Fkeenproxy\u002F` |\n\nOpenWrt `\u002Fvar` is normally volatile; configuration and update preferences use persistent paths. The native starter configuration selects `br-lan`; change it if your LAN bridge has another name. Existing configuration is never rewritten to select a different bridge.\n\nOn a prepared Entware router, install `curl` and a CA bundle if needed. Run these commands from the Entware root shell. [Router preparation guide](docs\u002Fen\u002Fgetting-started.md#prepare-the-router)\n\n```sh\nopkg update && opkg install curl ca-bundle ca-certificates\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Fordo-systems\u002Fkeen-proxy\u002Fmain\u002Ftools\u002Fbootstrap.sh | \u002Fopt\u002Fbin\u002Fsh\n```\n\nThe bootstrap reads `version.txt` from `main`, selects the matching full\u002Flite asset for one of the six release architectures, and verifies release files against `SHA256SUMS`. On Entware it installs missing `iptables` tools and registers and starts `\u002Fopt\u002Fetc\u002Finit.d\u002FS99keenproxy`. TrustTunnel runs inside the embedded engine; no separate client is downloaded or supervised. The first start enables LAN DNS interception even with an empty routing policy. Stop any competing interceptor first.\n\nAfter successful installation or command-line update, the bootstrap prints the panel URL when available. Run `keenproxy --url` to display it again and `keenproxy --key` to print the current login token from the configured token file. These commands do not start the service or generate a token; use `--config \u002Fpath\u002Fto\u002Fconfig.yaml` for a non-default configuration. Keep token output private. See [panel access](docs\u002Fen\u002Fuser-guide.md#access-the-panel).\n\nRun the same command again to update. Existing configuration and tokens are preserved. Select a specific published release with `--version` or choose the smaller build with `--lite`:\n\n```sh\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Fordo-systems\u002Fkeen-proxy\u002Fmain\u002Ftools\u002Fbootstrap.sh | \u002Fopt\u002Fbin\u002Fsh -s -- --version vX.Y.Z --lite\n```\n\nReplace `vX.Y.Z` with a real release tag. The release must contain the binary, `install.sh`, `S99keenproxy`, and `SHA256SUMS`. If assets are still publishing, retry when they are available. Check or stop the service with `\u002Fopt\u002Fetc\u002Finit.d\u002FS99keenproxy status` or `\u002Fopt\u002Fetc\u002Finit.d\u002FS99keenproxy stop`.\n\nFor **native OpenWrt without Entware**, prepare the system dependencies and run the bootstrap with `\u002Fbin\u002Fsh`; see the [native installation guide](docs\u002Fen\u002Fgetting-started.md#native-openwrt-installation). It installs `\u002Fusr\u002Fbin\u002Fkeenproxy`, enables `\u002Fetc\u002Finit.d\u002Fkeenproxy` under procd, and supports panel updates on all six release architectures. Native releases must also contain the checksummed `keenproxy.openwrt` service asset. A release predating that asset cannot be installed or selected as a native rollback target.\n\n```sh\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Fordo-systems\u002Fkeen-proxy\u002Fmain\u002Ftools\u002Fbootstrap.sh | KEENPROXY_PLATFORM=openwrt \u002Fbin\u002Fsh\n```\n\nUse `keenproxy --key -config \u002Fetc\u002Fkeenproxy\u002Fconfig.yaml` and `keenproxy --url -config \u002Fetc\u002Fkeenproxy\u002Fconfig.yaml` for native configuration; the standalone CLI's default configuration path remains the Entware path. Service commands are `\u002Fetc\u002Finit.d\u002Fkeenproxy status`, `start`, `stop`, and `restart`. To uninstall, rerun the native command with `\u002Fbin\u002Fsh -s -- --uninstall`; settings, tokens, and updater preferences are retained. Existing managed Entware installations on OpenWrt are not automatically migrated.\n\nTo remove an installation managed by the bootstrap:\n\n```sh\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Fordo-systems\u002Fkeen-proxy\u002Fmain\u002Ftools\u002Fbootstrap.sh | \u002Fopt\u002Fbin\u002Fsh -s -- --uninstall\n```\n\nThis stops KeenProxy and removes its binary and Entware init script. It keeps the configuration, API token, logs, rule sets, and any previously installed external clients. Reinstall with the regular install command to reuse the saved settings.\n\nFor offline or manual setup, `tools\u002Finstall.sh` copies a supplied executable. It preserves configuration and leaves service setup to the operator. After copying the binary and installer to the router, run:\n\n```sh\n\u002Fopt\u002Fbin\u002Fsh \u002Fopt\u002Ftmp\u002Finstall.sh \\\n  --binary \u002Fopt\u002Ftmp\u002Fkeenproxy-linux-arm64\n```\n\nReview the installer before using it. Existing external TrustTunnel executables are left untouched, but KeenProxy no longer uses them. `--without-trusttunnel` remains accepted at the installer boundary for existing updater binaries; new commands do not need it. The obsolete `--trusttunnel-only` mode has been removed.\n\nEnabling interception changes live LAN traffic. Back up the router configuration, retain SSH access and a tested recovery path, and avoid running competing DNS\u002Finterception tools simultaneously. Even with no selected clients, the DNS frontend intercepts LAN port 53 when enabled. Inspect a candidate configuration before starting:\n\n```sh\n.\u002Fbin\u002Fkeenproxy -dry-run -config \u002Fpath\u002Fto\u002Fconfig.yaml\n```\n\nThe dry-run output contains generated connection settings and may include secrets. Do not post it publicly without review.\n\n## Validation\n\n```sh\nCGO_ENABLED=0 make test\nCGO_ENABLED=0 make vet\ncd web && npm test && npm run build\n```\n\nRun `make integration` separately for real DNS\u002Ffirewall\u002Ftunnel tests in disposable Docker network namespaces. It uses a privileged container to create those namespaces; it does not target your router. Auxiliary Go tools under `tools\u002Fbench` and `tools\u002Fnlprobe` are separate modules.\n\n## Known limits\n\n- IPv4 routing is the current focus. Filtering AAAA responses is not a complete IPv6 leak-prevention policy.\n- A successful periodic HTTP probe proves only that request. It does not certify HTTPS downloads, all destinations, or the actual DNS route.\n- DNS protection depends on the chosen route and failure policy; configuration alone does not prove the absence of DNS leaks.\n- Country data is approximate, and DNS-based routing may be ambiguous on shared\u002FCDN addresses.\n- Rule-set file updates are reloaded asynchronously. A written file does not prove immediate packet-level application.\n- WireGuard file import accepts the supported single-peer subset. Unsupported options, commands, and multiple peers are rejected.\n- AWG import accepts standalone Amnezia `vpn:\u002F\u002F` client exports, not subscription\u002Fservice activation keys or server provisioning profiles. Profile DNS does not change KeenProxy DNS; application UDP needs TPROXY, and participant UDP\u002F443 remains rejected.\n- Firewall recovery uses a polling watchdog; complete firmware hook integration and hardware fast-path acceleration are not claimed.\n- Full-tunnel behavior, kernel features, memory use, and external client compatibility need validation on each router model.\n\n## Contribute\n\nContributions to router compatibility, tests, documentation, localization, diagnostics, and accessibility are welcome. Read [CONTRIBUTING.md](CONTRIBUTING.md), [AGENTS.md](AGENTS.md), and [SECURITY.md](SECURITY.md) before sharing code or diagnostic material. English is the working language for developer documentation and code comments; the interface supports English and Russian.\n\nMaintainers should also read [RELEASING.md](RELEASING.md) before publishing a repository or binary.\n\nInternal work reports and local agent memories are intentionally excluded from the public tree. Public documentation describes supported behavior rather than a private router deployment.\n\n## License and acknowledgements\n\nKeenProxy's original source code is licensed under the **GNU General Public License, version 3 only** (`GPL-3.0-only`). See [LICENSE](LICENSE) for the complete terms. You may use, study, modify, and redistribute it under those terms; distributions must preserve applicable notices and satisfy the license's corresponding-source requirements. The software comes without warranty.\n\nThird-party software and data retain their own licenses; see [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md). In particular, sing-box is GPL-3.0-or-later, and the default DB-IP Lite country database requires attribution: [IP Geolocation by DB-IP](https:\u002F\u002Fdb-ip.com\u002F). Other built-in country databases are listed with their terms in the notices.\n","KeenProxy 是一款面向 Keenetic、Netcraze 及 OpenWrt 路由器的轻量级流量代理管理工具，基于 sing-box-lx 引擎实现精细化分流策略。核心功能包括按设备（MAC）、域名、IP\u002FCIDR、国家\u002F地区进行选择性路由（隧道\u002F直连\u002F拦截），支持 WireGuard、AmneziaWG、DoH\u002FDoT 等协议，内置 Web 管理界面（Vue）提供实时负载监控、配置版本管理、批量策略编辑与 DNS 分流控制。适用于家庭或小型办公场景下需在资源受限路由器（≥256 MiB RAM）上部署可控代理策略的用户，尤其适合 Entware 环境下的嵌入式网络治理。","2026-11-24 04:50:13","CREATED_QUERY"]