VKVM官网
优惠码:NodeSeek50%
更新VPS命令:
sudo apt update && sudo apt upgrade -y
安装xray
bash -c “$(curl -L https://github.com/XTLS/Xray-install/raw/main/install-release.sh)” @ install
以上命令来源(xray github页面):https://github.com/XTLS/Xray-install
进入/usr/local/etc/xray
打开xray.conf,清空所有内容,将以下文本输入quote和unquote两个单词不用输入,//后面为需要手动修改的,//和后面的文字可以保留在xray.conf里面,不影响使用
quote
{
“log”: {
“loglevel”: “warning”
},
“routing”: {
“domainStrategy”: “IPIfNonMatch”,
“rules”: [
{
“type”: “field”,
“port”: “443”,
“network”: “udp”,
“outboundTag”: “block”
},
{
“type”: “field”,
“ip”: [
“geoip:cn”,
“geoip:private”
],
“outboundTag”: “block”
}
]
},
“inbounds”: [
{
“listen”: “0.0.0.0”,
“port”: 443,
“protocol”: “vless”,
“settings”: {
“clients”: [
{
“id”: “xxxxxxxxxxxxxxxxxx”, // 装好xray后,直接在vps中执行 xray uuid 生成,或 1-30 字节的字符串,id后面的引号要保留
“flow”: “xtls-rprx-vision”
}
],
“decryption”: “none”
},
“streamSettings”: {
“network”: “tcp”,
“security”: “reality”,
“realitySettings”: {
“show”: false,
“dest”: “www.lovelive-anime.jp:443”, // 目标网站最低标准:国外网站,支持 TLSv1.3、X25519 与 H2,域名非跳转用(主域名可能被用于跳转到 www)
“xver”: 0,
“serverNames”: [ // 客户端可用的 serverName 列表,暂不支持 * 通配符
“www.lovelive-anime.jp”
],
“privateKey”: “2KZ4uouMKgI8nR-LDJNP1_MHisCJOmKGj9jUjZLncVU”, // 装好xray后,直接在vps中执行 xray x25519生成,引号要保留
“shortIds”: [
“6ba85179e30d4fc2” // 0 到 f,长度为 2 的倍数,长度上限为 16,可留空,或执行 openssl rand -hex 8 生成
]
}
},
“sniffing”: {
“enabled”: true,
“destOverride”: [
“http”,
“tls”,
“quic”
]
}
}
],
“outbounds”: [
{
“protocol”: “freedom”,
“tag”: “direct”
},
{
“protocol”: “blackhole”,
“tag”: “block”
}
],
“policy”: {
“levels”: {
“0”: {
“handshake”: 2,
“connIdle”: 120
}
}
}
}
unquote
以上配置来源,xray github官方示例(只是做了注释,其他没有修改)
https://github.com/XTLS/Xray-examples/blob/main/VLESS-TCP-XTLS-Vision-REALITY/config_server.jsonc