v2ray的搭建

1.docker-compose.yml的配置

version: "3"
services:
  v2ray:
    image: v2ray/official
    container_name: v2ray
    restart: always
    command: v2ray -config=/etc/v2ray/config.json
    ports:
      - "45367:45367"
    volumes:
      - ./data:/etc/v2ray
      - ./v2ray.config.json:/etc/v2ray/config.json:ro

2.v2ray.config.json的配置

version: "3"
services:
  v2ray:
    image: v2ray/official
    container_name: v2ray
    restart: always
    command: v2ray -config=/etc/v2ray/config.json
    ports:
      - "45367:45367"
    volumes:
      - ./data:/etc/v2ray
      - ./v2ray.config.json:/etc/v2ray/config.json:ro
[root@woterm v2ray]# 
[root@woterm v2ray]# 
[root@woterm v2ray]# cat v2ray.config.json 
{
  "inbounds": [{
    "port": 12345,
    "protocol": "vmess",
    "settings": {
      "clients": [
        {
          "id": "bda8368e-b622-4cb6-9833-dc3f988134cb",
          "level": 1,
          "alterId": 233
        }
      ]
    }
  }],
  "outbounds": [{
    "protocol": "freedom",
    "settings": {}
  },{
    "protocol": "blackhole",
    "settings": {},
    "tag": "blocked"
  }],
  "routing": {
    "rules": [
      {
        "type": "field",
        "ip": ["geoip:private"],
        "outboundTag": "blocked"
      }
    ]
  }
}

3.客户端配置【默认是Sock5代理】


4.谷歌SwitchyOmega插件的配置