mirror of
https://github.com/lush2020/edgetunnel.git
synced 2026-03-22 01:22:21 +08:00
53 lines
1.2 KiB
Bash
53 lines
1.2 KiB
Bash
#!/bin/sh
|
|
|
|
cat << EOF > /etc/v2ray/config.json
|
|
{
|
|
"policy": {
|
|
"levels": {
|
|
"0": {
|
|
"handshake": 5,
|
|
"connIdle": 300,
|
|
"uplinkOnly": 2,
|
|
"downlinkOnly": 5,
|
|
"statsUserUplink": false,
|
|
"statsUserDownlink": false,
|
|
"bufferSize": 10240
|
|
}
|
|
},
|
|
"system": {
|
|
"statsInboundUplink": false,
|
|
"statsInboundDownlink": false,
|
|
"statsOutboundUplink": false,
|
|
"statsOutboundDownlink": false
|
|
}
|
|
},
|
|
"inbounds": [
|
|
{
|
|
"port": $PORT,
|
|
"protocol": "vless",
|
|
"settings": {
|
|
"clients": [
|
|
{
|
|
"id": "$UUID",
|
|
"level": 0
|
|
}
|
|
],
|
|
"decryption": "none"
|
|
},
|
|
"streamSettings": {
|
|
"network": "ws",
|
|
"security": "none"
|
|
}
|
|
}
|
|
],
|
|
"outbounds": [
|
|
{
|
|
"protocol": "freedom"
|
|
}
|
|
]
|
|
}
|
|
EOF
|
|
|
|
# Run V2Ray
|
|
/usr/bin/v2ray -config /etc/v2ray/config.json
|