1. 关闭全局代理
vi ~/.bashrc
#export HTTP_PROXY=socks5://127.0.0.1:1080
#export HTTPS_PROXY=socks5://127.0.0.1:1080
export no_proxy=1
2. 修改下载脚步
site_config_5_1.lua
site_config.LUAROCKS_DOWNLOADER=[[wget]]
vi .deps/usr/share/lua/5.1/luarocks/cfg.lua
downloader = "wget",
vi .deps/usr/share/lua/5.1/luarocks/fs/tools.lua
function tools.use_downloader(url, filename, cache)
if cfg.downloader == "wget" then
local wget_cmd = "tsocks wget "..vars.WGETNOCERTFLAG.." --no-cache --user-agent=\""..cfg.user_agent.." via wget\" --quiet "
3. 安装tsocks
打赏
如果这篇文章解决了您的问题,让我买根烟抽抽。
支付宝.jpg 微信.jpg
网友评论