diff --git a/fancyss/scripts/ss_node_subscribe.sh b/fancyss/scripts/ss_node_subscribe.sh index 80622e658..1110e26bb 100755 --- a/fancyss/scripts/ss_node_subscribe.sh +++ b/fancyss/scripts/ss_node_subscribe.sh @@ -6543,21 +6543,21 @@ download_by_curl(){ local UA=$(get_ua) if [ -n "${UA}" ];then echo_date "🪧使用UA:$UA" - local UA_ARG="--user-agent ${UA}" + set -- --user-agent "${UA}" else echo_date "🪧使用UA:curl" - local UA_ARG="" + set -- fi if [ ! -L "/tmp/curl-update" ];then ln -sf /koolshare/bin/curl-fancyss /tmp/curl-subscribe fi - + if [ "${SUB_BY_PROXY}" == "0" ]; then # 先直连下载 echo_date "➡️通过本地网络直连下载订阅..." rm -f "${header_file}" >/dev/null 2>&1 - run /tmp/curl-subscribe -sSk -L ${UA_ARG} -D "${header_file}" --connect-timeout 5 -m 5 --retry 3 --retry-delay 1 "${url_encode}" 2>/dev/null >${DIR}/sub_file_encode_${SUB_LINK_HASH:0:4}.txt + run /tmp/curl-subscribe -sSk -L "$@" -D "${header_file}" --connect-timeout 5 -m 5 --retry 3 --retry-delay 1 "${url_encode}" 2>/dev/null >${DIR}/sub_file_encode_${SUB_LINK_HASH:0:4}.txt if [ "$?" == "0" ]; then return 0 fi @@ -6568,7 +6568,7 @@ download_by_curl(){ if [ -n "${SOCKS5_OPEN}" ];then echo_date "✈️使用当前$(get_type_name "$(sub_get_node_field_plain "${CURR_NODE}" type)")节点:[$(sub_get_node_field_plain "${CURR_NODE}" name)]提供的网络下载..." rm -f "${header_file}" >/dev/null 2>&1 - run /tmp/curl-subscribe -sSk -L ${UA_ARG} -D "${header_file}" --connect-timeout 5 -m 5 -x socks5h://127.0.0.1:23456 --retry 3 --retry-delay 1 "${url_encode}" 2>/dev/null >${DIR}/sub_file_encode_${SUB_LINK_HASH:0:4}.txt + run /tmp/curl-subscribe -sSk -L "$@" -D "${header_file}" --connect-timeout 5 -m 5 -x socks5h://127.0.0.1:23456 --retry 3 --retry-delay 1 "${url_encode}" 2>/dev/null >${DIR}/sub_file_encode_${SUB_LINK_HASH:0:4}.txt return $? else echo_date "⚠️当前$(get_type_name "$(sub_get_node_field_plain "${CURR_NODE}" type)")节点工作异常,结束curl订阅下载!" @@ -6581,7 +6581,7 @@ download_by_curl(){ local EXT_ARG="-x socks5h://127.0.0.1:23456" echo_date "✈️使用当前$(get_type_name "$(sub_get_node_field_plain "${CURR_NODE}" type)")节点:[$(sub_get_node_field_plain "${CURR_NODE}" name)]提供的网络下载..." rm -f "${header_file}" >/dev/null 2>&1 - run /tmp/curl-subscribe -sSk -L ${UA_ARG} -D "${header_file}" --connect-timeout 5 -m 5 -x socks5h://127.0.0.1:23456 --retry 3 --retry-delay 1 "${url_encode}" 2>/dev/null >${DIR}/sub_file_encode_${SUB_LINK_HASH:0:4}.txt + run /tmp/curl-subscribe -sSk -L "$@" -D "${header_file}" --connect-timeout 5 -m 5 -x socks5h://127.0.0.1:23456 --retry 3 --retry-delay 1 "${url_encode}" 2>/dev/null >${DIR}/sub_file_encode_${SUB_LINK_HASH:0:4}.txt return $? else local EXT_ARG="" @@ -6592,7 +6592,7 @@ download_by_curl(){ # 直连下载 echo_date "⬇️使用常规网络下载..." rm -f "${header_file}" >/dev/null 2>&1 - run /tmp/curl-subscribe -sSk -L ${UA_ARG} -D "${header_file}" --connect-timeout 5 -m 5 --retry 3 --retry-delay 1 "${url_encode}" 2>/dev/null >${DIR}/sub_file_encode_${SUB_LINK_HASH:0:4}.txt + run /tmp/curl-subscribe -sSk -L "$@" -D "${header_file}" --connect-timeout 5 -m 5 --retry 3 --retry-delay 1 "${url_encode}" 2>/dev/null >${DIR}/sub_file_encode_${SUB_LINK_HASH:0:4}.txt return $? fi }