Skip to content

Instantly share code, notes, and snippets.

@mindevolution
Last active February 8, 2020 06:01
Show Gist options
  • Save mindevolution/87a115a652c917cb7b47fd0df47f3911 to your computer and use it in GitHub Desktop.
Save mindevolution/87a115a652c917cb7b47fd0df47f3911 to your computer and use it in GitHub Desktop.
v2ray server, client install
{
"inbounds": [
{
"port": 1080, // Listening port
"protocol": "socks", // Incoming protocol is SOCKS 5
"sniffing": {
"enabled": true,
"destOverride": ["http", "tls"]
},
"settings": {
"auth": "noauth" // Authorisation setting of socks protocol. Here, noauth means no authorisation, beacuse in general socks only used in client side, so no need to authorise.
}
}
],
"outbounds": [
{
"protocol": "vmess", // Outcoming protocol
"settings": {
"vnext": [
{
"address": "103.119.30.36", // Server address, yoou need to edit this to your own IP address/domian.
"port": 18879, // Server listenning port.
"users": [
{
"id": "96e460ca-2c50-4334-997f-ce8660ba5100", // UUID, must be as same as server side
"alterId": 64 // AlterID should be as same as server side
}
]
}
]
}
}
]
}

服务端配置 (centOS 7)

  1. 登录服务器
  2. 切换到root账号
  3. 运行命令行安装v2ray服务: bash <(curl -L -s https://install.direct/go.sh)
  4. 打开v2ray配置文件,记录下该文件的内容:vi /etc/v2ray/config.json
  5. 记录下port值,例如18879,(大概在文件第三行)
  6. 通过防火墙打开v2ray port 端口,执行命令行(将18879修改为真实的port值):firewall-cmd --zone=public --add-port=18879/tcp —permanent
  7. 服务端配置结束

客户端配置

Windows

  1. 下载客户端 https://github.com/2dust/v2rayN/releases/download/3.5/v2rayN-Core.zip
  2. 使用上面的config.json文件内容替换掉v2rayN-Core文件夹的config.json
  3. 修改config.json,使用步骤4中的内容替换里面的address,port,users.id, users.alterId,
  4. 运行v2rayN.ext程序
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment