You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
KaranGauswami 8e96494075
allow support for passing DNS in the socks_address
10 months ago
.github/workflows refactor: added some tests 10 months ago
src allow support for passing DNS in the socks_address 10 months ago
tests added auth related code from main branch 10 months ago
.gitignore initial commit after worflow 5 years ago
Cargo.lock Merge branch 'main' into feature/structure_and_testing_changes 10 months ago
Cargo.toml added auth related code from main branch 10 months ago
README.md remove no_httpauth flag from cli and some cleanup (#23) 10 months ago

README.md

socks-to-http-proxy Rust release

An executable to convert SOCKS5 proxy into HTTP proxy

About

sthp purpose is to create HTTP proxy on top of the Socks 5 Proxy

How it works

It uses hyper library HTTP proxy example and adds functionality to connect via Socks5

Compiling

Follow these instructions to compile

  1. Ensure you have current version of cargo and Rust installed
  2. Clone the project $ git clone https://github.com/KaranGauswami/socks-to-http-proxy.git && cd socks-to-http-proxy
  3. Build the project $ cargo build --release
  4. Once complete, the binary will be located at target/release/sthp

Usage

sthp -p 8080 -s 127.0.0.1:1080

This will create proxy server on 8080 and use localhost:1080 as a Socks5 Proxy

Options

There are a few options for using sthp.

Usage: sthp [OPTIONS]

Options:
  -p, --port <PORT>                        port where Http proxy should listen [default: 8080]
      --listen-ip <LISTEN_IP>              [default: 0.0.0.0]
  -u, --username <USERNAME>                Socks5 username
  -P, --password <PASSWORD>                Socks5 password
      --http-basic <USER:PASSWD>           HTTP Basic Auth
  -s, --socks-address <SOCKS_ADDRESS>      Socks5 proxy address [default: 127.0.0.1:1080]
      --allowed-domains <ALLOWED_DOMAINS>  Comma-separated list of allowed domains
  -h, --help                               Print help information
  -V, --version                            Print version information