#routes #vpn #bypass

nightly bin+lib chnroutes

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

1 unstable release

0.1.0 May 31, 2024

#1288 in Network programming

Download history 125/week @ 2024-05-27 14/week @ 2024-06-03 4/week @ 2024-06-10

143 downloads per month

MIT license

26KB
633 lines

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,速度非常快,建议直接使用此方式,而不是原版的导出脚本执行。

查看 examples

开发

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

TODO

Dependencies

~7–39MB
~604K SLoC