@@ -3821,6 +3821,8 @@ fetch_nodes_value() {
38213821 NODE_NAME[12]=$( awk -F ' "' -v suffix=" ${NODE_TAG[1]} " ' /"tag"[[:space:]]*:/ {v=$4; sub(suffix"$", "", v); print v; exit}' <<< " $JSON" )
38223822 PORT_HYSTERIA2=$( awk -F ' :' ' /"listen_port"[[:space:]]*:/ {gsub(/[[:space:],]/, "", $2); print $2; exit}' <<< " $JSON" )
38233823 UUID[12]=$( awk -F ' "' ' /"password"[[:space:]]*:/ {count++; if (count == 1) {print $4; exit}}' <<< " $JSON" )
3824+ HY2_UP=${HY2_UP:- " $( sed -n ' /type: hysteria2/ s/.*,[ ]*up:[ ]*"\([0-9]\+\)[ ]*Mbps.*/\1/gp' $WORK_DIR /list) " }
3825+ HY2_DOWN=${HY2_DOWN:- " $( sed -n ' /type: hysteria2/ s/.*,[ ]*down:[ ]*"\([0-9]\+\)[ ]*Mbps.*/\1/gp' $WORK_DIR /list) " }
38243826 if grep -q ' "realm"[[:space:]]*:' <<< " $JSON" ; then
38253827 IS_HY2_REALM=is_hy2_realm
38263828 HY2_REALM_ID=$( awk -F ' "' ' /"realm_id"[[:space:]]*:/{print $4; exit}' <<< " $JSON" )
@@ -3992,7 +3994,7 @@ export_list() {
39923994 local SELF_SIGNED_FINGERPRINT_SHA256=$( openssl x509 -fingerprint -noout -sha256 -in ${WORK_DIR} /cert/cert.pem | awk -F ' =' ' {print $NF}' )
39933995 local SELF_SIGNED_FINGERPRINT_BASE64=$( openssl x509 -in ${WORK_DIR} /cert/cert.pem -pubkey -noout | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64)
39943996
3995- local CERT_URL_1=$( awk ' {printf "%s,", $0}' ${WORK_DIR} /cert/cert.pem | sed ' s/,$//' ) &&
3997+ local CERT_URL_1=$( awk ' {printf "%s,", $0}' ${WORK_DIR} /cert/cert.pem | sed ' s/ /%20/g; s/ ,$//' ) &&
39963998 local CERT_URL_2=$( awk ' {printf "%s\\r\\n", $0}' ${WORK_DIR} /cert/cert.pem)
39973999 [ -s ${WORK_DIR} /cert/cert_200.pem ] &&
39984000 local CERT_200_URL_1=$( awk ' {printf "%s,", $0}' ${WORK_DIR} /cert/cert_200.pem | sed ' s/,$//' ) &&
@@ -4221,16 +4223,15 @@ http3://$(echo -n "${UUID[22]}:${UUID[22]}@${SERVER_IP_2}:${PORT_NAIVE}" | base6
42214223vless://${UUID[11]} @${SERVER_IP_1} :${PORT_XTLS_REALITY} ?encryption=none${VISION_FLOW} &security=reality&sni=${TLS_SERVER} &fp=firefox&pbk=${REALITY_PUBLIC[11]} &type=tcp&headerType=none#${NODE_NAME[11]// /% 20} %20${NODE_TAG[0]} "
42224224
42234225 if [ -n " $PORT_HYSTERIA2 " ]; then
4224- local V2RAYN_PARAMS=" sni=${TLS_SERVER} &alpn=h3&insecure=1&allowInsecure=1&pinSHA256=${SELF_SIGNED_FINGERPRINT_SHA256//:/ } "
4225- [[ -n " $PORT_HOPPING_START " && -n " $PORT_HOPPING_END " ]] && V2RAYN_PARAMS+=" &mport=${PORT_HOPPING_START} -${PORT_HOPPING_END} "
4226+ [[ -n " $PORT_HOPPING_START " && -n " $PORT_HOPPING_END " ]] && local V2RAYN_PARAMS=" ,\" Ports\" :\" ${PORT_HOPPING_START} -${PORT_HOPPING_END} \" ,\" HopInterval\" :\" 30s\" "
42264227 local V2RAYN_SUBSCRIBE+="
42274228----------------------------
4228- hysteria2 ://${UUID [12]}@ ${SERVER_IP_1} : ${PORT_HYSTERIA2} ? ${V2RAYN_PARAMS} # ${NODE_NAME [12]// /% 20} %20 ${NODE_TAG[1]} "
4229+ v2rayn ://hysteria2/ $( echo -n " { \" ConfigType \" :7, \" ConfigVersion \" :4, \" Remarks \" : \" ${NODE_NAME [12]} ${NODE_TAG[1]} \" , \" Address \" : \" ${SERVER_IP} \" , \" Port \" : ${PORT_HYSTERIA2} , \" Password \" : \" ${UUID [12]} \" , \" StreamSecurity \" : \" tls \" , \" AllowInsecure \" : \" false \" , \" Sni \" : \" ${TLS_SERVER} \" , \" Cert \" : \" ${CERT_URL_2} \" , \" ProtoExtraObj \" :{ \" UpMbps \" : ${HY2_UP} , \" DownMbps \" : ${HY2_DOWN}${V2RAYN_PARAMS} }} " | base64 -w0 | tr ' +/ ' ' -_ ' | tr -d ' = ' ) "
42294230 fi
42304231
42314232 [ -n " $PORT_TUIC " ] && local V2RAYN_SUBSCRIBE+="
42324233----------------------------
4233- v2rayn://tuic/$( echo -n " {\" ConfigType\" :8,\" CoreType\" :24,\" ConfigVersion\" :4,\" Remarks\" :\" ${NODE_NAME[13]} ${NODE_TAG[2]} \" ,\" Address\" :\" ${SERVER_IP_1 } \" ,\" Port\" :${PORT_TUIC} ,\" Password\" :\" ${TUIC_PASSWORD} \" ,\" Username\" :\" ${UUID[13]} \" ,\" StreamSecurity\" :\" tls\" ,\" AllowInsecure\" :\" false\" ,\" Sni\" :\" ${TLS_SERVER} \" ,\" Alpn\" :\" h3\" ,\" Cert\" :\" ${CERT_URL_2} \" ,\" ProtoExtraObj\" :{\" CongestionControl\" :\" bbr\" }}" | base64 -w0 | tr ' +/' ' -_' | tr -d ' =' ) "
4234+ v2rayn://tuic/$( echo -n " {\" ConfigType\" :8,\" CoreType\" :24,\" ConfigVersion\" :4,\" Remarks\" :\" ${NODE_NAME[13]} ${NODE_TAG[2]} \" ,\" Address\" :\" ${SERVER_IP } \" ,\" Port\" :${PORT_TUIC} ,\" Password\" :\" ${TUIC_PASSWORD} \" ,\" Username\" :\" ${UUID[13]} \" ,\" StreamSecurity\" :\" tls\" ,\" AllowInsecure\" :\" false\" ,\" Sni\" :\" ${TLS_SERVER} \" ,\" Alpn\" :\" h3\" ,\" Cert\" :\" ${CERT_URL_2} \" ,\" ProtoExtraObj\" :{\" CongestionControl\" :\" bbr\" }}" | base64 -w0 | tr ' +/' ' -_' | tr -d ' =' ) "
42344235
42354236 [ -n " $PORT_SHADOWTLS " ] && local V2RAYN_SUBSCRIBE+="
42364237----------------------------
@@ -4329,21 +4330,21 @@ vless://${UUID[18]}@${VLESS_CDN_HOST}:${VLESS_CDN_PORT}?encryption=none&security
43294330
43304331 [ -n " $PORT_H2_REALITY " ] && local V2RAYN_SUBSCRIBE+="
43314332----------------------------
4332- vless ://${UUID [19]}@ ${SERVER_IP_1} : ${PORT_H2_REALITY} ?encryption=none&security=reality&sni= ${TLS_SERVER} &fp=firefox&pbk= ${REALITY_PUBLIC [19]}&type=http# ${NODE_NAME[19] // /% 20} %20 ${NODE_TAG[8]} "
4333+ v2rayn ://vless/ $( echo -n " { \" ConfigType \" :5, \" CoreType \" :24, \" ConfigVersion \" :4, \" Remarks \" : \" ${NODE_NAME [19]} ${NODE_TAG[8]} \" , \" Address \" : \" ${SERVER_IP} \" , \" Port \" : ${PORT_H2_REALITY} , \" Password \" : \" ${UUID [19]}\" , \" Network \" : \" raw \" , \" StreamSecurity \" : \" reality \" , \" AllowInsecure \" : \" false \" , \" Sni \" : \" ${TLS_SERVER} \" , \" Fingerprint \" : \" firefox \" , \" PublicKey \" : \" ${REALITY_PUBLIC[19]} \" } " | base64 -w0 | tr ' +/ ' ' -_ ' | tr -d ' = ' ) "
43334334
43344335 [ -n " $PORT_GRPC_REALITY " ] && local V2RAYN_SUBSCRIBE+="
43354336----------------------------
43364337vless://${UUID[20]} @${SERVER_IP_1} :${PORT_GRPC_REALITY} ?encryption=none&security=reality&sni=${TLS_SERVER} &fp=firefox&pbk=${REALITY_PUBLIC[20]} &type=grpc&serviceName=grpc&mode=gun#${NODE_NAME[20]// /% 20} %20${NODE_TAG[9]} "
43374338
43384339 [ -n " $PORT_ANYTLS " ] && local V2RAYN_SUBSCRIBE+="
43394340----------------------------
4340- v2rayn://anytls/$( echo -n " {\" ConfigType\" :11,\" CoreType\" :24,\" ConfigVersion\" :4,\" Remarks\" :\" ${NODE_NAME[21]} ${NODE_TAG[10]} \" ,\" Address\" :\" ${SERVER_IP_1 } \" ,\" Port\" :${PORT_ANYTLS} ,\" Password\" :\" ${UUID[21]} \" ,\" StreamSecurity\" :\" tls\" ,\" AllowInsecure\" :\" false\" ,\" Sni\" :\" ${TLS_SERVER} \" ,\" Fingerprint\" :\" firefox\" ,\" Cert\" :\" ${CERT_URL_2} \" }" | base64 -w0 | tr ' +/' ' -_' | tr -d ' =' ) "
4341+ v2rayn://anytls/$( echo -n " {\" ConfigType\" :11,\" CoreType\" :24,\" ConfigVersion\" :4,\" Remarks\" :\" ${NODE_NAME[21]} ${NODE_TAG[10]} \" ,\" Address\" :\" ${SERVER_IP } \" ,\" Port\" :${PORT_ANYTLS} ,\" Password\" :\" ${UUID[21]} \" ,\" StreamSecurity\" :\" tls\" ,\" AllowInsecure\" :\" false\" ,\" Sni\" :\" ${TLS_SERVER} \" ,\" Fingerprint\" :\" firefox\" ,\" Cert\" :\" ${CERT_URL_2} \" }" | base64 -w0 | tr ' +/' ' -_' | tr -d ' =' ) "
43414342
43424343 [ -n " $PORT_NAIVE " ] && local V2RAYN_SUBSCRIBE+="
43434344----------------------------
4344- v2rayn://naive/$( echo -n " {\" ConfigType\" :12,\" CoreType\" :24,\" ConfigVersion\" :4,\" Remarks\" :\" ${NODE_NAME[22]} ${NODE_TAG[11]} http2\" ,\" Address\" :\" ${SERVER_IP_1 } \" ,\" Port\" :${PORT_NAIVE} ,\" Password\" :\" ${UUID[22]} \" ,\" Username\" :\" ${UUID[22]} \" ,\" StreamSecurity\" :\" tls\" ,\" AllowInsecure\" :\" false\" ,\" Sni\" :\" ${TLS_SERVER} \" ,\" Cert\" :\" ${CERT_200_URL_2} \" }" | base64 -w0 | tr ' +/' ' -_' | tr -d ' =' )
4345+ v2rayn://naive/$( echo -n " {\" ConfigType\" :12,\" CoreType\" :24,\" ConfigVersion\" :4,\" Remarks\" :\" ${NODE_NAME[22]} ${NODE_TAG[11]} http2\" ,\" Address\" :\" ${SERVER_IP } \" ,\" Port\" :${PORT_NAIVE} ,\" Password\" :\" ${UUID[22]} \" ,\" Username\" :\" ${UUID[22]} \" ,\" StreamSecurity\" :\" tls\" ,\" AllowInsecure\" :\" false\" ,\" Sni\" :\" ${TLS_SERVER} \" ,\" Cert\" :\" ${CERT_200_URL_2} \" }" | base64 -w0 | tr ' +/' ' -_' | tr -d ' =' )
43454346----------------------------
4346- v2rayn://naive/$( echo -n " {\" ConfigType\" :12,\" CoreType\" :24,\" ConfigVersion\" :4,\" Remarks\" :\" ${NODE_NAME[22]} ${NODE_TAG[11]} quic\" ,\" Address\" :\" ${SERVER_IP_1 } \" ,\" Port\" :${PORT_NAIVE} ,\" Password\" :\" ${UUID[22]} \" ,\" Username\" :\" ${UUID[22]} \" ,\" StreamSecurity\" :\" tls\" ,\" AllowInsecure\" :\" false\" ,\" Sni\" :\" ${TLS_SERVER} \" ,\" Cert\" :\" ${CERT_200_URL_2} \" ,\" ProtoExtraObj\" :{\" CongestionControl\" :\" bbr\" ,\" NaiveQuic\" :true}}" | base64 -w0 | tr ' +/' ' -_' | tr -d ' =' ) "
4347+ v2rayn://naive/$( echo -n " {\" ConfigType\" :12,\" CoreType\" :24,\" ConfigVersion\" :4,\" Remarks\" :\" ${NODE_NAME[22]} ${NODE_TAG[11]} quic\" ,\" Address\" :\" ${SERVER_IP } \" ,\" Port\" :${PORT_NAIVE} ,\" Password\" :\" ${UUID[22]} \" ,\" Username\" :\" ${UUID[22]} \" ,\" StreamSecurity\" :\" tls\" ,\" AllowInsecure\" :\" false\" ,\" Sni\" :\" ${TLS_SERVER} \" ,\" Cert\" :\" ${CERT_200_URL_2} \" ,\" ProtoExtraObj\" :{\" CongestionControl\" :\" bbr\" ,\" NaiveQuic\" :true}}" | base64 -w0 | tr ' +/' ' -_' | tr -d ' =' ) "
43474348
43484349 echo -n " $V2RAYN_SUBSCRIBE " | sed ' /-----BEGIN CERTIFICATE-----/,/-----END CERTIFICATE-----/d' | sed -E ' /^[ ]*#|^[ ]+|^\{|^\}/d' | sed ' /^$/d' | base64 -w0 > ${WORK_DIR} /subscribe/v2rayn
43494350
@@ -4353,13 +4354,13 @@ v2rayn://naive/$(echo -n "{\"ConfigType\":12,\"CoreType\":24,\"ConfigVersion\":4
43534354vless://${UUID[11]} @${SERVER_IP_1} :${PORT_XTLS_REALITY} ?security=reality&sni=${TLS_SERVER} &fp=firefox&pbk=${REALITY_PUBLIC[11]} &type=tcp${VISION_FLOW} &encryption=none#${NODE_NAME[11]// /% 20} %20${NODE_TAG[0]} "
43544355
43554356 if [ -n " $PORT_HYSTERIA2 " ]; then
4356- local THRONE_PARAMS=" insecure=1 &security=tls&sni=${TLS_SERVER} &upmbps=${HY2_UP} &downmbps=${HY2_DOWN} &security=tls&tls_certificate=${CERT_URL_1} "
4357+ local THRONE_PARAMS=" allowInsecure=true&alpn &security=tls&sni=${TLS_SERVER} &upmbps=${HY2_UP} &downmbps=${HY2_DOWN} &security=tls&tls_certificate=${CERT_URL_1} "
43574358 if [[ -n " $PORT_HOPPING_START " && -n " $PORT_HOPPING_END " ]]; then
4358- THRONE_PARAMS+=" &mport=${PORT_HOPPING_START} -${PORT_HOPPING_END} &hop_interval=30 "
4359+ THRONE_PARAMS+=" &mport=${PORT_HOPPING_START} -${PORT_HOPPING_END} &hop_interval=30s "
43594360 fi
43604361 local THRONE_SUBSCRIBE+="
43614362----------------------------
4362- hy2 ://${UUID[12]} @${SERVER_IP_1} :${PORT_HYSTERIA2} ?${THRONE_PARAMS} #${NODE_NAME[12]// /% 20} %20${NODE_TAG[1]} "
4363+ hysteria2 ://${UUID[12]} @${SERVER_IP_1} :${PORT_HYSTERIA2} ?${THRONE_PARAMS} #${NODE_NAME[12]// /% 20} %20${NODE_TAG[1]} "
43634364 fi
43644365
43654366 [ -n " $PORT_TUIC " ] && local THRONE_SUBSCRIBE+="
@@ -4403,15 +4404,15 @@ vmess://$(echo -n "{\"add\":\"${CDN[17]}\",\"aid\":\"0\",\"host\":\"$VMESS_HOST_
44034404 if [[ " ${STATUS[1]} " =~ $( text 27) | $( text 28) ]] || [[ " $IS_ARGO " = ' is_argo' && " $NONINTERACTIVE_INSTALL " = ' noninteractive_install' ]]; then
44044405 local THRONE_SUBSCRIBE+="
44054406----------------------------
4406- vless://${UUID[18]} @${VLESS_CDN_HOST} :${VLESS_CDN_PORT} ?security=tls&sni=$ARGO_DOMAIN &type=ws&path=/$VLESS_WS_PATH ?ed%3D2560&host=$ARGO_DOMAIN &encryption=zero #${NODE_NAME[18]// /% 20} %20${NODE_TAG[7]} "
4407+ vless://${UUID[18]} @${VLESS_CDN_HOST} :${VLESS_CDN_PORT} ?security=tls&sni=$ARGO_DOMAIN &type=ws&path=/$VLESS_WS_PATH ?ed%3D2560&host=$ARGO_DOMAIN &encryption=none #${NODE_NAME[18]// /% 20} %20${NODE_TAG[7]} "
44074408 [ " $ARGO_TYPE " = ' is_token_argo' ] && THRONE_SUBSCRIBE+="
44084409
44094410 # $( text 94)
44104411"
44114412 else
44124413 WS_SERVER_IP_SHOW=${WS_SERVER_IP[18]} && TYPE_HOST_DOMAIN=$VLESS_HOST_DOMAIN && TYPE_PORT_WS=$PORT_VLESS_WS && local THRONE_SUBSCRIBE+="
44134414----------------------------
4414- vless://${UUID[18]} @${VLESS_CDN_HOST} :${VLESS_CDN_PORT} ?security=tls&sni=$VLESS_HOST_DOMAIN &type=ws&path=/$VLESS_WS_PATH ?ed%3D2560&host=$VLESS_HOST_DOMAIN &encryption=zero #${NODE_NAME[18]// /% 20} %20${NODE_TAG[7]}
4415+ vless://${UUID[18]} @${VLESS_CDN_HOST} :${VLESS_CDN_PORT} ?security=tls&sni=$VLESS_HOST_DOMAIN &type=ws&path=/$VLESS_WS_PATH ?ed%3D2560&host=$VLESS_HOST_DOMAIN &encryption=none #${NODE_NAME[18]// /% 20} %20${NODE_TAG[7]}
44154416
44164417# $( text 52) "
44174418 fi
0 commit comments