OmarTariq612 / http2socks

An HTTP Proxy that relays traffic to a SOCKS server.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Please add method allow Http Proxy with Authentication

tungphan899 opened this issue · comments

Verry nice project, but can you please add Authentication to Http Proxy ?

Done, you can now use http basic auth and provide a username and a password using this command:
./http2socks --socks 192.168.1.10:1080 --cred user:pass
replace 192.168.1.10:1080 with your socks server address.
but this method of authentication is not secure as any one in the middle can see the encoded username and password in clear text.

The spec of the socks version 5 protocol has support for 3 types of addresses (ipv4 and ipv6 addresses and domain names) but it's the client's decision whether to resolve DNS locally or proxy DNS by specifying the domain name inside the request to the socks server.
ex: in firefox you can find an option for whether you'd like to resolve DNS locally or proxy DNS through the socks server:
b66c7085-63d9-4985-82b1-131d085e0cba
another example using curl:
Screenshot from 2022-09-27 12-34-19
the difference between --socks5 and --socks5h is that --socks5 resolves DNS locally but --socks5h sends the domain name as it is to the socks server.

socks 5 spec (rfc 1928): https://www.rfc-editor.org/rfc/rfc1928