• Home
  • About
    • Kira's Blog Site

      Doctor X's blog site

    • Learn More
    • Email
    • Twitter
    • Github
    • Steam
    • Weibo
  • Posts
    • All Posts
    • All Tags
  • Data Analysis
  • Climate Projects
  • Videos
  • Life
  • Notes
  • Algorithm
  • Papers

V2Ray on Linux

19 May 2019

This post is a tutorial about setting V2Ray on Linux server and Windowx/Mac client.

FIRST OF ALL, YOU NEED A SERVER.


See in github and v2ray

For Server:

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

the config.json file

{
  "inbounds": [{
    "port": 10086, // 服务器监听端口,必须和上面的一样
    "protocol": "vmess",
    "settings": {
      "clients": [{ "id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" }]
    }
  }],
  "outbounds": [{
    "protocol": "freedom",
    "settings": {}
  }]
}
sudo systemctl start v2ray

For client:

For Mac

Please Download V2RayX

Or just brew cask install v2rayx

{
  "inbounds": [{
    "port": 1080,  // SOCKS 代理端口,在浏览器中需配置代理并指向这个端口
    "listen": "127.0.0.1",
    "protocol": "socks",
    "settings": {
      "udp": true
    }
  }],
  "outbounds": [{
    "protocol": "vmess",
    "settings": {
      "vnext": [{
        "address": "server", // 服务器地址,请修改为你自己的服务器 ip 或域名
        "port": 10086,  // 服务器端口
        "users": [{ "id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" }]
      }]
    }
  },{
    "protocol": "freedom",
    "tag": "direct",
    "settings": {}
  }],
  "routing": {
    "domainStrategy": "IPOnDemand",
    "rules": [{
      "type": "field",
      "ip": ["geoip:private"],
      "outboundTag": "direct"
    }]
  }
}


Like Tweet +1