From e8a5d3d5ccacdf869104a3e7371f9b88585e8558 Mon Sep 17 00:00:00 2001 From: Andrey Petelin Date: Tue, 21 Oct 2025 11:24:44 +0500 Subject: [PATCH] feat: pass default interface to sing-box route --- podkop/files/etc/config/podkop | 2 ++ podkop/files/usr/bin/podkop | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/podkop/files/etc/config/podkop b/podkop/files/etc/config/podkop index b9aecdc..efff886 100644 --- a/podkop/files/etc/config/podkop +++ b/podkop/files/etc/config/podkop @@ -4,6 +4,8 @@ config settings 'settings' option bootstrap_dns_server '77.88.8.8' option dns_rewrite_ttl '60' list source_network_interfaces 'br-lan' + option enable_output_network_interface '0' + #option output_network_interface 'eth1' option enable_badwan_interface_monitoring '0' #list badwan_monitored_interfaces 'wan' #option badwan_reload_delay '2000' diff --git a/podkop/files/usr/bin/podkop b/podkop/files/usr/bin/podkop index dd243c0..59d0e60 100755 --- a/podkop/files/usr/bin/podkop +++ b/podkop/files/usr/bin/podkop @@ -737,7 +737,10 @@ sing_box_configure_dns() { sing_box_configure_route() { log "Configure the route section of a sing-box JSON configuration" - config=$(sing_box_cm_configure_route "$config" "$SB_DIRECT_OUTBOUND_TAG" true "$SB_DNS_SERVER_TAG") + local output_network_interface + config_get output_network_interface "settings" "output_network_interface" + config=$(sing_box_cm_configure_route "$config" "$SB_DIRECT_OUTBOUND_TAG" true "$SB_DNS_SERVER_TAG" \ + "$output_network_interface") local sniff_inbounds sniff_inbounds=$(comma_string_to_json_array "$SB_TPROXY_INBOUND_TAG,$SB_DNS_INBOUND_TAG")