安装rpoxychains-ng
sudo dnf install proxychains-ng
设置proxychains-ng代理地址
vi /etc/proxychains.conf
添加socks5 192.168.1.94 10808
即可,支持多种代理方式:socks4/socks5/http,如下说明:
# Examples:
#
# socks5 192.168.67.78 1080 lamer secret
# http 192.168.89.3 8080 justu hidden
# socks4 192.168.1.49 1080
# http 192.168.39.93 8080
使用proxychains-ng代理执行命令
$proxychains curl -O https://github.com/XTLS/Xray-install/raw/main/install-release.sh
[proxychains] config file found: /etc/proxychains.conf
[proxychains] preloading /usr/lib64/proxychains-ng/libproxychains4.so
[proxychains] DLL init: proxychains-ng 4.13
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
[proxychains] Strict chain ... 192.168.1.94:10808 ... raw.githubusercontent.com:443 ... OK
100 21115 100 21115 0 0 6107 0 0:00:03 0:00:03 --:--:-- 6106