【文件属性】:
文件名称:async-socks5:async.await SOCKS5实现
文件大小:15KB
文件格式:ZIP
更新时间:2021-04-15 10:05:50
rust async socks5 Rust
异步袜子5
一个async .await 实现。
例子
通过my-proxy-server.com:54321连接到google.com:80 :
use tokio :: net :: TcpStream;
use tokio :: io :: BufStream;
use async_socks5 :: {connect, Result };
#[tokio::main]
async fn main () -> Result <()> {
let stream = TcpStream :: connect ( "my-proxy-server.com:54321" ). await ?;
let mut stream = BufStream :: new (stream);
connect ( & mut stream, ( "google.com" , 80 ),
【文件预览】:
async-socks5-master
----rustfmt.toml(99B)
----.github()
--------workflows()
----LICENSE-APACHE.md(11KB)
----src()
--------lib.rs(25KB)
----Cargo.toml(863B)
----.gitignore(30B)
----CHANGELOG.md(984B)
----README.md(1KB)
----LICENSE-MIT.md(1KB)