SOCKS to HTTP Proxy

Socks to HTTP Proxy (sthp)

Convert a SOCKS5 proxy into an HTTP proxy. A native Rust binary for macOS, Linux, and Windows.

Get connectedshell

# Install

cargo install sthp

# Start your HTTP proxy

sthp -p 8080 -s 127.0.0.1:1080

Why use sthp?

Getting started

Install

Use Cargo, grab a prebuilt binary, or build from source.

Browse releases

Install with Cargo

Prerequisite: Ensure cargo is installed. Install Rust & Cargo from the official guide.

cargo install sthp

Or download prebuilt binaries from GitHub Releases.

Verify your toolchain:

cargo --version

Build from source

git clone https://github.com/KaranGauswami/socks-to-http-proxy.git
cd socks-to-http-proxy
cargo build --release
# binary at target/release/sthp

Make the connection

Quick start

Point sthp at your SOCKS5 proxy and choose an HTTP port.

Connect to a local proxy

sthp -p 8080 -s 127.0.0.1:1080

This starts an HTTP proxy on 127.0.0.1:8080 that forwards via the SOCKS5 proxy at 127.0.0.1:1080.

Connect by hostname

sthp -p 8080 -s example.com:1080

The -s flag supports socks5h semantics (DNS resolves on the SOCKS server); omit any schema like socks://.

Fine-tune your proxy

Options

Configure the listener, authentication, and domain access.

Usage: sthp [OPTIONS]

Options:
  -p, --port <PORT>                        port where Http proxy should listen [default: 8080]
      --listen-ip <LISTEN_IP>              [default: 127.0.0.1]
  -u, --username <USERNAME>                Socks5 username
  -P, --password <PASSWORD>                Socks5 password
  -s, --socks-address <SOCKS_ADDRESS>      Socks5 proxy address [default: 127.0.0.1:1080]
      --allowed-domains <ALLOWED_DOMAINS>  Comma-separated list of allowed domains
      --http-basic <HTTP_BASIC>            HTTP Basic Auth credentials in the format "user:passwd"
  -d, --detached                           Run process in background ( Only for Unix based systems)
  -h, --help                               Print help
  -V, --version                            Print version