Commit d85dd80 1 parent ac82a14 commit d85dd80 Copy full SHA for d85dd80
File tree 4 files changed +6
-6
lines changed
4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
1
caddy_config () {
2
2
is_caddy_site_file=$is_caddy_conf /${host} .conf
3
- [[ ! $tlsport ]] && tlsport=443
4
3
case $1 in
5
4
new)
6
5
mkdir -p $is_caddy_dir $is_caddy_dir /sites $is_caddy_conf
Original file line number Diff line number Diff line change @@ -372,7 +372,7 @@ create() {
372
372
api add $is_json_file $is_dynamic_port_link_file & > /dev/null
373
373
fi
374
374
# caddy auto tls
375
- [[ $is_caddy && $host ]] && {
375
+ [[ $is_caddy && $host && ! $is_no_auto_tls ]] && {
376
376
create caddy $net
377
377
}
378
378
# restart core
@@ -1205,10 +1205,10 @@ get() {
1205
1205
is_dynamic_port_range=$( jq -r ' .inbounds[0].port' $is_dynamic_port_file )
1206
1206
[[ $? != 0 ]] && err " 无法读取动态端口文件: $is_dynamic_port "
1207
1207
fi
1208
- if [[ $is_caddy && $host ]]; then
1209
- tlsport =$( egrep -o " $host :[1-9][0-9]?+" $is_caddy_conf /$host .conf | sed s/.* ://)
1208
+ if [[ $is_caddy && $host && -f $is_caddy_conf / $host .conf ]]; then
1209
+ tmp_tlsport =$( egrep -o " $host :[1-9][0-9]?+" $is_caddy_conf /$host .conf | sed s/.* ://)
1210
1210
fi
1211
- [[ ! $tlsport ]] && tlsport=443
1211
+ [[ $tmp_tlsport ]] && tlsport=$tmp_tlsport
1212
1212
[[ $is_client && $host ]] && port=$tlsport
1213
1213
get protocol $is_protocol -$net
1214
1214
fi
Original file line number Diff line number Diff line change @@ -83,6 +83,7 @@ is_caddy_repo=caddyserver/caddy
83
83
is_caddyfile=$is_caddy_dir /Caddyfile
84
84
is_caddy_conf=$is_caddy_dir /$author
85
85
is_caddy_service=$( systemctl list-units --full -all | grep caddy.service)
86
+ tlsport=443
86
87
87
88
# core ver
88
89
is_core_ver=$( $is_core_bin version | head -n1 | cut -d " " -f1-2)
Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
3
args=$@
4
- is_sh_ver=v1.10
4
+ is_sh_ver=v1.11
5
5
6
6
. /etc/xray/sh/src/init.sh
You can’t perform that action at this time.
0 commit comments