Skip to content

Rust version of chnroutes (with more features), to bypass the VPN accessing CN IPs.

License

Notifications You must be signed in to change notification settings

lxl66566/chnroutes-rs

Repository files navigation

chnroutes-rs

简体中文 | English

chnroutes 的 Rewrite it in Rust 版本。

  • 本地缓存路由信息,每 7 天更新
  • 调用 API,快速(windows 1w 条写入仅需 30ms)

安装

有几种不同方法可以安装此程序,您可以选择其中任意一种

  • Releases 中下载文件并解压,放入 C:\Windows\System32(如果您用的是 windows)或任意 Path 目录下。
  • 使用 bpm
    bpm i chnroutes-rs -b chnroutes -q
  • 使用 scoop
    scoop bucket add absx https://github.com/absxsfriends/scoop-bucket
    scoop install chnroutes-rs
  • 使用 cargo:
    cargo  nightly install chnroutes
    cargo-binstall
    cargo binstall chnroutes

使用

命令行

chnroutes export -p windows         # 导出路由表操作脚本,与原版 chnroutes.py 功能几乎一致(不推荐使用)
chnroutes up                        # 写入路由表项
chnroutes down                      # 移除路由表项

由于在 updown 时直接调用系统 API,速度非常快,建议直接使用此方式,而不是原版的导出脚本执行。此方式需要管理员/root 权限。

查看 examples

开发

rustup install nightly-2024-04-29
rustup override set nightly-2024-04-29
cargo build --release --bin chnroutes --features=build-binary

TODO

About

Rust version of chnroutes (with more features), to bypass the VPN accessing CN IPs.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages