ClashRS
A custom protocol, rule based network proxy software.
[![CI](https://github.com/Watfaq/clash-rs/actions/workflows/ci.yml/badge.svg)](https://github.com/Watfaq/clash-rs/actions/workflows/ci.yml)
āØ Features
- š Flexible traffic routing rules based off source/destination IP/Domain/GeoIP etc.
- š¦ Local anti spoofing DNS with support of UDP/TCP/DoH/DoT remote, and expose it as a local UDP/TCP/DoH/DoT server.
- š” Run as an HTTP/Socks5 proxy, or utun device as a home network gateway.
- āļø Shadowsocks/Trojan/Vmess/Wireguard(userspace)/Tor/Tuic/Socks5(TCP/UDP) outbound support with different underlying trasports(gRPC/TLS/H2/WebSocket/etc.).
- š Dynamic remote rule/proxy loader.
- šµ Tracing with Jaeger
š„ Environment Support
- Linux
- macOS
- Windows
- You need to copy the wintun.dll file which matches your architecture to the same directory as your executable and run you program as administrator.
- iOS - TestFlight
š¦ Install
Use With GUI
https://github.com/LibNyanpasu/clash-nyanpasu
Download Prebuilt Binary
Can be found at https://github.com/Watfaq/clash-rs/releases
Docker Image
https://github.com/Watfaq/clash-rs/pkgs/container/clash-rs
Local Build
Dependencies
- cmake (3.29 or newer)
- libclang(LLVM)
- nasm (Windows)
- protoc(for geodata proto generation)
$ cargo build
šØ Usage
Example Config
sample.yaml:
port: 7890
Run
-> % ./target/debug/clash -c sample.yaml
Help
-> % ./target/debug/clash -h
Usage: clash [OPTIONS]
Options:
-d, --directory <DIRECTORY>
-c, --config <FILE> [default: config.yaml]
-t, --test
-h, --help Print help
-V, --version Print version
š Links
š¤ Contributing
ā¤ļø Inspired By