Crates.io | protosocks |
lib.rs | protosocks |
version | 0.7.0 |
source | src |
created_at | 2020-06-08 10:19:29.266884 |
updated_at | 2020-06-23 11:01:32.03886 |
description | Socks5 protocol lib in Rust (RFC1928 and RFC1929) |
homepage | https://github.com/hlzhang/protosocks/ |
repository | https://github.com/hlzhang/protosocks/ |
max_upload_size | |
id | 251277 |
size | 146,816 |
Socks5 protocol lib in Rust
Its design goals are simplicity and robustness. Its design anti-goals include complicated compile-time computations, such as macro or type tricks, even at cost of performance degradation.
Features
RFC1928
RFC1929
IPv4
IPv6
Test by using rust-lang Docker image
docker run --rm -it -v "${PWD}:/volume" --workdir "/volume" -e RUST_BACKTRACE=full -e RUST_LOG=debug rust:latest cargo test --lib -- --exact --nocapture --test-threads=1
Test different combinations of features
cargo test --no-default-features --features=proto-ipv4
cargo test --no-default-features --features=proto-ipv6
cargo test --no-default-features --features=proto-ipv4,proto-ipv6
cargo test --no-default-features --features=proto-ipv4,proto-ipv6,std
cargo clippy --all --all-targets
cargo fmt --all -- --check
Generate test coverage report (cargo-tarpaulin)
docker run --rm -it --security-opt seccomp=unconfined -v "${PWD}:/volume" xd009642/tarpaulin sh -c "cargo tarpaulin --ignore-tests --out Html"
#docker run --rm -it --security-opt seccomp=unconfined -v "${PWD}:/volume" xd009642/tarpaulin sh -c "cargo tarpaulin --run-types Doctests --all"
#docker run --rm -it --security-opt seccomp=unconfined -v "${PWD}:/volume" xd009642/tarpaulin sh -c "cargo tarpaulin --run-types Tests --all"
#docker run --rm -it --security-opt seccomp=unconfined -v "${PWD}:/volume" xd009642/tarpaulin sh -c "cargo tarpaulin --run-types Doctests Tests --all"