GithubHelp home page GithubHelp logo

rust-socks's Introduction

rust-socks

Build Status

Documentation

SOCKS proxy support for Rust.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

rust-socks's People

Contributors

diggsey avatar harrisonmetz avatar pgerber avatar s-rah avatar sfackler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

rust-socks's Issues

Feature Request: Support Timout for Connect Methods

Hi, thanks for this crate.

I recently implemented support for SOCKS in ureq using this crate, using std::thread and condvar for connection timout, which is suboptimal.

I had a look at the implementation of Socks5Stream::connect which uses BufReader so it's not obvious to me how to implement this.

Please could I have some advice how to implement this so I could submit a PR?

Support for socks5h

Is there a way to ensure that DNS resolution is done by the proxy instead of the local machine?

Using socks5h://... normally creates this type of behavior but I'm not sure how that works with this library.

Async support

I'm working on integrating this with reqwest to allow sending proxied requests more easily.

It would be useful to add async support to rust-socks:

  • asynchronous versions of connect and connect_with_password
  • implement AsyncRead and AsyncWrite for the various stream types

why no executable file generated in 'release' dir?

hi.

root@ar:/rust-socks# cargo build --release
Updating registry https://github.com/rust-lang/crates.io-index
Fetch [============================================> ] 82.91%
Fetch [===================================================> ] 96.35%
Downloading libc v0.2.43
Downloading byteorder v1.2.6
Compiling byteorder v1.2.6
Compiling libc v0.2.43
Compiling socks v0.3.1 (file:///root/rust-socks)
Finished release [optimized] target(s) in 25.65 secs
root@ar:
/rust-socks#
root@ar:/rust-socks#
root@ar:
/rust-socks# ls
Cargo.lock Cargo.toml LICENSE-APACHE LICENSE-MIT README.md src target
root@ar:/rust-socks# cd target/release
root@ar:
/rust-socks/target/release# ls
build deps examples incremental libsocks.d libsocks.rlib native
root@ar:/rust-socks/target/release# ls build
root@ar:
/rust-socks/target/release# ls deps
byteorder-29b1e6c8adac7ade.d liblibc-ddc047373b8df290.rlib
libbyteorder-29b1e6c8adac7ade.rlib libsocks-42e117dbf84ea3d6.rlib
libc-ddc047373b8df290.d socks-42e117dbf84ea3d6.d
root@ar:/rust-socks/target/release# ls examples
root@ar:
/rust-socks/target/release# ls native
root@ar:~/rust-socks/target/release#

tks

Example request

Would be helpful to have an example showing how to make HTTP requests via a SOCKS proxy.

Support for Windows ARM64

I'm trying to use some rust libraries which in-turn use rust-socks. The version of winapi 0.2.8 is a bit too old and I think the newer version 0.3.9 works. Is it possible to bump the version? Thanks.

Impl Eq and PartialEq for TargetAddr

/// A description of a connection target.
#[derive(Debug, Clone, Eq, PartialEq)]
pub enum TargetAddr {
    /// Connect to an IP address.
    Ip(SocketAddr),
    /// Connect to a fully qualified domain name.
    ///
    /// The domain name will be passed along to the proxy server and DNS lookup
    /// will happen there.
    Domain(String, u16),
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.