3

How can I allow a program, which only supports talking through a HTTP proxy, to talk through a SOCKS proxy? In other words, take the HTTP-proxy request and turn it into a SOCKS-proxy request which gets forwarded to the SOCKS proxy, and pass the returned data back to the program through the HTTP proxy.

I need a solution that works on Debian Linux, preferably using software that is prepackaged in Debian's main repository.

The chain of communications would be: My program -> HTTP proxy (local) -> SOCKS proxy (local) -> External access

I found a handful of questions about doing it the other way around (a SOCKS proxy forwarding to a HTTP proxy), but that doesn't help me. HTTP proxy server for Windows that forwards to SOCKS proxy is similar to what I want, but since it asks for Windows solutions it doesn't help me.

4
  • You can use TorSocks for this. It's a preloadable library that redirects programs to use a socks proxy. It's typically used to redirect to Tor, but it can redirect to anything. Commented Nov 23, 2015 at 12:21
  • @DavidSchwartz Interesting! It doesn't exactly match the question title, but it does seem to allow me to do what I want to be able to (have the original application talk through a SOCKS proxy). Would you be willing to post that as an answer?
    – user
    Commented Nov 23, 2015 at 13:09
  • DeleGate is not just for Windows, it exists for all OSes, just look here, delegate.hpcc.jp/pub/DeleGate/bin/linux/9.9.13 Commented Nov 23, 2015 at 15:14
  • forward-socks5 of Privoxy can also achieve this.
    – Weekend
    Commented Nov 13, 2021 at 21:34

2 Answers 2

1

You can use TorSocks for this. It's a preloadable library that redirects programs to use a socks proxy. It's typically used to redirect to Tor, but it can redirect to anything.

1
  • tsocks IIRC is the program torsocks uses or is based on, and can be configured to redirect to anything you want.
    – LawrenceC
    Commented Nov 23, 2015 at 15:47
0

v2ray and https://github.com/oyyd/http-proxy-to-socks both can do this.

An example of using the latter:

npm install -g http-proxy-to-socks

Exposes the socks proxy on port 1078 as an HTTP proxy on port 1088:

hpts --level info -s 127.0.0.1:1078 -p 1088

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .