Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
v3 boom 620ec46 Jan 5, 2019
1 contributor

Users who have contributed to this file

68 lines (66 sloc) 1.15 KB
local email=$(((RANDOM << 22)))
case $v2ray_transport in
4)
if [[ $is_path ]]; then
cat >/etc/caddy/Caddyfile <<-EOF
$domain {
tls ${email}@gmail.com
gzip
timeouts none
proxy / $proxy_site {
except /${path}
}
proxy /${path} 127.0.0.1:${v2ray_port} {
without /${path}
websocket
}
}
import sites/*
EOF
else
cat >/etc/caddy/Caddyfile <<-EOF
$domain {
tls ${email}@gmail.com
timeouts none
proxy / 127.0.0.1:${v2ray_port} {
websocket
}
}
import sites/*
EOF
fi
;;
5)
if [[ $is_path ]]; then
cat >/etc/caddy/Caddyfile <<-EOF
$domain {
tls ${email}@gmail.com
gzip
timeouts none
proxy / $proxy_site {
except /${path}
}
proxy /${path} https://127.0.0.1:${v2ray_port} {
header_upstream Host {host}
header_upstream X-Forwarded-Proto {scheme}
insecure_skip_verify
}
}
import sites/*
EOF
else
cat >/etc/caddy/Caddyfile <<-EOF
$domain {
tls ${email}@gmail.com
timeouts none
proxy / https://127.0.0.1:${v2ray_port} {
header_upstream Host {host}
header_upstream X-Forwarded-Proto {scheme}
insecure_skip_verify
}
}
import sites/*
EOF
fi
;;
esac
You can’t perform that action at this time.