TransWikia.com

Connect to internet through socks proxy where local DNS does not resolve

Unix & Linux Asked by erichfw on December 16, 2020

I have a local machine with CentOS 7. There is a Socks V5 proxy server on the local subnet that provides this machine with access to the internet. I am able to download files with,

curl  -x --proxy  socks5://ipaddress:1080 -u username:password www.google.com

On my local machine I am currently running Artifactory and Jenkins webapps in Tomcat. The systems do not natively provide socks proxy setup; and require access to the internet.

I tried tsocks, however remote DNS requests are not resolved.

How to I get this working?

One Answer

So what you provided was the proxy for the curl program to use for that single request.

You may wish to try setting the http_proxy and https_proxy environment variables and see if your programs pick them up.

e.g.

export http_proxy=username:[email protected]:8080

These variables would need to be set again on any reboot, so not ideal.

If you are not comfortable with storing these credentials in clear-text in an environment variable you may look to opt for a more robust solution such as cntlm:

Answered by Douglas Rae on December 16, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP