ClashRS

A custom protocol, rule based network proxy software.

CI codecov

✨ Features

🖥 Environment Support

📦 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 <DIRECTORY>
  -c, --config <FILE>          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 <LOG_FILE>    Additinally 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.

🔗 Links

🤝 Contributing

❤️ Inspired By