All Projects → p4gefau1t → Trojan R

p4gefau1t / Trojan R

Licence: gpl-3.0
轻量高效的 Trojan 代理,使用 Rust 实现

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Trojan R

Awesome Vpn
Free VPN/proxy,server,account,link list.,实时更新免费的代理,科学上网,翻墙,梯子,服务器,客户端,账号
Stars: ✭ 2,691 (+1446.55%)
Mutual labels:  proxy, gfw, trojan
New Pac
翻墙-科学上网、免费翻墙、免费科学上网、免费自由上网、fanqiang、翻墙梯子、免费软件/方法,一键翻墙浏览器,免费shadowsocks/ss/ssr/v2ray/goflyway账号/节点分享,vps一键搭建翻墙服务器脚本/教程,电脑、手机、iOS、安卓、windows、Mac、Linux、路由器翻墙
Stars: ✭ 31,869 (+18215.52%)
Mutual labels:  proxy, gfw, trojan
V2ray Rules Dat
🦄 🎃 👻 V2Ray 路由规则文件加强版,可代替 V2Ray 官方 geoip.dat 和 geosite.dat,兼容 Shadowsocks-windows、Xray-core、Trojan-Go 和 leaf。Enhanced edition of V2Ray rules dat files, compatible with Xray-core, Shadowsocks-windows, Trojan-Go and leaf.
Stars: ✭ 6,550 (+3664.37%)
Mutual labels:  proxy, gfw, trojan
Delete
(迫于压力,本项目停止维护,请尽快fork代码。1月1日之后删除项目)[免翻墙工具]A free and open-source youtube video proxy script [Written in PHP]
Stars: ✭ 1,316 (+656.32%)
Mutual labels:  china, proxy, gfw
Trojan
An unidentifiable mechanism that helps you bypass GFW.
Stars: ✭ 15,248 (+8663.22%)
Mutual labels:  china, gfw, trojan
Trojan Go
Go实现的Trojan代理,支持多路复用/路由功能/CDN中转/Shadowsocks混淆插件,多平台,无依赖。A Trojan proxy written in Go. An unidentifiable mechanism that helps you bypass GFW. https://p4gefau1t.github.io/trojan-go/
Stars: ✭ 4,049 (+2227.01%)
Mutual labels:  china, proxy, gfw
Dosvpn
🚀 极速、简单、开源的 VPN 访问外网学习先进科学技术的必备工具
Stars: ✭ 485 (+178.74%)
Mutual labels:  proxy, gfw, trojan
Cloak
A censorship circumvention tool to evade detection against state adversaries
Stars: ✭ 942 (+441.38%)
Mutual labels:  proxy, gfw
Xx Net
A proxy tool to bypass GFW.
Stars: ✭ 30,963 (+17694.83%)
Mutual labels:  proxy, gfw
Trojanx
A bare-bones Trojan (as in the anti-GFW tool) GUI client for macOS, written in Swift and shell.
Stars: ✭ 45 (-74.14%)
Mutual labels:  gfw, trojan
Shadowsocksx Ng R8
ShadowsocksX-NG-R for MacOS, ShadowsocksR
Stars: ✭ 1,066 (+512.64%)
Mutual labels:  proxy, gfw
Clash Rules
🦄️ 🎃 👻 Clash Premium 规则集(RULE-SET),兼容 ClashX Pro、Clash for Windows 客户端。
Stars: ✭ 706 (+305.75%)
Mutual labels:  proxy, gfw
Free
翻墙、免费翻墙、免费科学上网、免费节点、免费梯子、免费ss/v2ray/trojan节点、蓝灯、谷歌商店、翻墙梯子
Stars: ✭ 16,689 (+9491.38%)
Mutual labels:  gfw, trojan
V2ray Core
A platform for building proxies to bypass network restrictions.
Stars: ✭ 13,438 (+7622.99%)
Mutual labels:  proxy, trojan
Breaking Gfw Book
整理所有的翻墙方法,持续更新....欢迎PR
Stars: ✭ 105 (-39.66%)
Mutual labels:  gfw, trojan
Arbitrium Rat
Arbitrium is a cross-platform, fully undetectable remote access trojan, to control Android, Windows and Linux and doesn't require any firewall exceptions or port forwarding rules
Stars: ✭ 938 (+439.08%)
Mutual labels:  proxy, trojan
Blinksocks
A framework for building composable proxy protocol stack.
Stars: ✭ 587 (+237.36%)
Mutual labels:  proxy, gfw
Tinylist
Tiny version of gfwlist, focusing on common websites ONLY
Stars: ✭ 139 (-20.11%)
Mutual labels:  china, gfw
Shadowrocket Adblock Rules
提供多款 Shadowrocket 规则,带广告过滤功能。用于 iOS 未越狱设备选择性地自动翻墙。
Stars: ✭ 12,447 (+7053.45%)
Mutual labels:  proxy, gfw
Pichi
Flexible Rule-Based Proxy
Stars: ✭ 149 (-14.37%)
Mutual labels:  proxy, trojan

