command
注意事项
- 适用于
debian / ubuntu
系统 - 请切换至
root
权限账户执行
Info
现在,有更方便的终端代理客户端,建议您尝试 linux-gg-client
手动配置
更新并安装软件
apt-get -y update
apt-get -y install build-essential wget curl unzip
安装 v2ray
客户端
wget https://region-hk-download.ne.world/new/linux/v2ray/install-release.sh
bash install-release.sh
安装 proxychains-ng
wget https://region-hk-download.ne.world/new/linux/v2ray/v4.14.zip
unzip v4.14.zip
cd proxychains-ng-4.14
./configure
make && make install
cp ./src/proxychains.conf /etc/proxychains.conf
cd ../
rm -rf v4.14.zip proxychains-ng-4.14
编辑 /etc/proxychains.conf
,将最后一行的
socks4 127.0.0.1 9050
改为
socks5 127.0.0.1 1081
编辑文件 /usr/local/etc/v2ray/config.json
,替换为
{
"inbounds": [
{
"port": 1081,
"listen": "127.0.0.1",
"protocol": "socks",
"sniffing": {
"enabled": true,
"destOverride": ["http", "tls"]
},
"settings": {
"auth": "noauth",
"udp": false
}
}
],
"outbounds": [
{
"protocol": "vmess",
"settings": {
"vnext": [
{
"address": "xxx",
"port": 8080,
"users": [
{
"id": "xxx",
"alterId": 2
}
]
}
]
},
"streamSettings": {
"network": "ws",
"wsSettings": {
"path": "/xxx"
}
}
}
]
}
- 将
address
后的xxx
修改为 服务器地址 - 将
port
后的8080
修改为 服务器端口 - 将
id
后的xxx
修改为你的 uuid - 将
path
后的/xxx
修改为 服务器目录 - 将
alterId
后的2
修改为 服务器 alterId - 保存更改
上述信息需在节点列表查看:https://neworld.cloud/user/server
先找到可以使用的服务器(如图所示右上角标识为WS的),点击复制按钮
然后访问这个在线工具:https://base64.us/
根据图示获取需要的参数。uuid 比较长,例如:16ab860c-2ba8-42c7-ac8f-8ed82a7866d6
添加开机启动项目,并启动服务
systemctl enable v2ray
systemctl start v2ray
如何使用
在需要代理的命令前加上 proxychains4
即可
root@Vdebian:~# curl ipv4.ip.sb
当前 IP:106.54.217.190 来自于:中国 上海 上海 电信/联通/移动
root@Vdebian:~# proxychains4 curl myip.ipip.net
当前 IP:38.147.160.32 来自于:美国 加利福尼亚州 洛杉矶 cogentco.com
故障排查
- 确认账户未到期
- 确认账户有流量
- 确认配置的节点信息无误
- 确认配置的节点在节点列表中有人在使用
- 尝试修改配置更换其他节点(修改完成后请重启客户端)
重启客户端命令
systemctl restart v2ray
设置 git 代理
设置
git config --global http.proxy 'socks5://127.0.0.1:1081'
git config --global https.proxy 'socks5://127.0.0.1:1081'
取消设置
git config --global --unset http.proxy
git config --global --unset https.proxy