wstunnel icon indicating copy to clipboard operation
wstunnel copied to clipboard

Forward Traffic to Another HTTP Proxy with Authentication Using wstunnel

Open CorrM opened this issue 6 months ago • 8 comments

Describe the goal

I am trying to use wstunnel to forward traffic from my local machine to an external HTTP proxy that requires a username and password for authentication. My goal is to have my local machine connect to a VPS via wstunnel, and then have wstunnel on the VPS forward the traffic to the external HTTP proxy.

Maybe something like that but for server:

-p, --http-proxy <USER:PASS@HOST:PORT>
          If set, will use this http proxy to connect to the server [env: HTTP_PROXY=]
      --http-proxy-login <LOGIN>
          If set, will use this login to connect to the http proxy. Override the one from --http-proxy [env: WSTUNNEL_HTTP_PROXY_LOGIN=]
      --http-proxy-password <PASSWORD>
          If set, will use this password to connect to the http proxy. Override the one from --http-proxy [env: WSTUNNEL_HTTP_PROXY_PASSWORD=]

Describe what does not work

wstunnel doesn't respect http_proxy env variable

Describe your wstunnel setup

Client:

wstunnel client -L socks5://127.0.0.1:8888 --connection-min-idle 5 wss://<VPS_IP>:8080

Server:

#!/bin/bash

export http_proxy=http://<USER>:<PASS>@<PROXY_IP>:<PROXY_PORT>
export https_proxy=http://<USER>:<PASS>@<PROXY_IP>:<PROXY_PORT>

wstunnel server wss://[::]:8080

Desktop

  • OS: Linux Ubuntu x86_64
  • Version: 6.8.0-38-generic

CorrM avatar Jul 28 '24 13:07 CorrM