3
3
protocol_list=(
4
4
VMess-TCP
5
5
VMess-mKCP
6
- VMess-QUIC
6
+ # VMess-QUIC
7
7
VMess-H2-TLS
8
8
VMess-WS-TLS
9
9
VMess-gRPC-TLS
10
10
VLESS-H2-TLS
11
11
VLESS-WS-TLS
12
12
VLESS-gRPC-TLS
13
- VLESS-SplitHTTP -TLS
13
+ VLESS-XHTTP -TLS
14
14
VLESS-REALITY
15
15
Trojan-H2-TLS
16
16
Trojan-WS-TLS
@@ -19,7 +19,7 @@ protocol_list=(
19
19
# Dokodemo-Door
20
20
VMess-TCP-dynamic-port
21
21
VMess-mKCP-dynamic-port
22
- VMess-QUIC-dynamic-port
22
+ # VMess-QUIC-dynamic-port
23
23
Socks
24
24
)
25
25
ss_method_list=(
@@ -125,7 +125,7 @@ get_uuid() {
125
125
}
126
126
127
127
get_ip () {
128
- [[ $ip || $is_no_auto_tls || $is_gen ]] && return
128
+ [[ $ip || $is_no_auto_tls || $is_gen || $is_dont_get_ip ]] && return
129
129
export " $( _wget -4 -qO- https://one.one.one.one/cdn-cgi/trace | grep ip=) " & > /dev/null
130
130
[[ ! $ip ]] && export " $( _wget -6 -qO- https://one.one.one.one/cdn-cgi/trace | grep ip=) " & > /dev/null
131
131
[[ ! $ip ]] && {
@@ -727,6 +727,8 @@ change() {
727
727
728
728
# delete config.
729
729
del () {
730
+ # dont get ip
731
+ is_dont_get_ip=1
730
732
[[ $is_conf_dir_empty ]] && return # not found any json file.
731
733
# get a config file
732
734
[[ ! $is_config_file ]] && get info $1
@@ -756,6 +758,7 @@ del() {
756
758
warn " 当前配置目录为空! 因为你刚刚删除了最后一个配置文件."
757
759
is_conf_dir_empty=1
758
760
fi
761
+ unset is_dont_get_ip
759
762
[[ $is_dont_auto_exit ]] && unset is_config_file
760
763
}
761
764
@@ -875,14 +878,15 @@ add() {
875
878
is_lower=${1,,}
876
879
if [[ $is_lower ]]; then
877
880
case $is_lower in
878
- tcp | kcp | quic | tcpd | kcpd | quicd)
881
+ # tcp | kcp | quic | tcpd | kcpd | quicd)
882
+ tcp | kcp | tcpd | kcpd)
879
883
is_new_protocol=VMess-$( sed ' s/^K/mK/;s/D$/-dynamic-port/' <<< ${is_lower^^} )
880
884
;;
881
885
ws | h2 | grpc | vws | vh2 | vgrpc | tws | th2 | tgrpc)
882
886
is_new_protocol=$( sed -E " s/^V/VLESS-/;s/^T/Trojan-/;/^(W|H|G)/{s/^/VMess-/};s/G/g/" <<< ${is_lower^^} ) -TLS
883
887
;;
884
- vsh | split | splithttp )
885
- is_new_protocol=VLESS-SplitHTTP -TLS
888
+ xhttp )
889
+ is_new_protocol=VLESS-XHTTP -TLS
886
890
;;
887
891
r | reality)
888
892
is_new_protocol=VLESS-REALITY
@@ -981,7 +985,7 @@ add() {
981
985
kcp_seed=
982
986
[[ $( grep -i tcp <<< $is_new_protocol ) ]] && header_type=
983
987
;;
984
- h2 | ws | grpc | splithttp )
988
+ h2 | ws | grpc | xhttp )
985
989
old_host=$host
986
990
if [[ ! $is_use_tls ]]; then
987
991
host=
@@ -1201,10 +1205,10 @@ get() {
1201
1205
is_json_str=$( cat $is_conf_dir /" $is_config_file " )
1202
1206
is_json_data_base=$( jq ' .inbounds[0]|.protocol,.port,(.settings|(.clients[0]|.id,.password),.method,.password,.address,.port,.detour.to,(.accounts[0]|.user,.pass))' <<< $is_json_str )
1203
1207
[[ $? != 0 ]] && err " 无法读取此文件: $is_config_file "
1204
- is_json_data_more=$( jq ' .inbounds[0]|.streamSettings|.network,.tcpSettings.header.type,(.kcpSettings|.seed,.header.type),.quicSettings.header.type,.wsSettings.path,.httpSettings.path,.grpcSettings.serviceName,.splithttpSettings .path' <<< $is_json_str )
1205
- is_json_data_host=$( jq ' .inbounds[0]|.streamSettings|.grpc_host,.wsSettings.headers.Host,.httpSettings.host[0],.splithttpSettings .host' <<< $is_json_str )
1208
+ is_json_data_more=$( jq ' .inbounds[0]|.streamSettings|.network,.tcpSettings.header.type,(.kcpSettings|.seed,.header.type),.quicSettings.header.type,.wsSettings.path,.httpSettings.path,.grpcSettings.serviceName,.xhttpSettings .path' <<< $is_json_str )
1209
+ is_json_data_host=$( jq ' .inbounds[0]|.streamSettings|.grpc_host,.wsSettings.headers.Host,.httpSettings.host[0],.xhttpSettings .host' <<< $is_json_str )
1206
1210
is_json_data_reality=$( jq ' .inbounds[0]|.streamSettings|.security,(.realitySettings|.serverNames[0],.publicKey,.privateKey)' <<< $is_json_str )
1207
- is_up_var_set=(null is_protocol port uuid trojan_password ss_method ss_password door_addr door_port is_dynamic_port is_socks_user is_socks_pass net tcp_type kcp_seed kcp_type quic_type ws_path h2_path grpc_path split_path grpc_host ws_host h2_host split_host is_reality is_servername is_public_key is_private_key)
1211
+ is_up_var_set=(null is_protocol port uuid trojan_password ss_method ss_password door_addr door_port is_dynamic_port is_socks_user is_socks_pass net tcp_type kcp_seed kcp_type quic_type ws_path h2_path grpc_path xhttp_path grpc_host ws_host h2_host xhttp_host is_reality is_servername is_public_key is_private_key)
1208
1212
[[ $is_debug ]] && msg " \n------------- debug: $is_config_file -------------"
1209
1213
i=0
1210
1214
for v in $( sed ' s/""/null/g;s/"//g' <<< " $is_json_data_base $is_json_data_more $is_json_data_host $is_json_data_reality" ) ; do
@@ -1216,8 +1220,14 @@ get() {
1216
1220
[[ ${! v} == ' null' ]] && unset $v
1217
1221
done
1218
1222
1219
- path=" ${ws_path}${h2_path}${grpc_path}${split_path} "
1220
- host=" ${ws_host}${h2_host}${grpc_host}${split_host} "
1223
+ # splithttp
1224
+ if [[ $net == ' splithttp' ]]; then
1225
+ net=xhttp
1226
+ xhttp_path=$( jq -r ' .inbounds[0]|.streamSettings|.splithttpSettings.path' <<< $is_json_str )
1227
+ xhttp_host=$( jq -r ' .inbounds[0]|.streamSettings|.splithttpSettings.host' <<< $is_json_str )
1228
+ fi
1229
+ path=" ${ws_path}${h2_path}${grpc_path}${xhttp_path} "
1230
+ host=" ${ws_host}${h2_host}${grpc_host}${xhttp_host} "
1221
1231
header_type=" ${tcp_type}${kcp_type}${quic_type} "
1222
1232
if [[ $is_reality == ' reality' ]]; then
1223
1233
net=reality
@@ -1343,10 +1353,10 @@ get() {
1343
1353
[[ ! $path ]] && path=" /$uuid "
1344
1354
is_stream=' httpSettings:{path:"' $path ' ",host:["' $host ' "]}'
1345
1355
;;
1346
- * split * )
1347
- net=splithttp
1356
+ * xhttp * )
1357
+ net=xhttp
1348
1358
[[ ! $path ]] && path=" /$uuid "
1349
- is_stream=' splithttpSettings :{host:"' $host ' ",path:"' $path ' "}'
1359
+ is_stream=' xhttpSettings :{host:"' $host ' ",path:"' $path ' "}'
1350
1360
;;
1351
1361
* )
1352
1362
err " 无法识别传输协议: $is_config_file "
@@ -1503,7 +1513,7 @@ info() {
1503
1513
is_url=" ss://$( echo -n ${ss_method} :${ss_password} | base64 -w 0) @${is_addr} :${port} #233boy-$net -${is_addr} "
1504
1514
is_info_str=($is_protocol $is_addr $port $ss_password $ss_method )
1505
1515
;;
1506
- ws | h2 | grpc | splithttp )
1516
+ ws | h2 | grpc | xhttp )
1507
1517
is_color=45
1508
1518
is_can_change=(0 1 2 3 5)
1509
1519
is_info_show=(0 1 2 3 4 6 7 8)
0 commit comments