apify / proxy-chain

Node.js implementation of a proxy server (think Squid) with support for SSL, authentication and upstream proxy chaining.

Home Page:https://www.npmjs.com/package/proxy-chain

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tor network as upstream proxy

sirramin opened this issue · comments

commented

Can I proxy requests to tor instances?
I'm thinking about using tor-request

If you could expose a Tor instance via an HTTP proxy interface, then you can easily forward traffic to it. But I don't really know if there is some tool to make this possible.

commented

I convert tor socks proxy to http proxy using http-proxy-to-socks package and implemented in my app:

const server = new ProxyChain.Server({
    port: 8000,
    verbose: true,
    repareRequestFunction: ({ request, username, password, hostname, port, isHttp, connectionId }) => {
        return {
            requestAuthentication: false,
            upstreamProxyUrl: `http://127.0.0.1:8080`
        };
    },
});

But the proxy still expose server's public IP address

How does it expose the public IP address? The target website should only see the IP addresses of the last tor peer.

Duplicate of #69