Linux 设置代理时, 密码出现特殊字符怎么办? |
您所在的位置:网站首页 › 不能使用特殊字符怎么办呀 › Linux 设置代理时, 密码出现特殊字符怎么办? |
配置代理的格式一般是这样的: $ export https_proxy=https://用户名:密码@代理地址:代理端口 比如需要配置这些: $ export http_proxy=http://CodeCore:@[email protected]:8787 $ export https_proxy=http://CodeCore:@[email protected]:8787 $ export no_proxy=127.0.0.1,localhost $ export ftp_proxy=http://CodeCore:@[email protected]:8787
如果直接输入 BASH 会报错: bash: [email protected]: event not found 解决办法 就是将特殊字符转换成 ASIIC 码形式输入, 以 % + Hex 形式(0x忽略). 参考链接: ASCII Reference 比如常见的会出现在密码中的特殊字符: ~ : 0x7E, ! : 0x21 @ : 0x40, # : 0x23 $ : 0x24, % : 0x25 ^ : 0x5E, & : 0x26 * : 0x2A, ? : 0x3F $ export HTTP_PROXY=http://CodeCore:%40MingHou233%[email protected]:8787 $ export HTTPS_PROXY=https://CodeCore:%40MingHou233%[email protected]:8787 |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |