v2ray开启白名单访问配置
config文件配置如下:

{
    "log": {
        "access": "/var/log/v2ray/access.log",
        "error": "/var/log/v2ray/error.log",
        "loglevel": "warning"
    },
    "inbound": {
        "port": xxx,
        "protocol": "socks",
        "settings": {
           "udp": true
        }
    },
    "outbound": {
        "protocol": "blackhole",
        "settings": {}
    },
   "outboundDetour": [
        {
            "protocol": "freedom",
            "settings": {},
            "tag": "whitelist"
        }
    ],
    "routing": {
        "domainStrategy": "AsIs",
        "strategy": "rules",
        "settings": {
            "rules": [
                {
                    "type": "field",
                       "domain": [
                        "xxx.com",
                        "yyy.com"
                        ],
                    "outboundTag": "whitelist"
                }
            ]
        }
    }
}

v2ray在windows下ws+tls配置(证书是fullchain):

{
  "log": {
    "access":"C:\\v2ray\\log\\_access2.log",
    "error":"C:\\v2ray\\log\\_error2.log",
    "loglevel": "warning"
  },
"inbound": {
        "port": 35816,
        "protocol": "vmess",
        "settings": {
            "clients": [
             {
              "id": "XXXXXXX",
              "alterId": 64,
              "security": "auto"
              }
            ]
        },
        "streamSettings": {
            "network": "ws",
            "security": "tls",
            "wsSettings":{
                    "path":"/XXX",
                    "headers":{}
                },
        "tlsSettings": {
            "serverName": "XXXXX",
            "disableSystemRoot":true,
            "certificates": [{
            "certificateFile": "C:\\v2ray\\ssl\\XXX.crt",
            "keyFile": "C:\\v2ray\\ssl\\XXX.key"
                    }]
            }
        },
        "sniffing": {
            "enabled": true,
            "destOverride": [
                    "http",
                    "tls"
                ]
            }
        },
  "outbound": {
    "protocol": "vmess",
    "settings": {
      "vnext": [
        {
          "address": "XX.XX.X.XX",
          "port": 25678,
          "users": [
            {
              "id": "XXXXXXXXXX",
              "alterId": 64,
              "security": "auto"
            }
          ]
        }
      ]
    },
     "streamSettings": {
            "network": "ws"
    },
    "mux": {
      "enabled": true
    }
  },
  "outboundDetour": [
    {
      "protocol": "freedom",
      "settings": {},
      "tag": "direct"
    }
  ],
  "dns": {
    "servers": [
      "8.8.8.8",
      "8.8.4.4",
      "localhost"
    ]
  },
  "routing": {
    "domainStrategy": "AsIs",
    "rules":[
      {
        "type": "field",
        "ip": [
        "geoip:private"
        ],
        "outboundTag": "direct"
      },
      {
        "type": "field",
        "outboundTag": "block",
        "protocol": [
          "bittorrent"
        ]
      },
      {
        "type": "field",
        "domain": ["geosite:category-ads"],
        "outboundTag": "direct"
      }
    ]
  }
  }
}

v2ray服务器配置VLESS+tcp+ws+tls配置(证书是fullchain):

