diff --git a/v2ray_install.sh b/v2ray_install.sh new file mode 100644 index 0000000..82d9001 --- /dev/null +++ b/v2ray_install.sh @@ -0,0 +1,36 @@ +wget "https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh" -O install-release.sh +. install-release.sh +echo "请输入端口" +read port +uuid=$(cat /proc/sys/kernel/random/uuid) +echo $uuid +echo "{ + \"inbounds\": [ + { + \"port\": $port, + \"protocol\": \"vmess\", + \"settings\": { + \"clients\": [ + { + \"id\": \"$uuid\", + \"alterId\": 0 + } + ] + } + } + ], + \"outbounds\": [ + { + \"protocol\": \"freedom\", + \"settings\": {} + } + ] +}" > /usr/local/etc/v2ray/config.json + +echo net.core.default_qdisc=fq >> /etc/sysctl.conf +echo net.ipv4.tcp_congestion_control=bbr >> /etc/sysctl.conf +sysctl -p +lsmod | grep bbr + +sudo ufw allow $port/tcp +systemctl start v2ray \ No newline at end of file