Set proxy server on FreeBSD 12.1

Posted by D on April 5, 2020

Inside a controlled network, it is alittle harder to use FreeBSD.
The simple things become hard, such as install software by pkg.
So that is why I set a local proxy server on FreeBSD in China.

For csh or tcsh, set proxy in /etc/csh.cshrc:

setenv HTTP_PROXY socks5://127.0.0.1:1080
setenv HTTPS_PROXY socks5://127.0.0.1:1080

For sh, set proxy in /etc/profile:

export HTTP_PROXY socks5://127.0.0.1:1080
export HTTPS_PROXY socks5://127.0.0.1:1080

For subversion, etc…
Add the following to ~/.subversion/servers

http-proxy-host = socks5://127.0.0.1
http-proxy-port = 1080

References:
Using FreeBSD inside a controlled network - A required HTTP Proxy and No FTP
Configure proxy

: