### V2Ray官方一键脚本
bash <(curl -L -s https://install.direct/go.sh)
cat /etc/v2ray/config.json
{
"inbounds": [
{
"port": 8000,
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "52055352-34e8-453c-b6f6-22eac630b6e1",
"alterId": 16
}
]
},
"streamSettings": {
"tcpSettings": {},
"quicSettings": {},
"tlsSettings": {},
"network": "kcp",
"kcpSettings": {
"mtu": 1350,
"tti": 50,
"header": {
"type": "srtp"
},
"readBufferSize": 2,
"writeBufferSize": 2,
"downlinkCapacity": 100,
"congestion": false,
"uplinkCapacity": 100
},
"wsSettings": {},
"httpSettings": {},
"security": "none"
}
}
],
"log": {
"access": "/var/log/v2ray/access.log",
"loglevel": "info",
"error": "/var/log/v2ray/error.log"
},
"routing": {
"rules": [
{
"ip": [
"0.0.0.0/8",
"10.0.0.0/8",
"100.64.0.0/10",
"169.254.0.0/16",
"172.16.0.0/12",
"192.0.0.0/24",
"192.0.2.0/24",
"192.168.0.0/16",
"198.18.0.0/15",
"198.51.100.0/24",
"203.0.113.0/24",
"::1/128",
"fc00::/7",
"fe80::/10"
],
"type": "field",
"outboundTag": "blocked"
}
]
},
"outbounds": [
{
"protocol": "freedom",
"settings": {}
},
{
"protocol": "blackhole",
"tag": "blocked",
"settings": {}
}
]
}
vim /etc/v2ray/config.json
# Esc键 :set paste 回车 ggdG i shift+Insert Esc键 :wq
systemctl restart v2ray
curl -4 ip.sb
vmess://ew0KICAidiI6ICIyIiwNCiAgInBzIjogIlYyUmF5IiwNCiAgImFkZCI6ICIxODguMTg4LjE4OC4xODgiLA0KICAicG9ydCI6ICI4MDAwIiwNCiAgImlkIjogIjUyMDU1MzUyLTM0ZTgtNDUzYy1iNmY2LTIyZWFjNjMwYjZlMSIsDQogICJhaWQiOiAiMTYiLA0KICAibmV0IjogImtjcCIsDQogICJ0eXBlIjogInNydHAiLA0KICAiaG9zdCI6ICIiLA0KICAicGF0aCI6ICIiLA0KICAidGxzIjogIiINCn0=
wget https://github.com/2dust/v2rayN/releases/download/2.22/v2rayN-Core.zip
python -m SimpleHTTPServer 8000