Trojan-R

高性能的 Trojan 代理,使用 Rust 实现。为嵌入式设备或低性能机器设计。R 意为 Rust / Rapid。

Trojan-R 目前为实验性项目,仍处于重度开发中,协议、接口和配置文件格式均可能改变,请勿用于任何生产环境。

特性

  • 极致性能

    牺牲部分灵活性,采用激进的性能优化策略以极力减少不必要的开销。采用更高效rustls (相较 openssl)建立 TLS 隧道以提升加解密的性能表现。

    使用 tokio 异步运行时,允许 Trojan-R 同时使用所有 CPU 核心,保证低时延和高效的吞吐能力。

    需要更多 benchmark 数据和更多优化

  • 低内存占用

    Rust 无 GC 机制,内存占用可被预计。简化的握手和连接流程,仅使用极少的堆内存和复制。

    需要更多 benchmark 数据和更多优化

  • 简易配置

    使用 toml 格式配置,仅需数行配置即可启动完整客户端或服务器。

  • 内存安全

    使用 Rust 语言实现,可证明的内存安全性。在语法层面保证所有内存操作安全可靠。无竞争条件,无悬挂指针,无 UAF,无 Double Free。

  • 密码学安全

    使用 rustls 建立 TLS 加密安全信道,过时的或不安全的密码学套件均被禁用Trojan-R 强制开启服务器证书校验以防止中间人攻击。

  • 隐蔽传输

    Trojan-R 使用 TLS 建立代理隧道,难以从正常 TLS 流量中被区分。支持协议回落,在遭到主动探测时将与普通 TLS 服务器表现一致。

  • 跨平台支持

    Trojan-R 可被交叉编译,支持 Android, Linux,Windows 和 MacOS 等操作系统,以及 x86,x86_64,armv7,aarch64 等硬件平台。

非特性

由于与项目的设计原则冲突,下列特性不计划实现

  • 统计功能,包括 API 和数据库对接等

  • 路由功能

  • 用户自定义协议栈

  • 透明代理

如果需要实现上述功能,请使用其他类似工具与 Trojan-R 组合实现。

设计原则

  • 安全性

    Trojan-R 不涉及底层操作,且目前的性能瓶颈与其无关,无使用 unsafe rust 的必要。协议回落和 TLS 配置等安全敏感代码经过仔细考虑和审计,同时也欢迎更多来自开源社区的安全审计。

    目前 Trojan-R 使用 #![forbid(unsafe_code)] 禁用 unsafe rust。如未来有必要使用 unsafe rust 时,必须经过严格审计和测试。

  • 使用静态分发而非动态分发

    协议实现使用统一的 trait。协议嵌套使用静态分发,以保证嵌套协议栈的函数调用关系在编译时被确定,使编译器可以进行内联和更好的优化。

  • 低内存分配

    减少热点代码的内存分配,用引用替换复制,以实现更高的性能和更低的内存开销。

  • 简洁

    保持最简洁干净的实现,以保证最低的代码复杂度,尽可能少的性能开销,并增加可靠性和减少攻击面。

部署和使用

Trojan-R 使用 toml 进行配置,参考 config 文件夹下配置文件。

编译

cargo build --release

交叉编译基于 cross 完成,编译前请确认已经安装 cross (cargo install cross)

make armv7-unknown-linux-musleabihf

编译默认开启链接时优化,以提升性能并减小可执行文件体积,因此编译耗时可能较其他项目更长。

编译完成后可以使用 strip 去除调试符号表以减少文件体积。

TODOs

  • [ ] 更完善的交互接口和文档

  • [ ] 更多的单元测试和集成测试

  • [ ] 性能调优

  • [ ] 可复现的 benchmark 环境

  • [ ] 实现 lib.rs 和导出函数

  • [x] 分离客户端和服务端 features

  • [ ] Github Actions

致谢

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].