预编译的压缩包可以在如下几个站点找到:
压缩包均为 zip 格式,找到对应平台的压缩包,下载解压即可使用。
在你的 PC (或手机)中,你需要运行 V2Ray 并使用下面的配置:
{
"inbounds": [{
"port": 1080, // SOCKS 代理端口,在浏览器中需配置代理并指向这个端口
"listen": "127.0.0.1",
"protocol": "socks",
"settings": {
"udp": true
}
},
{
"port":8000,
"listen":"0.0.0.0",
"protocol":"http",
"settings":{
},
"sniffing":{
"enabled":true,
"destOverride":[
"http",
"tls"
]
}
}],
"outbounds": [{
"protocol": "vmess",
"settings": {
"vnext": [{
"address": "server", // 服务器地址,请修改为你自己的服务器 ip 或域名
"port": 56744, // 服务器端口
"users": [{ "id": "e1a6141b-a95a-4379-9db7-4bd80af53333" }]
}]
}
},{
"protocol": "freedom",
"tag": "direct",
"settings": {}
}],
"routing": {
"domainStrategy": "IPOnDemand",
"rules": [{
"type": "field",
"ip": ["geoip:private"],
"outboundTag": "direct"
}]
}
}
终端配置代理:
export http_proxy="127.0.0.1:8000"
export https_proxy="127.0.0.1:8000"
上述配置唯一要改的地方就是你的服务器 IP,配置中已注明。上述配置会把除了局域网(比如访问路由器)之外的所有流量转发到你的服务器。服务器的配置中需要确保 id
和端口与客户端一致,就可以正常连接了。
一键安装脚本使用 root 用户输入下面命令安装或卸载
bash <(curl -s -L https://git.io/v2ray.sh)
运行
config.json
文件。直接运行 v2ray
或 v2ray.exe
即可。/etc/v2ray/config.json
文件。运行 v2ray --config=/etc/v2ray/config.json
,或使用 systemd 等工具把 V2Ray 作为服务在后台运行。附: