直接在云服务器上安装v2ray

  1. bash <(curl -L -s https://install.direct/go.sh)

该脚本会直接安装成功

启动v2ray

  1. systemctl start v2ray
  2. systemctl enable v2ray

安装v2ray客户端

Linux客户端需要到github上去下载 https://github.com/v2ray/v2ray-core/releases/download/

解压客户端并修改 config.json 这个配置文件如下

  1. {
  2. "inbounds": [{
  3. "port": 1080, // SOCKS 代理端口,在浏览器中需配置代理并指向这个端口
  4. "listen": "127.0.0.1",
  5. "protocol": "socks",
  6. "settings": {
  7. "udp": true
  8. }
  9. }],
  10. "outbounds": [{
  11. "protocol": "vmess",
  12. "settings": {
  13. "vnext": [{
  14. "address": "server", // 服务器地址,请修改为你自己的服务器 ip 或域名
  15. "port": 10086, // 服务器端口
  16. "users": [{ "id": "b831381d-6324-4d53-ad4f-8cda48b30811" }]
  17. }]
  18. }
  19. },{
  20. "protocol": "freedom",
  21. "tag": "direct",
  22. "settings": {}
  23. }],
  24. "routing": {
  25. "domainStrategy": "IPOnDemand",
  26. "rules": [{
  27. "type": "field",
  28. "ip": ["geoip:private"],
  29. "outboundTag": "direct"
  30. }]
  31. }
  32. }

桌面鼠标双击 v2ray 启动客户端

文档更新时间: 2022-06-10 10:57   作者:张尚