flowchart TD
subgraph Host
H1[File Watcher]
H2[Git Agent]
H3[Debug Agent]
H4[Build/Test Runner]
end
subgraph Client
C1[File Watcher]
C2[Git Agent]
C3[Debug Agent]
C4[Build/Test Runner]
end
subgraph SSH
S1[Secure Tunnel]
end
subgraph Coordination
M1[Root Agent]
M2[Sub-Agent: Repo]
M3[Sub-Agent: Service]
end
H1 --"Detects changes"--> H2
H2 --"Commits & pushes deltas"--> S1
S1 --"Syncs deltas"--> C2
C2 --"Applies/merges deltas"--> C1
H2 --"Notifies"--> M1
C2 --"Notifies"--> M1
M1 --"Coordinates debug session"--> H3
M1 --"Coordinates debug session"--> C3
H3 --"Runs diagnostics"--> H4
C3 --"Runs diagnostics"--> C4
H4 --"Reports results"--> M1
C4 --"Reports results"--> M1
M1 --"Escalates/Delegates"--> M2
M2 --"Communicates"--> M3
M1 --"Aggregates state"--> S1
H2 --"Resolves conflicts"--> C2
C2 --"Resolves conflicts"--> H2
S1 --"Enables tmux/VSCode Live Share"--> H3
S1 --"Enables tmux/VSCode Live Share"--> C3
AI: DO NOT TOUCH
- Ingress:
s?w?lan*→ Port 8888 ← Egress:rmnet* - Linked tools:
ifconfig,netstat,route,ip
- Main binary:
litebike(argv0-dispatch) - Hardlink/symlink invocation: acts as
ifconfig,ip,route,netstat(minimal syscall-only implementations) - Additional commands:
probe,domains,carrier,radios,snapshot,watch
litebike ifconfig [iface]— List interfaces and addresseslitebike ip [args]— IP utility emulationlitebike route— Print routing tablelitebike netstat [args]— Show socket stateslitebike probe— Show best-effort egress selections for v4/v6litebike domains— Domain info utilitylitebike carrier— Carrier info utilitylitebike radios [args]— Radio info utilitylitebike snapshot [args]— Print config snapshotlitebike watch [args]— Watch utility
- Environment variables:
-
LITEBIKE_BIND_PORT(default: 8888) -LITEBIKE_INTERFACE(default: swlan0) -LITEBIKE_LOG(default: info) -LITEBIKE_FEATURES(comma-separated) -EGRESS_INTERFACE(default: auto) -EGRESS_BIND_IP(default: auto) -LITEBIKE_BIND_ADDR(optional)
- Multi-protocol detection on unified port (HTTP, SOCKS5, TLS, DoH, PAC/WPAD, Bonjour, UPnP)
- Protocols enumerated in code: HTTP, HTTPS, SOCKS5, TLS, DNS, DoH, PAC, WPAD, Bonjour, UPnP, and many more (see
src/types.rs)
- All tools use direct syscalls via
libc(no /proc, /sys, /dev on Android) - Netlink sockets for routing info
- ioctl for interface enumeration
- Minimal Rust wrappers, C-style code for compatibility
- Integration/unit/bench scaffolding in
tests/ - Example: list interfaces and default gateway
rust use literbike::syscall_net::{list_interfaces, get_default_gateway}; fn main() -> std::io::Result<()> { let ifaces = list_interfaces()?; for (name, iface) in ifaces { println!("{}: {:?}", name, iface.addrs); } if let Ok(gw) = get_default_gateway() { println!("Default gateway: {}", gw); } Ok(()) }
- Bonjour-Powered Auto-Discovery: The key to a seamless, plug-and-play experience.
- Versatile Proxying: A robust, multi-protocol proxy server that handles modern web traffic.
- UPnP Support: Enables automatic port forwarding when needed.
proxy-bridgeScript: A companion script that automates the tedious task of setting and clearing proxy configurations in all your common shell (.*rc) files.- Cross-Platform: Works on Android/Termux, macOS, Linux without modification.
- Legacy Compatibility: Drop-in replacement for
ifconfig,netstat,route,ip.
LiteBike is designed to intelligently manage network interfaces for optimal proxying:
- Default Ingress: The proxy typically listens on WiFi interfaces, often matching patterns like
s?wlan*. - Default Egress: Outgoing traffic is routed through mobile data interfaces, commonly
rmnet*, with built-in backoff logic for reliable connectivity.