diff --git a/v2rayN/v2rayN/Handler/CoreConfigSingbox.cs b/v2rayN/v2rayN/Handler/CoreConfigSingbox.cs
index efda6eb9..0916cd7b 100644
--- a/v2rayN/v2rayN/Handler/CoreConfigSingbox.cs
+++ b/v2rayN/v2rayN/Handler/CoreConfigSingbox.cs
@@ -135,6 +135,15 @@ namespace v2rayN.Handler
inbound.sniff_override_destination = _config.inbound[0].routeOnly ? false : _config.inbound[0].sniffingEnabled;
inbound.domain_strategy = Utils.IsNullOrEmpty(_config.routingBasicItem.domainStrategy4Singbox) ? null : _config.routingBasicItem.domainStrategy4Singbox;
+ if (_config.routingBasicItem.enableRoutingAdvanced)
+ {
+ var routing = ConfigHandler.GetDefaultRouting(ref _config);
+ if (!Utils.IsNullOrEmpty(routing.domainStrategy4Singbox))
+ {
+ inbound.domain_strategy = routing.domainStrategy4Singbox;
+ }
+ }
+
//http
var inbound2 = GetInbound(inbound, Global.InboundHttp, 1, false);
singboxConfig.inbounds.Add(inbound2);
diff --git a/v2rayN/v2rayN/Mode/RoutingItem.cs b/v2rayN/v2rayN/Mode/RoutingItem.cs
index 1949344b..25c85606 100644
--- a/v2rayN/v2rayN/Mode/RoutingItem.cs
+++ b/v2rayN/v2rayN/Mode/RoutingItem.cs
@@ -16,6 +16,7 @@ namespace v2rayN.Mode
public bool locked { get; set; }
public string customIcon { get; set; }
public string domainStrategy { get; set; }
+ public string domainStrategy4Singbox { get; set; }
public int sort { get; set; }
}
}
\ No newline at end of file
diff --git a/v2rayN/v2rayN/Views/RoutingRuleSettingWindow.xaml b/v2rayN/v2rayN/Views/RoutingRuleSettingWindow.xaml
index 36eb2a61..4ea61401 100644
--- a/v2rayN/v2rayN/Views/RoutingRuleSettingWindow.xaml
+++ b/v2rayN/v2rayN/Views/RoutingRuleSettingWindow.xaml
@@ -138,13 +138,26 @@
VerticalAlignment="Center"
Style="{StaticResource ToolbarTextBlock}"
Text="{x:Static resx:ResUI.TbdomainStrategy}" />
-
+ Orientation="Horizontal">
+
+
+
+
+ {
+ cmbdomainStrategy4Singbox.Items.Add(it);
+ });
this.WhenActivated(disposables =>
{
@@ -33,6 +37,8 @@ namespace v2rayN.Views
this.Bind(ViewModel, vm => vm.SelectedRouting.remarks, v => v.txtRemarks.Text).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.SelectedRouting.domainStrategy, v => v.cmbdomainStrategy.Text).DisposeWith(disposables);
+ this.Bind(ViewModel, vm => vm.SelectedRouting.domainStrategy4Singbox, v => v.cmbdomainStrategy4Singbox.Text).DisposeWith(disposables);
+
this.Bind(ViewModel, vm => vm.SelectedRouting.url, v => v.txtUrl.Text).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.SelectedRouting.customIcon, v => v.txtCustomIcon.Text).DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.SelectedRouting.sort, v => v.txtSort.Text).DisposeWith(disposables);