Skip to content

Encinet/clash-rs

 
 

Repository files navigation

ClashRS

A custom protocol, rule based network proxy software.

CI

✨ 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.
  • 🛡 Run as an HTTP/Socks5 proxy, or utun device as a home network gateway.
  • ⚙️ Shadowsocks/Trojan/Vmess/Wireguard(userspace)/Tor/Tuic 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

Local Build

Dependencies

  • cmake (3.29 or newer)
  • libclang(LLVM)
  • nasm (Windows)
$ 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

Releases

No releases published

Packages

No packages published

Languages

  • Rust 99.6%
  • Other 0.4%