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.

user
  • 30,336

2 Answers2

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.

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
HappyFace
  • 1,389