{"repo":"PinkD/corplink-rs","free":true,"listed":false,"github":"https://github.com/PinkD/corplink-rs","clone":"git clone https://github.com/PinkD/corplink-rs.git","description":"使用 rust 实现的飞连客户端","language":"Rust","stars":388,"topics":["wireguard","corplink"],"license":"GPL-2.0","category":"networking-infra","readme_excerpt":"corplink-rs 使用 rust 实现的 [飞连][1] 客户端，支持 Linux/Windows10/MacOS 安装 ArchLinux 下载 release 中的安装包，并安装 欢迎贡献其它包管理器的打包脚本 手动编译 linux/macos windows 前提 : 需要 Go (≥1.22)、GCC (MinGW-w64)、make、Rust (GNU 工具链)。 安装工具链后，在 PowerShell 中执行： 编译的 build.ps1 会调用 make libwg ，该目标会以 CGO ENABLED=1 编译 Go 代码。 MinGW GCC 需要在 PATH 中，且 make 需要支持 bash 风格环境变量语法。 也可在 MSYS2 UCRT64 环境中执行 ./build.sh （同样需要 Go + GCC）。 用法 该程序需要 root 权限来启动 wg-go (windows 上需要管理员权限) windows 使用说明 快速开始（推荐使用预编译版本） 1. 从 Releases 下载 corplink-rs- -windows.zip 2. 解压到任意目录 3. 运行 setup.ps1 自动获取 wintun.dll ： 4. 编辑 config.json ，填入公司代码和登录信息（见下方配置文件实例） 5. 以 管理员身份 打开 PowerShell，运行： wintun.dll 说明 corplink-rs 依赖 [Wintun][6] 虚拟网卡驱动来创建 WireGuard 隧道。由于 Wintun 的许可证要求用户从[官网][6]直接获取，我们无法在 release 包中附带该文件。 setup.ps1 脚本会自动从 wintun.net 下载并解压 amd64 版本的 wintun.dll 到当前目录。 手动获取：访问 [wintun.net][6]，下载 zip 包，将 bin/amd64/wintun.dll 复制到 corplink-rs.exe 所在目录。 管理员权限 程序需要管理员权限，原因： - wg-go 需要创建 TUN 虚拟网卡 - 配置系统路由表（自动添加 VPN 路由） 如果运行时提示 please run as administrator ，右键 PowerShell 选择\"以管理员身份运行\"。 常见问题 - wintun.dll 找不到 ：运行 setup.ps1 或手动下载放入同目录 - 配置文件 JSON 不支持注释 ：示例中的 // comment 需要删除 - 路由未生效 ：检查是否以管理员运行，关闭其他 VPN 软件避免路由冲突 macos 特殊说明 macos 要求 tun 设备的名称满足正则表达式 utun[0-9] ，因此需要将配置文件中的 interface name 改为符合正则的名字，例如 utun12345 另外， utun 后的数字类型应该是 int16 ，如果大于 32767 会报错 Failed to create TUN device: invalid argument 。具体参考 #46 log level 配置 本项目使用 env logger 作为 log 库，修改 log level 需要使用环境变量，示例： 配置文件实例 最小配置 推荐配置(自用配置) 完整配置 SOCKS5 / netstack 模式 设置 socks5 listen 后，corplink-rs 不再创建内核 TUN 网卡，而是用 [wg-go][2] 的 gVi","default_branch":null,"files":null,"tree":[],"storefront":"/r/PinkD","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/PinkD/corplink-rs/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}