wzshiming / bridge

Bridge is a multi-level proxy that supports clients and servers with multiple protocols. SSHProxy, HTTPProxy, Socks4, Socks5, Shadowsocks.
MIT License
158 stars 15 forks source link

Question about tool usage. #10

Closed danriedl closed 7 months ago

danriedl commented 7 months ago

Hi,

I want to use this tool to produce a socks5 to http-proxy connection. In detail, I want to spawn a socks5 server on my device where a client application can connect to. My device is behind a corporate proxy which has basic authentication, so I also have to provide that, so the application can talk to a website on the internet.

I tried several command variants, but it always states: err="dial http: unknown network http" or err="dial http: unknown network socks5".

Do you have a proposal of what I could try, to get this up and running? Also, it would help, to have some example usages for common use cases on the README or in the wiki.

Thanks in advance!! Best regards, Dan

wzshiming commented 7 months ago

I guess you missed -p -, this bridge only supports tcp forwarding in the beginning, the first flag -p - indicates that it is not a pure tcp forwarding but a proxy

bridge -b :8080 -p - -p http://you-proxy-server
danriedl commented 7 months ago

Yes that did the trick. Thank you!