inn-network

Crates.ioinn-network
lib.rsinn-network
version0.1.1
sourcesrc
created_at2022-05-27 02:31:03.923728
updated_at2022-06-07 09:30:08.715309
descriptionA network library for Inn
homepagehttps://github.com/black-mongo/inn
repositoryhttps://github.com/black-mongo/inn
max_upload_size
id594734
size74,340
Cam (yangcancai)

documentation

https://docs.rs/inn

README

inn-network - A network library for Inn

Report a Bug ยท Request a Feature . Ask a Question

Build and Test codecov License

Features

Supported

  • Socks5 protocol
  • Socks5 proxy server(Noauth or UserName/Password)
  • Http/Https proxy protocol.

Example

use actix::System;
use inn_network::{proxy::Proxy, NetWork};
#[actix_rt::main]
async fn main() {
    env_logger::init_from_env(env_logger::Env::new().default_filter_or("debug"));
    //
    let sock5 = async {
        let _ = NetWork.start("127.0.0.1", 4556, || {}).await;
    };
    let http_proxy = async {
        Proxy::start_proxy("127.0.0.1:4557", "ca/ca/cacert.pem", "ca/ca/cakey.pem").await;
    };
    tokio::join!(sock5, http_proxy);
    System::current().stop();
}

Contributing

First off, thanks for taking the time to contribute! Contributions are what makes the open-source community such an amazing place to learn, inspire, and create. Any contributions you make will benefit everybody else and are greatly appreciated.

Please try to create bug reports that are:

  • Reproducible. Include steps to reproduce the problem.

  • Specific. Include as much detail as possible: which version, what environment, etc.

  • Unique. Do not duplicate existing opened issues.

  • Scoped to a Single Bug. One bug per report.

License

Inn is licensed as MIT

Commit count: 103

cargo fmt