mirror of
https://github.com/2dust/v2rayN.git
synced 2025-10-27 02:34:41 +00:00
Compare commits
17 commits
437b2bd4e6
...
8438f99b3b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8438f99b3b | ||
|
|
ccee805045 | ||
|
|
c53362f000 | ||
|
|
952a347b9c | ||
|
|
71d9d7227b | ||
|
|
17e3a16dec | ||
|
|
6e3b2afcc7 | ||
|
|
d8cf86e695 | ||
|
|
ee3575fa95 | ||
|
|
cc95734f11 | ||
|
|
c786e30f89 | ||
|
|
0bd4a3d48a | ||
|
|
879ac65caf | ||
|
|
347b63def8 | ||
|
|
72d377ad2e | ||
|
|
85842dfb8c | ||
|
|
70fe733ea3 |
38 changed files with 49 additions and 23 deletions
|
|
@ -72,6 +72,11 @@ public partial class CoreConfigSingboxService
|
|||
}
|
||||
|
||||
var hostsDomains = new List<string>();
|
||||
var systemHostsMap = Utils.GetSystemHosts();
|
||||
foreach (var kvp in systemHostsMap)
|
||||
{
|
||||
hostsDomains.Add(kvp.Key);
|
||||
}
|
||||
var dnsItem = await AppManager.Instance.GetDNSItem(ECoreType.sing_box);
|
||||
if (dnsItem == null || dnsItem.Enabled == false)
|
||||
{
|
||||
|
|
@ -84,23 +89,12 @@ public partial class CoreConfigSingboxService
|
|||
hostsDomains.Add(kvp.Key);
|
||||
}
|
||||
}
|
||||
if (simpleDNSItem.UseSystemHosts == true)
|
||||
{
|
||||
var systemHostsMap = Utils.GetSystemHosts();
|
||||
foreach (var kvp in systemHostsMap)
|
||||
{
|
||||
hostsDomains.Add(kvp.Key);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (hostsDomains.Count > 0)
|
||||
singboxConfig.route.rules.Add(new()
|
||||
{
|
||||
singboxConfig.route.rules.Add(new()
|
||||
{
|
||||
action = "resolve",
|
||||
domain = hostsDomains,
|
||||
});
|
||||
}
|
||||
action = "resolve",
|
||||
domain = hostsDomains,
|
||||
});
|
||||
|
||||
singboxConfig.route.rules.Add(new()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
using System.Data;
|
||||
using System.Reactive;
|
||||
using DynamicData.Binding;
|
||||
using ReactiveUI;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using Avalonia;
|
||||
using Avalonia.Controls.ApplicationLifetimes;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using ServiceLib.Manager;
|
||||
using Splat;
|
||||
using v2rayN.Desktop.Common;
|
||||
using v2rayN.Desktop.Views;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using Avalonia;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.ReactiveUI;
|
||||
using ServiceLib.Manager;
|
||||
|
||||
namespace v2rayN.Desktop.Base;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
global using ServiceLib;
|
||||
global using ServiceLib;
|
||||
global using ServiceLib.Base;
|
||||
global using ServiceLib.Common;
|
||||
global using ServiceLib.Enums;
|
||||
global using ServiceLib.Handler;
|
||||
global using ServiceLib.Manager;
|
||||
global using ServiceLib.Models;
|
||||
global using ServiceLib.Resx;
|
||||
global using ServiceLib.ViewModels;
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
using Avalonia;
|
||||
using Avalonia.ReactiveUI;
|
||||
using ServiceLib.Manager;
|
||||
using v2rayN.Desktop.Common;
|
||||
|
||||
namespace v2rayN.Desktop;
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ using Avalonia.Styling;
|
|||
using ReactiveUI;
|
||||
using ReactiveUI.Fody.Helpers;
|
||||
using Semi.Avalonia;
|
||||
using ServiceLib.Manager;
|
||||
|
||||
namespace v2rayN.Desktop.ViewModels;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ using System.Reactive.Disposables;
|
|||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
using ReactiveUI;
|
||||
using ServiceLib.Manager;
|
||||
using v2rayN.Desktop.Base;
|
||||
|
||||
namespace v2rayN.Desktop.Views;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ using System.Reactive.Disposables;
|
|||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
using ReactiveUI;
|
||||
using ServiceLib.Manager;
|
||||
using v2rayN.Desktop.Base;
|
||||
|
||||
namespace v2rayN.Desktop.Views;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using System.Reactive.Disposables;
|
||||
using Avalonia.Interactivity;
|
||||
using ReactiveUI;
|
||||
using ServiceLib.Manager;
|
||||
using v2rayN.Desktop.Base;
|
||||
|
||||
namespace v2rayN.Desktop.Views;
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ using Avalonia.Threading;
|
|||
using DialogHostAvalonia;
|
||||
using MsBox.Avalonia.Enums;
|
||||
using ReactiveUI;
|
||||
using ServiceLib.Manager;
|
||||
using Splat;
|
||||
using v2rayN.Desktop.Base;
|
||||
using v2rayN.Desktop.Common;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ using System.Reactive.Disposables;
|
|||
using Avalonia.Controls;
|
||||
using Avalonia.Interactivity;
|
||||
using ReactiveUI;
|
||||
using ServiceLib.Manager;
|
||||
using v2rayN.Desktop.Base;
|
||||
|
||||
namespace v2rayN.Desktop.Views;
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ using Avalonia.Interactivity;
|
|||
using Avalonia.ReactiveUI;
|
||||
using Avalonia.VisualTree;
|
||||
using ReactiveUI;
|
||||
using ServiceLib.Manager;
|
||||
|
||||
namespace v2rayN.Desktop.Views;
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ using Avalonia.Threading;
|
|||
using DialogHostAvalonia;
|
||||
using MsBox.Avalonia.Enums;
|
||||
using ReactiveUI;
|
||||
using ServiceLib.Manager;
|
||||
using Splat;
|
||||
using v2rayN.Desktop.Common;
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ using Avalonia.ReactiveUI;
|
|||
using Avalonia.Threading;
|
||||
using DialogHostAvalonia;
|
||||
using ReactiveUI;
|
||||
using ServiceLib.Manager;
|
||||
using Splat;
|
||||
using v2rayN.Desktop.Common;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ using Avalonia.Controls;
|
|||
using Avalonia.Threading;
|
||||
using CliWrap.Buffered;
|
||||
using DialogHostAvalonia;
|
||||
using ServiceLib.Manager;
|
||||
|
||||
namespace v2rayN.Desktop.Views;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Threading;
|
||||
using ServiceLib.Manager;
|
||||
|
||||
namespace v2rayN;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System.Windows;
|
||||
using ReactiveUI;
|
||||
using ServiceLib.Manager;
|
||||
|
||||
namespace v2rayN.Base;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using System.Windows.Media;
|
||||
using ServiceLib.Manager;
|
||||
|
||||
namespace v2rayN.Converters;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
global using ServiceLib;
|
||||
global using ServiceLib;
|
||||
global using ServiceLib.Base;
|
||||
global using ServiceLib.Common;
|
||||
global using ServiceLib.Enums;
|
||||
global using ServiceLib.Handler;
|
||||
global using ServiceLib.Manager;
|
||||
global using ServiceLib.Models;
|
||||
global using ServiceLib.Resx;
|
||||
global using ServiceLib.ViewModels;
|
||||
|
|
@ -4,6 +4,7 @@ using System.Text;
|
|||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Interop;
|
||||
using ServiceLib.Manager;
|
||||
|
||||
namespace v2rayN.Manager;
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ using MaterialDesignColors.ColorManipulation;
|
|||
using MaterialDesignThemes.Wpf;
|
||||
using ReactiveUI;
|
||||
using ReactiveUI.Fody.Helpers;
|
||||
using ServiceLib.Manager;
|
||||
|
||||
namespace v2rayN.ViewModels;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
using System.Reactive.Disposables;
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using DynamicData;
|
||||
using ReactiveUI;
|
||||
using System.Reactive.Disposables;
|
||||
using DynamicData;
|
||||
|
||||
namespace v2rayN.Views;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using System.Reactive.Disposables;
|
||||
using System.Windows;
|
||||
using ReactiveUI;
|
||||
using ServiceLib.Manager;
|
||||
|
||||
namespace v2rayN.Views;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ using System.Reactive.Disposables;
|
|||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using ReactiveUI;
|
||||
using ServiceLib.Manager;
|
||||
|
||||
namespace v2rayN.Views;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using System.Reactive.Disposables;
|
||||
using System.Windows;
|
||||
using ReactiveUI;
|
||||
using ServiceLib.Manager;
|
||||
|
||||
namespace v2rayN.Views;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using System.Reactive.Disposables;
|
||||
using System.Windows;
|
||||
using ReactiveUI;
|
||||
using ServiceLib.Manager;
|
||||
|
||||
namespace v2rayN.Views;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ using System.Windows;
|
|||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using ReactiveUI;
|
||||
using ServiceLib.Manager;
|
||||
using v2rayN.Manager;
|
||||
|
||||
namespace v2rayN.Views;
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ using System.Windows.Media;
|
|||
using System.Windows.Threading;
|
||||
using MaterialDesignThemes.Wpf;
|
||||
using ReactiveUI;
|
||||
using ServiceLib.Manager;
|
||||
using Splat;
|
||||
using v2rayN.Manager;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ using System.Reactive.Disposables;
|
|||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
using ReactiveUI;
|
||||
using ServiceLib.Manager;
|
||||
|
||||
namespace v2rayN.Views;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ using System.Windows.Controls;
|
|||
using System.Windows.Controls.Primitives;
|
||||
using System.Windows.Input;
|
||||
using ReactiveUI;
|
||||
using ServiceLib.Manager;
|
||||
using v2rayN.Base;
|
||||
|
||||
namespace v2rayN.Views;
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ using System.Windows.Media;
|
|||
using System.Windows.Threading;
|
||||
using MaterialDesignThemes.Wpf;
|
||||
using ReactiveUI;
|
||||
using ServiceLib.Manager;
|
||||
using Splat;
|
||||
using v2rayN.Base;
|
||||
using Point = System.Windows.Point;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using System.Reactive.Disposables;
|
||||
using System.Windows;
|
||||
using ReactiveUI;
|
||||
using ServiceLib.Manager;
|
||||
|
||||
namespace v2rayN.Views;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ using System.Reactive.Disposables;
|
|||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using ReactiveUI;
|
||||
using ServiceLib.Manager;
|
||||
|
||||
namespace v2rayN.Views;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ using System.Reactive.Disposables;
|
|||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using ReactiveUI;
|
||||
using ServiceLib.Manager;
|
||||
|
||||
namespace v2rayN.Views;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ using System.Windows;
|
|||
using System.Windows.Input;
|
||||
using System.Windows.Threading;
|
||||
using ReactiveUI;
|
||||
using ServiceLib.Manager;
|
||||
using Splat;
|
||||
using v2rayN.Manager;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using System.Reactive.Disposables;
|
||||
using System.Windows;
|
||||
using ReactiveUI;
|
||||
using ServiceLib.Manager;
|
||||
|
||||
namespace v2rayN.Views;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ using System.Windows;
|
|||
using System.Windows.Input;
|
||||
using MaterialDesignThemes.Wpf;
|
||||
using ReactiveUI;
|
||||
using ServiceLib.Manager;
|
||||
|
||||
namespace v2rayN.Views;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue