centos

临时

通过以下命令实现临时使用代理服务器:

1
2
3
4
export http_proxy="http://proxy_ip:port"
export https_proxy="http://proxy_ip:port"
export ftp_proxy="http://proxy_ip:port"
export no_proxy="localhost, 127.0.0.1, ::1"

永久

通过修改profile文件实现:

1
sudo vim /etc/profile

末尾添加以下内容

1
2
3
4
export http_proxy="http://proxy_ip:port"
export https_proxy="http://proxy_ip:port"
export ftp_proxy="http://proxy_ip:port"
export no_proxy="localhost, 127.0.0.1, ::1"

执行生效命令即可

1
source /etc/profile

kali

使用proxychains4代理,与上述类似,安装:

1
2
sudo apt update
sudo apt install proxychains4

修改末尾的代理服务器端口即可

1
sudo vim /etc/proxychains.conf

使用方法是命令前加上proxychains4即可