πΊπΈ English | π·πΊ ΠΠ° ΡΡΡΡΠΊΠΎΠΌ
π€ Why sing-box ?
sing-box is an open-source universal proxy engine written in Go. It is focused on maximum performance, low resource consumption, and support for the most modern protocols
Comparison: Proxy Engines for Routers & Embedded
| Feature | sing-box | Xray | mihomo |
|---|---|---|---|
| Resource Usage (RAM/CPU) | β Minimal | β High | |
| Protocol Support | β Advanced | β Extensive | |
| Multiplexing | β Superior | β Good | |
| DNS Logic | π₯ Native (+Fake-IP) | π₯ Sniffing (+FakeDNS) | π₯ Fake-IP (+Real) |
| L7 Sniffing (Protocols) | β Leader | β Domain-only | |
| Routing | β Flexible | β (but heavier) | |
| Rule Management | β Rule-sets (bin) | β Rule-providers | |
| Independent Project | β Yes | β (V2Ray fork) | β (Clash fork) |
| Learning Curve | π΄ High | π‘ Moderate | π’ Low |
Notes:
sing-box excels due to its modularity and clean-slate architecture: its DNS stack enables complex configurations with minimal RAM overhead. In contrast, mihomo (Clash) prioritizes automation at the cost of high resource usage, while Xray is hindered by legacy networking code and heavy .dat geo-files.
Sniffing Differences: sing-box and Xray utilize full DPI (Deep Packet Inspection), which allows them to identify the protocol type (e.g., BitTorrent) based on packet content. In contrast, mihomo is limited to metadata extraction (domains) from TLS/HTTP headers, making protocol-based routing impossible.
The high learning curve of sing-box stems from its strict JSON schema and lack of "magic" defaults. This is a trade-off for granular control and peak performance on low-end hardware.
π₯οΈ Web UI ?
π‘ To simplify configuration, a sync plugin is available to import profiles via GUI.for.SingBox
The project intentionally does not include a dedicated management panel. This approach offers several advantages for your router:
- Resource Efficiency: Bypassing heavy WebUIs saves RAM and reduces CPU overhead, preserving system resources for high-speed routing and encryption.
- Seamless Integration: Monitoring and basic management are already handled by the built-in Zashboard interface, making additional UIs redundant.
- System Security & Stability: Fewer active web services and open ports minimize the potential attack surface and reduce the risk of software conflicts within KeeneticOS.
- No Functional Limits: Direct configuration via CLI/files ensures access to 100% of Sing-Box's features, which are often restricted or oversimplified in graphical interfaces.
- Minimalist Footprint: The script remains lightweight with zero dependencies, requiring no extra packages like web servers or interpreters that consume valuable flash storage.
- A Tool, Not a Toy: While other projects compete to draw pretty buttons and flashy graphsβeffectively turning a router into a laggy digital photo frame SKeen focuses on moving packets. We consider building heavy web panels for a network script a sign of poor engineering and an inability to handle the system directly. If you need a Christmas tree with a UI, you're in the wrong place; if you need performance, you've arrived.
π§© Architecture ?
The goto PREROUTING chain in the nat table is used under the name skeen:
It follows this rule order:
- ACCEPT - bypasses all router policies based on
fwmark, except for those configured in skeen.json (optional). - ACCEPT - bypasses ports defined in
skeen.json(only if the "work on selected ports" option is disabled). - ACCEPT - bypasses local, reserved, and user-defined addresses.
- REDIRECT - redirects TCP traffic to the Sing-Box
redirectport.
TProxy - utilized in tproxy (TCP & UDP) and hybrid (UDP) modes, as well as for router-level proxying
The goto PREROUTING chain in the mangle table is used under the name skeen:
It follows this rule order:
- ACCEPT - bypasses all router policies based on
fwmark, except for those configured in skeen.json (optional). - DNS TPROXY - redirects TCP/UDP port 53 traffic to the Sing-Box TProxy port (optional, otherwise - ACCEPT).
- ACCEPT - bypasses ports defined in
skeen.json(only if the "work on selected ports" option is disabled). - ACCEPT - bypasses local, reserved, and user-defined addresses.
- TCP MARK + ACCEPT SOCKET - a "fast path" for already established transparent sockets (socket transparent).
- TPROXY - directs the remaining TCP/UDP traffic to the Sing-Box TProxy port.
Depending on the firewall mode and router proxying settings (on/off), chains are created in both nat and mangle tables attached to the OUTPUT chain respectively.
Instead of filtering by router policies, it filters processes that do not belong to the skeen group (to prevent routing loops). The rules are applied in the following order:
redirectmode,nattable inOUTPUTnamedskeen_mask: mirrors the logic of the Redirect skeen chain.tproxymode,mangletable inOUTPUTnamedskeen_mask: mirrors the logic of the TProxy chain, except for DNS rules and direct traffic redirection to Sing-Box. Instead, it concludes with:
- MARK - marks local outgoing traffic, which then enters
PREROUTINGwhere it is processed based on this mark. If policy-based routing is enabled in the SKeen config, it is processed via the skeen chain (added as a second instance after the main client chain), or simply directed to the client chain if proxying is configured without policies. - CONNMARK save - saves the mark to the entire connection (conntrack) for firewall "memory."
-
hybridmode utilizes combined rules for router proxying:redirect(TCP) andtproxy(UDP). -
In other modes, the
service_proxyoption can be configured inskeen.json, specifically for Sing-Box updates, SKeen script, and configuration synchronization viaskeen sync.
π΅οΈββοΈ FakeIP ?
The following are intentionally excluded from the bypass list (local network exceptions):
-
Subnet
198.18.0.0/15In the script, the198.18.0.0/15line is commented out. This means traffic to Sing-Box FakeIP addresses will be intercepted and processed by the kernel as intended. This is a deliberate design choice for proper routing. -
Subnet
fc00::/18The IPv6 segmentfc00::/18(Sing-Box Fake-IP range for IPv6) is also excluded from the bypass list for the same reason.
- TProxy/Redirect/Hybrid modes β
- IPv4 and IPv6 supports β
- Sing-box DNS module working β
- Sing-box fakeip working β
- Zashboard via Clash API configured β
- Network settings optimization β
- Commands working via the router's Web CLI β
- Entware installed and configured on non-internal memory
- Netfilter Subsystem Kernel Module installed
curlinstalled viaopkg install curl- Recommended: at least 256 MB of RAM and an ARM processor to unlock full potential
Run from Entware via SSH:
curl -Ls https://github.com/jinndi/SKeen/releases/latest/download/skeen | sh
Configure SKeen. Its configuration file is located at /opt/etc/skeen/skeen.json.
Configure the sing-box JSON configuration file(s) located in the /opt/etc/skeen/config/ directory. Example configuration files are already provided there. Alternatively, you can use your own single configuration file by enabling the sing_config.enable mode.
Zashboard panel is configured by default via the Clash API and can be accessed through the routerβs IP address (usually 192.168.1.1) at http://192.168.1.1:9999
The /opt/etc/skeen directory is not removed during program uninstallation (it must be deleted manually if necessary) and is not overwritten during reinstallation if it already exists.
Manage the package further using the skeen command.
After successful installation:
/opt/
βββ bin/
β βββ skeen # SKeen management script
β βββ skeen-box # sing-box binary
βββ etc/
β βββ init.d/
β β βββ S99SKeen # Autostart script
β βββ ndm/
β β βββ netfilter.d/
β β βββ skeen_firewall.sh # Created on start
β βββ skeen/
β βββ skeen.json # SKeen configuration
β βββ config/ # sing-box config dir
β βββ log.json
β βββ dns.json
β βββ inbounds.json
β βββ outbounds.json
β βββ route.json
β βββ experimental.json
βββ tmp/
βββ (temporary download files)
Example Usage from SSH: start the daemon skeen start
When using the routerβs Web CLI, add exec before the command. For example: exec skeen reload
The output in the WEB CLI is limited to 8 lines and a certain execution time, but this does not affect the correct execution of commands
skeen without parameters launches the management menu from SSH, use help for help
| Command | Description | WEB CLI |
|---|---|---|
start |
Start service | β |
stop |
Stop service | β |
restart |
Restart service | β |
reload |
Restart without changing firewall rules | β |
kill |
Force stop | β |
status |
Show status | β |
version |
Show version(s) | β |
iface |
Show network interface table | - |
update |
Check and install updates | - |
test |
Test firewall rules | β |
deps |
Check dependencies | β |
check |
Check configuration | β |
format |
Format Sing-box configuration | β |
backup |
Create archive of /opt/etc/skeen |
β |
backups |
List created archives in /opt |
β |
restoreΒΉ |
Restore /opt/etc/skeen from archive in /opt |
β |
reset |
Reset /opt/etc/skeen to default |
- |
cleanΒ² |
Clear Sing-box cache file | β |
syncΒ³ |
Synchronize Sing-box configuration | β |
1 - archive name can be passed as the second parameter with a .tar extension to immediately start the backup restore process
2 - clears the cache file. This is required when using the experimental.cache_file feature in sing-box, for example, to reset the cache of loaded rule_set and DNS query history. Starting with sing-box version 1.14, all DNS responses are stored in the cache (previously only rejected ones)
3 - accepts the Sing-box JSON configuration URL as the second parameter (HTTP or HTTPS); optional if the address is set in sing_config.sync_url
| OpkgTun manager (KeeneticOS v5+, only from SSH) |
|---|
skeen tun create <ipv4> <name> - Create interface with IP address and name |
skeen tun delete <name> - Delete interface by name |
skeen tun list - List all OpkgTun interfaces |
If access to Entware SSH is lost, run the following command in the Web CLI:
exec /opt/etc/init.d/S51dropbear start
Note
After making changes to the file, a restart via skeen restart or through the menu is required
The file /opt/etc/skeen/skeen.json has the following settings:
- Sync plugin: https://github.com/jinndi/sync-profile-to-skeen
- Sing-box schema: https://gist.github.com/artiga033/fea992d95ad44dc8d024b229223b1002
- Proxy setup guide: https://proxy-tutorials.dustinwin.us.kg
- Outbound server block generator: https://4n0nymou3.github.io/proxy-to-singbox-converter/
- Karing ruleset: https://github.com/KaringX/karing-ruleset/tree/sing

