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

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.


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!

Related Questions

Bash tail -f with while-read and pipe hangs

1  Asked on November 23, 2021 by eric-larson


how to close a port on CentOS 7 server?

1  Asked on November 23, 2021 by user3486308


GNU date: truncate provided date-time and set provided hours

2  Asked on November 23, 2021 by basin


Using subversion on an CIFS mounted share

0  Asked on November 23, 2021 by monatsend


Install Unity 3d Without X

1  Asked on November 23, 2021


Why do we use linux bridge?

2  Asked on November 23, 2021 by jehutyy


TestDisk always return corrupted files

1  Asked on November 23, 2021 by user408830


GUI for NFTables, like fwbuilder

3  Asked on November 21, 2021 by andr-schild


Allow user to run PHP-FPM without password using sudoers

1  Asked on November 21, 2021 by sen-mccabe


Ask a Question

Get help from others!

© 2022 All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP