Set proxy server on FreeBSD 12.1

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

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

猜你喜欢

转载自www.cnblogs.com/freedom-try/p/12640190.html