Proxy for Linux#
Enable proxy through dynamic port forwarding in ssh (the sockets proxy port is 5000)
ssh -vv -N -D 5000 user@hostname
apt proxy
-o
optionsudo apt -o Acquire::http::proxy="socks5h://127.0.0.1:5000" update
configure file
/etc/apt/apt.conf
Acquire::http::proxy "http://127.0.0.1:8000/"; Acquire::ftp::proxy "ftp://127.0.0.1:8000/"; Acquire::https::proxy "https://127.0.0.1:8000/";
curl proxy
use configure file
~/.curlrc
or command line option-x
curl -x socks5h://localhost:5000 -L -O <url>