Set socks5 proxy environment variable(local dns)

export http_proxy=socks5://PROXYSERVER:PORT
  • dns will be resolved by local DNS server

Set socks5 proxy environment variable(remote dns)

export http_proxy=socks5h://PROXYSERVER:PORT
  • Dns will be resolved by proxy side dns server

Save configuration

  • For your own use only , put one of above commands into your ~/.bashrc file

    .bashrc
    
  • Save it system wide , put below line

    http_proxy=socks5h://PROXYSERVER:PORT
    

    into file

    /etc/environment