You are not logged in.

#1 2016-08-10 20:05:27

carbolymer
Member
Registered: 2012-04-25
Posts: 42

[SOLVED] Proxy only for some domains

Is there a possibility to configure proxy (global or for few processes) only for one domain (and its subdomains)?

What I'd like to achieve: All connections (HTTP/HTTPS, database connections, etc) to the subdomains of something.xyz should go through a proxy, connections to other domains should be direct. I know that I can define all_proxy and a long exclusion list using no_proxy environment variables, but I don't feel that it is the right way.

Is there maybe a third party application which provides this functionality?

Last edited by carbolymer (2016-08-17 13:51:21)

Offline

#2 2016-08-17 13:50:55

carbolymer
Member
Registered: 2012-04-25
Posts: 42

Re: [SOLVED] Proxy only for some domains

Ok, I've found a solution. In my case all subdomains from something.xyz are in the same subnetwork, so the easiest solution is to use IPTABLES + redsocks + ssh tunnel to the host inside this subnetwork.
In theory, It should be possible to redirect DNS traffic via TCP through redsocks, but I didn't try that. I've just added appropiate entries to the hosts file.

Offline

Board footer

Powered by FluxBB