feat: pass default interface to sing-box route

This commit is contained in:
Andrey Petelin
2025-10-21 11:24:44 +05:00
parent ed7b7e9c6d
commit e8a5d3d5cc
2 changed files with 6 additions and 1 deletions

View File

@@ -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'

View File

@@ -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")