From ae922855aaef62c6b8aa478753be4df4b998655b Mon Sep 17 00:00:00 2001 From: 233boy Date: Mon, 9 Apr 2018 12:09:00 +0800 Subject: [PATCH] caddy config add: timeouts none --- install.sh | 2 ++ v2ray.sh | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 96dec24..00b2a78 100644 --- a/install.sh +++ b/install.sh @@ -739,6 +739,7 @@ caddy_config() { $domain { tls ${email}@gmail.com gzip + timeouts none proxy / $proxy_site { without /${ws_path} } @@ -752,6 +753,7 @@ $domain { cat >/etc/caddy/Caddyfile <<-EOF $domain { tls ${email}@gmail.com + timeouts none proxy / 127.0.0.1:${v2ray_port} { websocket } diff --git a/v2ray.sh b/v2ray.sh index cd9838e..dcd7880 100644 --- a/v2ray.sh +++ b/v2ray.sh @@ -10,7 +10,7 @@ none='\e[0m' # Root [[ $(id -u) != 0 ]] && echo -e " 哎呀……请使用 ${red}root ${none}用户运行 ${yellow}~(^_^) ${none}" && exit 1 -_version="v1.68" +_version="v1.69" cmd="apt-get" @@ -1368,6 +1368,7 @@ caddy_config() { $domain { tls ${email}@gmail.com gzip + timeouts none proxy / $proxy_site { without /${ws_path} } @@ -1381,6 +1382,7 @@ $domain { cat >/etc/caddy/Caddyfile <<-EOF $domain { tls ${email}@gmail.com + timeouts none proxy / 127.0.0.1:${v2ray_port} { websocket } @@ -2013,11 +2015,11 @@ blocked_hosts() { change_v2ray_alterId() { echo while :; do - echo -e "请输入 ${yellow}alterId${none} 的数值 [${magenta}1-65535$none]" + echo -e "请输入 ${yellow}alterId${none} 的数值 [${magenta}0-65535$none]" read -p "$(echo -e "(当前数值是: ${cyan}$alterId$none):") " new_alterId [[ -z $new_alterId ]] && error && continue case $new_alterId in - [1-9] | [1-9][0-9] | [1-9][0-9][0-9] | [1-9][0-9][0-9][0-9] | [1-5][0-9][0-9][0-9][0-9] | 6[0-4][0-9][0-9][0-9] | 65[0-4][0-9][0-9] | 655[0-3][0-5]) + 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9] | [1-9][0-9][0-9][0-9] | [1-5][0-9][0-9][0-9][0-9] | 6[0-4][0-9][0-9][0-9] | 65[0-4][0-9][0-9] | 655[0-3][0-5]) echo echo echo -e "$yellow alterId = $cyan$new_alterId$none" @@ -3690,6 +3692,7 @@ restart) ;; reload) config + [[ $v2ray_transport == "4" && $caddy_installed ]] && caddy_config clear view_v2ray_config_info download_v2ray_config_ask