erebe / wstunnel

Tunnel all your traffic over Websocket or HTTP2 - Bypass firewalls/DPI - Static binary available
BSD 3-Clause "New" or "Revised" License
4.34k stars 372 forks source link

Forward Traffic to Another HTTP Proxy with Authentication Using wstunnel #325

Closed CorrM closed 3 months ago

CorrM commented 3 months ago

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.

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

CorrM commented 3 months ago

Duplicate of #324