pull/964/head
233boy 2 years ago
parent 7dddce121b
commit c8583eb601
  1. 7
      src/caddy-config.sh
  2. 2
      src/download-caddy.sh
  3. 2
      v2ray.sh

@ -1,11 +1,14 @@
# local email=$(((RANDOM << 22))) # local email=$(((RANDOM << 22)))
# tls ${email}@gmail.com # tls ${email}@gmail.com
if [[ $proxy_site ]]; then
proxy_is=$(echo $proxy_site | sed 's#/$##')
fi
case $v2ray_transport in case $v2ray_transport in
4|33) 4|33)
if [[ $is_path ]]; then if [[ $is_path ]]; then
cat >/etc/caddy/Caddyfile <<-EOF cat >/etc/caddy/Caddyfile <<-EOF
$domain { $domain {
reverse_proxy $proxy_site { reverse_proxy $proxy_is {
header_up Host {upstream_hostport} header_up Host {upstream_hostport}
header_up X-Forwarded-Host {host} header_up X-Forwarded-Host {host}
} }
@ -28,7 +31,7 @@ import sites/*
if [[ $is_path ]]; then if [[ $is_path ]]; then
cat >/etc/caddy/Caddyfile <<-EOF cat >/etc/caddy/Caddyfile <<-EOF
$domain { $domain {
reverse_proxy $proxy_site { reverse_proxy $proxy_is {
header_up Host {upstream_hostport} header_up Host {upstream_hostport}
header_up X-Forwarded-Host {host} header_up X-Forwarded-Host {host}
} }

@ -7,7 +7,7 @@ _download_caddy_file() {
fi fi
# local caddy_download_link="https://caddyserver.com/download/linux/${caddy_arch}?license=personal" # local caddy_download_link="https://caddyserver.com/download/linux/${caddy_arch}?license=personal"
# local caddy_download_link="https://github.com/caddyserver/caddy/releases/download/v1.0.4/caddy_v1.0.4_linux_${caddy_arch}.tar.gz" # local caddy_download_link="https://github.com/caddyserver/caddy/releases/download/v1.0.4/caddy_v1.0.4_linux_${caddy_arch}.tar.gz"
local caddy_download_link="https://github.com/caddyserver/caddy/releases/download/v2.5.1/caddy_2.5.1_linux_${caddy_arch}.tar.gz" local caddy_download_link="https://github.com/caddyserver/caddy/releases/download/v2.6.1/caddy_2.6.2_linux_${caddy_arch}.tar.gz"
mkdir -p $caddy_tmp mkdir -p $caddy_tmp

@ -10,7 +10,7 @@ none='\e[0m'
# Root # Root
[[ $(id -u) != 0 ]] && echo -e " 哎呀……请使用 ${red}root ${none}用户运行 ${yellow}~(^_^) ${none}" && exit 1 [[ $(id -u) != 0 ]] && echo -e " 哎呀……请使用 ${red}root ${none}用户运行 ${yellow}~(^_^) ${none}" && exit 1
_version="v3.63" _version="v3.64"
cmd="apt-get" cmd="apt-get"

Loading…
Cancel
Save