{ "auto_start": { "enable": 1, // SKeen autostart on router reboot (0 = disabled) "delay": 0 // Auto-start delay in seconds (default: 0) }, "policy": { "enable": 1, // Enable policy-based routing (0 = disabled) "name": "SKeen" // Router policy name (default: "SKeen") }, "network": { "ipv6": 1, // Enable IPv6 support (0 = disabled) "tuning": 0, // Enable sysctl network optimization (1 = on). // If disabled, sysctl settings reset after reboot. "check": [ "1.1.1.1", "77.88.8.8", "223.5.5.5" ] // Domains or IPs V4 for connectivity tests (max 3) }, "sing_config":{ "enable": 0, // If set to 1, a single sing-box configuration file // located at /opt/etc/skeen/config.json will be used // instead of the default folder /opt/etc/skeen/config "path": "", // You can specify your own path (full path) "sync_url": "", // URL (http:// or https://) from which the configuration will be synced // using the `skeen sync` command by default (optional) }, "service_proxy": { "enable": 0, // Enable using a local proxy (127.0.0.1) for update and sync commands "port": "", // Local proxy port (e.g., SOCKS5 or mixed) "user": "", // Username for connection (optional) "pass": "" // Password for connection (required if user is specified) }, "firewall": { "intercept": { "dns": 1, // Intercept DNS req. via TProxy/Hybrid modes (0 = disabled), // ignored if redirect_dns is configured (see below) "port": [] // Ports to intercept (all if empty). // Example: [ 80, 443, "1000:2000", "1500:5555" ] }, "exclude": { "port": [ "137:139", // Ports excluded from redirect 445, 1900 // (ignored if `intercept.port` is set) ], "ipv4_cidr": [], // Excluded IPv4 subnets for redirection. // Example: [ "192.87.1.0/24", "192.12.1.1" ] "ipv6_cidr": [] // Excluded IPv6 subnets for redirection. // Example: [ "2001:db8::/32", "2001:db8::1" ] }, "redirect_dns": { "enable": 0, // Set to 1 to enable DNS redirection before system rules "to_port": "", // The port to which DNS requests will be redirected "use_policy": 1 // Use defined policy if configured (0 = disabled) }, "proxy_router": 0 // If set to 1, all router services will be proxied. // Available in redirect, tproxy, and hybrid modes; // subnet exclusions, as well as port bypass and interception rules, are respected. } }