{
  "log": {
    "access":"/var/log/v2ray/access.log",
    "error":"/var/log/v2ray/error.log",
    "loglevel": "warning"
  },
"inbounds": [{
        "port": 888,
        "protocol": "vmess",
        "settings": {
            "clients": [
             {
              "id": "xxxxx-xxxxxx",
              "alterId": 64,
              "security": "auto"
              }
            ]
        },
        "streamSettings": {
            "network": "ws",
            "security": "tls",
            "wsSettings":{
                    "path":"/tiger",
                    "headers":{}
                },
        "tlsSettings": {
            "serverName": "xxx.xxx",
            "disableSystemRoot":true,
            "certificates": [{
            "certificateFile": "/home/ubuntu/ssl/cert.pem",
            "keyFile": "/home/ubuntu/ssl/key.pem"
                    }]
            }
        },
        "sniffing": {
            "enabled": true,
            "destOverride": [
                    "http",
                    "tls"
                ]
            }
        },
        {
          "port": 443,
          "protocol": "vless",
          "settings": {
              "clients": [
                  {
                      "id": "xxxxx-xxxxxx",
                      "level": 0
                  }
              ],
              "decryption": "none",
              "fallbacks": [
                  {
                      "path": "/wstiger",
                      "dest": 1234,
                      "xver": 1
                  }
              ]
          },
          "streamSettings": {
              "network": "tcp",
              "security": "tls",
              "tlsSettings": {
                  "alpn": [
                      "http/1.1"
                  ],
                  "certificates": [
                      {
                          "certificateFile": "/home/ubuntu/ssl/cert.pem",
                          "keyFile": "/home/ubuntu/ssl/key.pem"
                      }
                  ]
              }
          }
      },
      {
          "port": 1234,
          "listen": "127.0.0.1",
          "protocol": "vless",
          "settings": {
              "clients": [
                  {
                      "id": "861c89ab-8c45-4145-b10e-9b43c3de7143",
                      "level": 0
                  }
              ],
              "decryption": "none"
          },
          "streamSettings": {
              "network": "ws",
              "security": "none",
              "wsSettings": {
                  "acceptProxyProtocol": true,
                  "path": "/wstiger"
              }
          }
      }
    ],
 "outbounds": [{
          "protocol": "freedom",
          "settings": {
            "domainStrategy": "UseIPv4"
          }
        },{
          "protocol": "blackhole",
          "settings": {},
          "tag": "blocked"
        }],
  "dns": {
    "servers": [
      "8.8.8.8",
      "8.8.4.4",
      "localhost"
    ]
  },
  "routing": {
    "domainStrategy": "IPIfNonMatch",
    "rules":[
      {
        "type": "field",
        "ip": [
        "geoip:private"
        ],
        "outboundTag": "blocked"
      },
      {
        "type": "field",
        "domain": ["geosite:category-ads"],
        "outboundTag": "blocked"
      }
    ]
  }
}

v2ray简单多用户策略配置:

{
  "log": {
    "access": "/var/log/v2ray/access.log",
    "error": "/var/log/v2ray/error.log",
    "loglevel": "warning"
  },
 "inbounds": [{
        "port": 1234,
        "protocol": "socks",
        "tag": "freedom",
        "settings": {
          "udp": true
        }
    },
    {
        "port": 2345,
        "protocol": "socks",
        "tag": "whitelist",
        "settings": {
            "udp": true
         }
    }
  ],
    "outbounds": [{
      "protocol": "vmess",
      "settings": {
        "vnext": [{
            "address": "xx.xxx.xx.xx",
            "port": 23456,
            "users": [{
                "id": "xxxxxxxxxxxx",
                "alterId": 64,
                "security": "auto"
                }]}]
            },
       "streamSettings": {
              "network": "ws"},
       "tag": "proxy",
       "mux": {
         "enabled": true}
    },
    {
      "protocol": "freedom",
      "settings": {},
      "tag": "direct"
    },
    {
      "protocol": "blackhole",
      "settings": {},
      "tag": "block"
    }
  ],
  "dns": {
    "servers": [
      "8.8.8.8",
      "8.8.4.4",
      "localhost"
    ]
  },
  "routing": {
    "domainStrategy": "AsIs",
    "rules":[
        {
        "type": "field",
        "outboundTag": "block",
        "protocol": [
          "bittorrent"]
      },
      {
        "type": "field",
        "domain": [
         "xxx.com",
         "yyy.com"
         ],
        "outboundTag": "proxy",
        "inboundTag":["whitelist"]
      },
      {
        "type": "field",
        "outboundTag": "block",
        "inboundTag":["whitelist"]
      },
      {
        "type": "field",
        "outboundTag": "proxy",
        "inboundTag":["freedom"]
      }
    ]
  }
}