V2 安装服务端教程

折腾记录
1645 0

V2 安装服务端教程,还未做测试

纯命令行
iwr get.scoop.sh -outfile 'install.ps1'
.\install.ps1 -RunAsAdmin
scoop install xray
curl https://x.x/config.json -o C:\Users\config.json
xray -c C:\Users\config.json

安装成服务

scoop install nssm
nssm install xray
方法二

1.下载并解压v2ray-windows-64.zip

https://github.com/v2fly/v2ray-core/releases/tag/v4.45.0

2.下载geosite.dat和geoip.dat移动到v2ray目录覆盖

https://github.com/Loyalsoldier/v2ray-rules-dat/releases

3.把config.json内容替换成以下文本,uuid,path,ip等字段自己修改


{
  "log": {
    "access": "C:\\v2ray\\log\\access.log",
    "error": "C:\\v2ray\\log\\error.log",
    "loglevel": "warning"
  },

  "dns": {
    "servers": [
      "119.29.29.29",
      {
        "address": "8.8.8.8",
        "port": 53,
        "domains": [
          "geosite:geolocation-!cn"
        ]
      }
    ]
  },

  "inbounds": [
    {
      "port": 80,
      "protocol": "vmess",
      "settings": {
        "clients": [
          {
            "id": "12345678-1234-1234-1234-123456780001",
            "alterId": 0,
            "email": "nobody"
          }
        ]
      },
      "streamSettings": {
        "network": "ws",
        "wsSettings": {
          "path": "/v2ray"
        }
      }
    }
  ],

  "outbounds": [
    {
      "tag": "direct",
      "protocol": "freedom",
      "settings": {}
    },
    {
      "tag": "blocked",
      "protocol": "blackhole",
      "settings": {}
    },
    {
      "tag": "proxy",
      "protocol": "vmess",
      "settings": {
        "vnext": [
          {
            "address": "国外机IP",
            "port": 80,
            "users": [
              {
                "id": "12345678-1234-1234-1234-123456780002",
                "alterId": 0,
                "security": "auto"
              }
            ]
          }
        ]
      },
      "streamSettings": {
        "network": "ws",
        "wsSettings": {
          "path": "/v2ray"
        }
      }
    }
  ],

  "routing": {
    "domainStrategy": "IPIfNonMatch",
    "rules": [
      {
        "type": "field",
        "ip": [
          "geoip:private"
        ],
        "outboundTag": "blocked"
      },
      {
        "type": "field",
        "outboundTag": "proxy",
        "domain": ["geosite:gfw", "geosite:greatfire"]
      },
      {
        "type": "field",
        "outboundTag": "proxy",
        "ip": ["geoip:telegram","geoip:google"]
      }
    ]
  }
}

4.双击wv2ray.exe,OK!

https://www.76fx.com/91.html
最后更新 2022-06-09
评论 ( 0 )
问:壹 + 壹 = ?
OωO
隐私评论