diff --git a/podkop/files/usr/bin/podkop b/podkop/files/usr/bin/podkop index 3e07bb1..8e9c110 100755 --- a/podkop/files/usr/bin/podkop +++ b/podkop/files/usr/bin/podkop @@ -917,7 +917,11 @@ configure_outbound_handler() { fi # Parse subscription outbounds - config="$(sing_box_cf_add_subscription_outbounds "$config" "$section" "$subscription_json_path")" + if ! sing_box_cf_add_subscription_outbounds "$config" "$section" "$subscription_json_path" > /dev/null; then + log "No proxy outbounds found in subscription for section '$section'. Aborted." "fatal" + exit 1 + fi + config="$SING_BOX_CF_LAST_CONFIG" if [ -z "$SUBSCRIPTION_OUTBOUND_TAGS" ]; then log "No proxy outbounds found in subscription for section '$section'. Aborted." "fatal" diff --git a/podkop/files/usr/lib/sing_box_config_facade.sh b/podkop/files/usr/lib/sing_box_config_facade.sh index 7315696..a4e7b39 100644 --- a/podkop/files/usr/lib/sing_box_config_facade.sh +++ b/podkop/files/usr/lib/sing_box_config_facade.sh @@ -349,6 +349,7 @@ sing_box_cf_add_subscription_outbounds() { SUBSCRIPTION_OUTBOUND_TAGS="" SUBSCRIPTION_OUTBOUND_NAMES="" + SING_BOX_CF_LAST_CONFIG="$config" if [ ! -f "$subscription_json_path" ]; then log "Subscription JSON file not found: $subscription_json_path" "error" @@ -421,6 +422,7 @@ sing_box_cf_add_subscription_outbounds() { done log "Added $((i - 1)) subscription outbounds for section '$section'" "info" + SING_BOX_CF_LAST_CONFIG="$config" echo "$config" }