@@ -10,7 +10,7 @@ protocol_list=(
10
10
VLESS-H2-TLS
11
11
VLESS-WS-TLS
12
12
VLESS-gRPC-TLS
13
- VLESS-XTLS-uTLS- REALITY
13
+ VLESS-REALITY
14
14
Trojan-H2-TLS
15
15
Trojan-WS-TLS
16
16
Trojan-gRPC-TLS
@@ -880,7 +880,7 @@ add() {
880
880
is_new_protocol=$( sed -E " s/^V/VLESS-/;s/^T/Trojan-/;/^(W|H|G)/{s/^/VMess-/};s/G/g/" <<< ${is_lower^^} ) -TLS
881
881
;;
882
882
r | reality)
883
- is_new_protocol=VLESS-XTLS-uTLS- REALITY
883
+ is_new_protocol=VLESS-REALITY
884
884
;;
885
885
ss)
886
886
is_new_protocol=Shadowsocks
@@ -913,6 +913,7 @@ add() {
913
913
is_use_host=$2
914
914
is_use_uuid=$3
915
915
is_use_path=$4
916
+ is_add_opts=" [host] [uuid] [/path]"
916
917
;;
917
918
vmess* )
918
919
is_use_port=$2
@@ -921,35 +922,49 @@ add() {
921
922
is_use_dynamic_port_start=$5
922
923
is_use_dynamic_port_end=$6
923
924
[[ $( grep dynamic-port <<< $is_new_protocol ) ]] && is_dynamic_port=1
925
+ if [[ $is_dynamic_port ]]; then
926
+ is_add_opts=" [port] [uuid] [type] [start_port] [end_port]"
927
+ else
928
+ is_add_opts=" [port] [uuid] [type]"
929
+ fi
924
930
;;
925
931
* reality* )
926
932
is_reality=1
927
933
is_use_port=$2
928
934
is_use_uuid=$3
929
935
is_use_servername=$4
936
+ is_add_opts=" [port] [uuid] [sni]"
930
937
;;
931
938
shadowsocks)
932
939
is_use_port=$2
933
940
is_use_pass=$3
934
941
is_use_method=$4
942
+ is_add_opts=" [port] [password] [method]"
935
943
;;
936
944
* door)
937
945
is_use_port=$2
938
946
is_use_door_addr=$3
939
947
is_use_door_port=$4
948
+ is_add_opts=" [port] [remote_addr] [remote_port]"
940
949
;;
941
950
socks)
942
951
is_socks=1
943
952
is_use_port=$2
944
953
is_use_socks_user=$3
945
954
is_use_socks_pass=$4
955
+ is_add_opts=" [port] [username] [password]"
946
956
;;
947
957
* http)
948
958
is_use_port=$2
959
+ is_add_opts=" [port]"
949
960
;;
950
961
esac
951
962
952
- [[ $1 && ! $is_change ]] && msg " \n使用协议: $is_new_protocol "
963
+ [[ $1 && ! $is_change ]] && {
964
+ msg " \n使用协议: $is_new_protocol "
965
+ # err msg tips
966
+ is_err_tips=" \n\n请使用: $( _green $is_core add $1 $is_add_opts ) 来添加 $is_new_protocol 配置"
967
+ }
953
968
954
969
# remove old protocol args
955
970
if [[ $is_set_new_protocol ]]; then
@@ -998,28 +1013,28 @@ add() {
998
1013
999
1014
if [[ $is_use_port ]]; then
1000
1015
[[ ! $( is_test port ${is_use_port} ) ]] && {
1001
- err " ($is_use_port ) 不是一个有效的端口."
1016
+ err " ($is_use_port ) 不是一个有效的端口. $is_err_tips "
1002
1017
}
1003
1018
[[ $( is_test port_used $is_use_port ) ]] && {
1004
- err " 无法使用 ($is_use_port ) 端口."
1019
+ err " 无法使用 ($is_use_port ) 端口. $is_err_tips "
1005
1020
}
1006
1021
port=$is_use_port
1007
1022
fi
1008
1023
if [[ $is_use_door_port ]]; then
1009
1024
[[ ! $( is_test port ${is_use_door_port} ) ]] && {
1010
- err " (${is_use_door_port} ) 不是一个有效的目标端口."
1025
+ err " (${is_use_door_port} ) 不是一个有效的目标端口. $is_err_tips "
1011
1026
}
1012
1027
door_port=$is_use_door_port
1013
1028
fi
1014
1029
if [[ $is_use_uuid ]]; then
1015
1030
[[ ! $( is_test uuid $is_use_uuid ) ]] && {
1016
- err " ($is_use_uuid ) 不是一个有效的 UUID."
1031
+ err " ($is_use_uuid ) 不是一个有效的 UUID. $is_err_tips "
1017
1032
}
1018
1033
uuid=$is_use_uuid
1019
1034
fi
1020
1035
if [[ $is_use_path ]]; then
1021
1036
[[ ! $( is_test path $is_use_path ) ]] && {
1022
- err " ($is_use_path ) 不是有效的路径."
1037
+ err " ($is_use_path ) 不是有效的路径. $is_err_tips "
1023
1038
}
1024
1039
path=$is_use_path
1025
1040
fi
@@ -1039,7 +1054,7 @@ add() {
1039
1054
for v in ${is_tmp_list[@]} ; do
1040
1055
msg " \t\t$v "
1041
1056
done
1042
- msg
1057
+ msg " $is_err_tips \n "
1043
1058
exit 1
1044
1059
}
1045
1060
ss_method=$is_tmp_use_type
0 commit comments