ClashRS Watfaq Technologies Pty Ltd
winget install --id=Watfaq.ClashRS -e
A custom protocol, rule based network proxy software.
ClashRS is a custom protocol, rule-based network proxy software designed for advanced traffic management and routing. It provides flexible configuration options to handle complex network scenarios with precision.
Key Features:
- Flexible traffic routing rules based on source/destination IP, domain, GeoIP, and more.
- Local anti-spoofing DNS support for UDP/TCP/DoH/DoT protocols, capable of exposing a local server.
- Operates as an HTTP/Socks5 proxy, or integrates with utun devices to function as a network gateway.
- Supports multiple outbound protocols including Shadowsocks, Trojan, Vmess, Wireguard (userspace), Tor, Tuic, and Socks5 (TCP/UDP) with various transport options like gRPC, TLS, H2, WebSocket, etc.
- Dynamic remote rule and proxy loader for real-time updates.
- Cross-platform support for Linux, macOS, Windows, and iOS via TestFlight.
Audience & Benefit:
Ideal for developers, network administrators, and tech-savvy users who require precise control over network traffic routing and protocol handling. It offers enhanced flexibility, performance, and security for managing complex networking environments.
ClashRS can be installed via winget on compatible systems.
README
ClashRS
β¨ 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
$ cargo build
π¨ Usage
Example Config
sample.yaml:
port: 7890
Run
-> % ./target/debug/clash -c sample.yaml
Help
-> % ./target/debug/clash-rs -h
Usage: clash-rs [OPTIONS]
Options:
-d, --directory
-c, --config Specify configuration file [default: config.yaml] [short aliases: f]
-t, --test-config Test configuration and exit
-v, --version Print clash-rs version and exit [short aliases: V]
-l, --log-file Additionally log to file
--help-improve Enable crash report to help improve clash
-h, --help Print help
FFI
Compile for apple platforms
To create a framework for iOS and macOS platforms
git clone https://github.com/Watfaq/clash-rs.git
cd clash-rs
chmod +x scripts/build_apple.sh
./scripts/build_apple.sh
This command will generate a clashrs.xcframework
file in the build
directory.