Notice: 函数 WP_Scripts::localize 的调用方法不正确$l10n 参数必须是一个数组。若要将任意数据传递给脚本,请改用 wp_add_inline_script() 函数。 请查阅调试 WordPress来获取更多信息。 (这个消息是在 5.7.0 版本添加的。) in /data/www/appblog/wp-includes/functions.php on line 6131

Linux常用命令设置和取消代理

yum

vim /etc/yum.conf

如果代理不需要用户名密码认证:

proxy=http://192.168.16.28:8118

如果需要认证:

proxy=http://192.168.16.28:8118
proxy_username=yezhou

wget

export http_proxy=http://192.168.16.28:8118
export https_proxy=http://192.168.16.28:8118

wget http://www.appblog.cn

wget -Y on -e "http_proxy=http://192.168.16.28:8118" http://www.appblog.cn

-Y:是否使用代理
-e:执行命令

curl

export http_proxy=http://192.168.16.28:8118
export https_proxy=http://192.168.16.28:8118

curl http://www.appblog.cn
curl -I http://www.appblog.cn
curl -v -I http://www.appblog.cn

curl -x 192.168.16.28:8118 http://www.appblog.cn

-x:设置代理,格式为host[:port],port的缺省值为1080

使用socks5代理方法:

--socks5-hostname host:port
上一篇 Git设置和取消代理
下一篇 Maven设置Http代理