Crates.io | trojan_rust |
lib.rs | trojan_rust |
version | 0.1.0 |
source | src |
created_at | 2023-12-27 05:11:01.311624 |
updated_at | 2023-12-27 05:11:01.311624 |
description | A library and tool for trojan proxy |
homepage | https://github.com/qiuzhiqian/trojan_rust |
repository | https://github.com/qiuzhiqian/trojan_rust |
max_upload_size | |
id | 1081425 |
size | 21,878 |
这是一个使用rust编写的单纯适用于client场景下的trojan库。为了简化配置,该库尽可能的采用最小化的配置参数。
一个最小化使用的例子会如下面所示:
use tokio::io;
#[tokio::main]
async fn main() -> io::Result<()> {
let proxy = trojan_rust::Proxy::new("127.0.0.1",1080,"yourdomain",443,"yourpassword","yoursni");
proxy.start().await?;
Ok(())
}