Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7ede3af762 | ||
|
|
97ea1c7a9e | ||
|
|
43bb2c0fb8 | ||
|
|
6e7196bb27 | ||
|
|
87a71d58e8 | ||
|
|
32ffd43fe3 | ||
|
|
6500c8d85e | ||
|
|
9866d436da | ||
|
|
0f4884d9d8 | ||
|
|
5a81441351 | ||
|
|
e8721bfb6b | ||
|
|
1b09d95209 | ||
|
|
35f3b5a50e | ||
|
|
ff5203a561 |
@@ -9,9 +9,9 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Google.Protobuf" Version="3.27.2" />
|
||||
<PackageReference Include="Grpc.Net.Client" Version="2.63.0" />
|
||||
<PackageReference Include="Grpc.Tools" Version="2.64.0">
|
||||
<PackageReference Include="Google.Protobuf" Version="3.27.3" />
|
||||
<PackageReference Include="Grpc.Net.Client" Version="2.65.0" />
|
||||
<PackageReference Include="Grpc.Tools" Version="2.65.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<Application
|
||||
x:Class="v2rayN.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:conv="clr-namespace:v2rayN.Converters"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
ShutdownMode="OnExplicitShutdown"
|
||||
StartupUri="Views/MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
@@ -62,11 +62,9 @@
|
||||
</Style>
|
||||
<Style TargetType="{x:Type TextElement}">
|
||||
<Setter Property="FontWeight" Value="Regular" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource MaterialDesignBody}" />
|
||||
</Style>
|
||||
<Style TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="FontWeight" Value="Regular" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource MaterialDesignBody}" />
|
||||
</Style>
|
||||
<Style x:Key="lvItemSelected" TargetType="{x:Type ListViewItem}">
|
||||
<Setter Property="Margin" Value="2" />
|
||||
|
||||
@@ -176,8 +176,10 @@ namespace v2rayN
|
||||
public static readonly List<string> AllowInsecure = new() { "true", "false", "" };
|
||||
public static readonly List<string> DomainStrategy4Freedoms = new() { "AsIs", "UseIP", "UseIPv4", "UseIPv6", "" };
|
||||
public static readonly List<string> SingboxDomainStrategy4Out = new() { "ipv4_only", "prefer_ipv4", "prefer_ipv6", "ipv6_only", "" };
|
||||
public static readonly List<string> DomainDNSAddress = ["223.5.5.5", "223.6.6.6", "localhost"];
|
||||
public static readonly List<string> SingboxDomainDNSAddress = ["223.5.5.5", "223.6.6.6", "dhcp://auto"];
|
||||
public static readonly List<string> Languages = new() { "zh-Hans", "zh-Hant", "en", "fa-Ir", "ru" };
|
||||
public static readonly List<string> Alpns = new() { "h3", "h2", "http/1.1", "h3,h2,http/1.1", "h3,h2", "h2,http/1.1", "" };
|
||||
public static readonly List<string> Alpns = new() { "h3", "h2", "http/1.1", "h3,h2", "h2,http/1.1", "h3,h2,http/1.1", "" };
|
||||
public static readonly List<string> LogLevels = new() { "debug", "info", "warning", "error", "none" };
|
||||
public static readonly List<string> InboundTags = new() { "socks", "http", "socks2", "http2" };
|
||||
public static readonly List<string> RuleProtocols = new() { "http", "tls", "bittorrent" };
|
||||
|
||||
@@ -197,6 +197,15 @@ namespace v2rayN.Handler
|
||||
}
|
||||
config.clashUIItem ??= new();
|
||||
|
||||
if (config.systemProxyItem == null)
|
||||
{
|
||||
config.systemProxyItem = new()
|
||||
{
|
||||
systemProxyExceptions = config.systemProxyExceptions,
|
||||
systemProxyAdvancedProtocol = config.systemProxyAdvancedProtocol,
|
||||
};
|
||||
}
|
||||
|
||||
LazyConfig.Instance.SetConfig(config);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -393,12 +393,16 @@ namespace v2rayN.Handler.CoreConfig
|
||||
var singboxConfig = JsonUtils.Deserialize<SingboxConfig>(txtFile);
|
||||
if (singboxConfig == null)
|
||||
{
|
||||
msg = ResUI.FailedConversionConfiguration;
|
||||
return -1;
|
||||
//msg = ResUI.FailedConversionConfiguration;
|
||||
//return -1;
|
||||
File.Copy(addressFileName, fileName);
|
||||
}
|
||||
else
|
||||
{
|
||||
GenInbounds(singboxConfig);
|
||||
GenExperimental(singboxConfig);
|
||||
JsonUtils.ToFile(singboxConfig, fileName, false);
|
||||
}
|
||||
|
||||
GenExperimental(singboxConfig);
|
||||
JsonUtils.ToFile(singboxConfig, fileName, false);
|
||||
|
||||
//check again
|
||||
if (!File.Exists(fileName))
|
||||
@@ -1180,7 +1184,7 @@ namespace v2rayN.Handler.CoreConfig
|
||||
}
|
||||
singboxConfig.dns = dns4Sbox;
|
||||
|
||||
GenDnsDomains(node, singboxConfig, item?.domainStrategy4Freedom);
|
||||
GenDnsDomains(node, singboxConfig, item);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -1189,7 +1193,7 @@ namespace v2rayN.Handler.CoreConfig
|
||||
return 0;
|
||||
}
|
||||
|
||||
private int GenDnsDomains(ProfileItem? node, SingboxConfig singboxConfig, string? strategy)
|
||||
private int GenDnsDomains(ProfileItem? node, SingboxConfig singboxConfig, DNSItem? dNSItem)
|
||||
{
|
||||
var dns4Sbox = singboxConfig.dns ?? new();
|
||||
dns4Sbox.servers ??= [];
|
||||
@@ -1199,9 +1203,9 @@ namespace v2rayN.Handler.CoreConfig
|
||||
dns4Sbox.servers.Add(new()
|
||||
{
|
||||
tag = tag,
|
||||
address = "223.5.5.5",
|
||||
address = Utils.IsNullOrEmpty(dNSItem?.domainDNSAddress) ? Global.SingboxDomainDNSAddress.FirstOrDefault() : dNSItem?.domainDNSAddress,
|
||||
detour = Global.DirectTag,
|
||||
strategy = Utils.IsNullOrEmpty(strategy) ? null : strategy,
|
||||
strategy = Utils.IsNullOrEmpty(dNSItem?.domainStrategy4Freedom) ? null : dNSItem?.domainStrategy4Freedom,
|
||||
});
|
||||
dns4Sbox.rules.Insert(0, new()
|
||||
{
|
||||
|
||||
@@ -1073,7 +1073,7 @@ namespace v2rayN.Handler.CoreConfig
|
||||
}
|
||||
}
|
||||
|
||||
GenDnsDomains(node, obj);
|
||||
GenDnsDomains(node, obj, item);
|
||||
|
||||
v2rayConfig.dns = obj;
|
||||
}
|
||||
@@ -1084,7 +1084,7 @@ namespace v2rayN.Handler.CoreConfig
|
||||
return 0;
|
||||
}
|
||||
|
||||
private int GenDnsDomains(ProfileItem? node, JsonNode dns)
|
||||
private int GenDnsDomains(ProfileItem? node, JsonNode dns, DNSItem? dNSItem)
|
||||
{
|
||||
if (node == null)
|
||||
{ return 0; }
|
||||
@@ -1095,7 +1095,7 @@ namespace v2rayN.Handler.CoreConfig
|
||||
{
|
||||
var dnsServer = new DnsServer4Ray()
|
||||
{
|
||||
address = "223.5.5.5",
|
||||
address = Utils.IsNullOrEmpty(dNSItem?.domainDNSAddress) ? Global.DomainDNSAddress.FirstOrDefault() : dNSItem?.domainDNSAddress,
|
||||
domains = [node.address]
|
||||
};
|
||||
servers.AsArray().Insert(0, JsonUtils.SerializeToNode(dnsServer));
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace v2rayN.Handler
|
||||
{
|
||||
try
|
||||
{
|
||||
int index = (int)config.sysProxyType;
|
||||
int index = (int)config.systemProxyItem.sysProxyType;
|
||||
|
||||
//Load from routing setting
|
||||
var createdIcon = GetNotifyIcon4Routing(config);
|
||||
@@ -56,7 +56,7 @@ namespace v2rayN.Handler
|
||||
public System.Windows.Media.ImageSource GetAppIcon(Config config)
|
||||
{
|
||||
int index = 1;
|
||||
switch (config.sysProxyType)
|
||||
switch (config.systemProxyItem.sysProxyType)
|
||||
{
|
||||
case ESysProxyType.ForcedClear:
|
||||
index = 1;
|
||||
@@ -90,7 +90,7 @@ namespace v2rayN.Handler
|
||||
}
|
||||
|
||||
Color color = ColorTranslator.FromHtml("#3399CC");
|
||||
int index = (int)config.sysProxyType;
|
||||
int index = (int)config.systemProxyItem.sysProxyType;
|
||||
if (index > 0)
|
||||
{
|
||||
color = (new[] { Color.Red, Color.Purple, Color.DarkGreen, Color.Orange, Color.DarkSlateBlue, Color.RoyalBlue })[index - 1];
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace v2rayN.Handler
|
||||
|
||||
public static bool UpdateSysProxy(Config config, bool forceDisable)
|
||||
{
|
||||
var type = config.sysProxyType;
|
||||
var type = config.systemProxyItem.sysProxyType;
|
||||
|
||||
if (forceDisable && type != ESysProxyType.Unchanged)
|
||||
{
|
||||
@@ -29,16 +29,20 @@ namespace v2rayN.Handler
|
||||
}
|
||||
if (type == ESysProxyType.ForcedChange)
|
||||
{
|
||||
var strExceptions = $"<local>;{config.constItem.defIEProxyExceptions};{config.systemProxyExceptions}";
|
||||
var strExceptions = "";
|
||||
if (config.systemProxyItem.notProxyLocalAddress)
|
||||
{
|
||||
strExceptions = $"<local>;{config.constItem.defIEProxyExceptions};{config.systemProxyItem.systemProxyExceptions}";
|
||||
}
|
||||
|
||||
var strProxy = string.Empty;
|
||||
if (Utils.IsNullOrEmpty(config.systemProxyAdvancedProtocol))
|
||||
if (Utils.IsNullOrEmpty(config.systemProxyItem.systemProxyAdvancedProtocol))
|
||||
{
|
||||
strProxy = $"{Global.Loopback}:{port}";
|
||||
}
|
||||
else
|
||||
{
|
||||
strProxy = config.systemProxyAdvancedProtocol
|
||||
strProxy = config.systemProxyItem.systemProxyAdvancedProtocol
|
||||
.Replace("{ip}", Global.Loopback)
|
||||
.Replace("{http_port}", port.ToString())
|
||||
.Replace("{socks_port}", portSocks.ToString());
|
||||
|
||||
@@ -12,7 +12,6 @@ namespace v2rayN.Models
|
||||
|
||||
public string indexId { get; set; }
|
||||
public string subIndexId { get; set; }
|
||||
public ESysProxyType sysProxyType { get; set; }
|
||||
public string systemProxyExceptions { get; set; }
|
||||
public string systemProxyAdvancedProtocol { get; set; }
|
||||
|
||||
@@ -47,6 +46,7 @@ namespace v2rayN.Models
|
||||
public Mux4SboxItem mux4SboxItem { get; set; }
|
||||
public HysteriaItem hysteriaItem { get; set; }
|
||||
public ClashUIItem clashUIItem { get; set; }
|
||||
public SystemProxyItem systemProxyItem { get; set; }
|
||||
public List<InItem> inbound { get; set; }
|
||||
public List<KeyEventItem> globalHotkeys { get; set; }
|
||||
public List<CoreTypeItem> coreTypeItem { get; set; }
|
||||
|
||||
@@ -119,7 +119,7 @@ namespace v2rayN.Models
|
||||
public double mainHeight { get; set; }
|
||||
public double mainGirdHeight1 { get; set; }
|
||||
public double mainGirdHeight2 { get; set; }
|
||||
public EGirdOrientation mainGirdOrientation { get; set; }
|
||||
public EGirdOrientation mainGirdOrientation { get; set; } = EGirdOrientation.Vertical;
|
||||
public bool colorModeDark { get; set; }
|
||||
public bool followSystemTheme { get; set; }
|
||||
public string? colorPrimaryName { get; set; }
|
||||
@@ -227,4 +227,13 @@ namespace v2rayN.Models
|
||||
public bool connectionsAutoRefresh { get; set; }
|
||||
public int connectionsRefreshInterval { get; set; } = 2;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class SystemProxyItem
|
||||
{
|
||||
public ESysProxyType sysProxyType { get; set; }
|
||||
public string systemProxyExceptions { get; set; }
|
||||
public bool notProxyLocalAddress { get; set; } = true;
|
||||
public string systemProxyAdvancedProtocol { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -16,5 +16,6 @@ namespace v2rayN.Models
|
||||
public string? normalDNS { get; set; }
|
||||
public string? tunDNS { get; set; }
|
||||
public string? domainStrategy4Freedom { get; set; }
|
||||
public string? domainDNSAddress { get; set; }
|
||||
}
|
||||
}
|
||||
47
v2rayN/v2rayN/Resx/ResUI.Designer.cs
generated
47
v2rayN/v2rayN/Resx/ResUI.Designer.cs
generated
@@ -331,7 +331,7 @@ namespace v2rayN.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Automatic update interval(minutes) 的本地化字符串。
|
||||
/// 查找类似 Automatic update interval (minutes) 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string LvAutoUpdateInterval {
|
||||
get {
|
||||
@@ -385,7 +385,7 @@ namespace v2rayN.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Enabled Update 的本地化字符串。
|
||||
/// 查找类似 Enable update 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string LvEnabled {
|
||||
get {
|
||||
@@ -412,7 +412,7 @@ namespace v2rayN.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 More urls, separated by commas;Subscription conversion will be invalid 的本地化字符串。
|
||||
/// 查找类似 More URLs, separated by commas; Subscription conversion will be invalid 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string LvMoreUrl {
|
||||
get {
|
||||
@@ -996,6 +996,15 @@ namespace v2rayN.Resx {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Auto column width adjustment 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuProfileAutofitColumnWidth {
|
||||
get {
|
||||
return ResourceManager.GetString("menuProfileAutofitColumnWidth", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Promotion 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -1258,7 +1267,7 @@ namespace v2rayN.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Multi-Server Preferred Latency 的本地化字符串。
|
||||
/// 查找类似 Multi-Server lowest latency 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuSetDefaultMultipleServer {
|
||||
get {
|
||||
@@ -1357,7 +1366,7 @@ namespace v2rayN.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Subscription group 的本地化字符串。
|
||||
/// 查找类似 Subscription Group 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuSubscription {
|
||||
get {
|
||||
@@ -1384,7 +1393,7 @@ namespace v2rayN.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Update subscription without proxy 的本地化字符串。
|
||||
/// 查找类似 Update subscriptions without proxy 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuSubUpdate {
|
||||
get {
|
||||
@@ -1393,7 +1402,7 @@ namespace v2rayN.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Update subscription with proxy 的本地化字符串。
|
||||
/// 查找类似 Update subscriptions with proxy 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuSubUpdateViaProxy {
|
||||
get {
|
||||
@@ -1609,7 +1618,7 @@ namespace v2rayN.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Update subscription end 的本地化字符串。
|
||||
/// 查找类似 Update subscriptions end 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string MsgUpdateSubscriptionEnd {
|
||||
get {
|
||||
@@ -1618,7 +1627,7 @@ namespace v2rayN.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Update subscription starts 的本地化字符串。
|
||||
/// 查找类似 Update subscriptions start 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string MsgUpdateSubscriptionStart {
|
||||
get {
|
||||
@@ -1888,7 +1897,7 @@ namespace v2rayN.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Group please leave blank here 的本地化字符串。
|
||||
/// 查找类似 For group please leave blank here 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string SubUrlTips {
|
||||
get {
|
||||
@@ -2662,6 +2671,15 @@ namespace v2rayN.Resx {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Outbound DNS address 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string TbSettingsDomainDNSAddress {
|
||||
get {
|
||||
return ResourceManager.GetString("TbSettingsDomainDNSAddress", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Outbound Freedom domainStrategy 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -2932,6 +2950,15 @@ namespace v2rayN.Resx {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Do not use proxy servers for local (intranet) addresses 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string TbSettingsNotProxyLocalAddress {
|
||||
get {
|
||||
return ResourceManager.GetString("TbSettingsNotProxyLocalAddress", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Auth pass 的本地化字符串。
|
||||
/// </summary>
|
||||
|
||||
@@ -925,6 +925,9 @@
|
||||
<data name="TbSettingsRouteOnly" xml:space="preserve">
|
||||
<value>فقط مسیر</value>
|
||||
</data>
|
||||
<data name="TbSettingsNotProxyLocalAddress" xml:space="preserve">
|
||||
<value>يەرلىك (Intranet) ئادرېسلارغا ۋاكالەتچى مۇلازىمېتىر ئىشلەتمەڭ</value>
|
||||
</data>
|
||||
<data name="menuMixedTestServer" xml:space="preserve">
|
||||
<value>One-click test Latency and speed (Ctrl+E)</value>
|
||||
</data>
|
||||
|
||||
@@ -928,6 +928,9 @@
|
||||
<data name="TbSettingsRouteOnly" xml:space="preserve">
|
||||
<value>RouteOnly</value>
|
||||
</data>
|
||||
<data name="TbSettingsNotProxyLocalAddress" xml:space="preserve">
|
||||
<value>Do not use proxy servers for local (intranet) addresses</value>
|
||||
</data>
|
||||
<data name="menuMixedTestServer" xml:space="preserve">
|
||||
<value>One-click multi test Latency and speed (Ctrl+E)</value>
|
||||
</data>
|
||||
@@ -1247,7 +1250,7 @@
|
||||
<value>Default domain strategy for outbound</value>
|
||||
</data>
|
||||
<data name="menuSetDefaultMultipleServer" xml:space="preserve">
|
||||
<value>Multi-Server Preferred Latency</value>
|
||||
<value>Multi-Server lowest latency</value>
|
||||
</data>
|
||||
<data name="TbSettingsMainGirdOrientation" xml:space="preserve">
|
||||
<value>Main layout orientation(Require restart)</value>
|
||||
@@ -1255,4 +1258,10 @@
|
||||
<data name="menuSetDefaultLoadBalanceServer" xml:space="preserve">
|
||||
<value>Multi-server load balancing</value>
|
||||
</data>
|
||||
<data name="TbSettingsDomainDNSAddress" xml:space="preserve">
|
||||
<value>Outbound DNS address</value>
|
||||
</data>
|
||||
<data name="menuProfileAutofitColumnWidth" xml:space="preserve">
|
||||
<value>Auto column width adjustment</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -934,6 +934,9 @@
|
||||
<data name="TbSettingsRouteOnly" xml:space="preserve">
|
||||
<value>Только маршрут</value>
|
||||
</data>
|
||||
<data name="TbSettingsNotProxyLocalAddress" xml:space="preserve">
|
||||
<value>Не используйте прокси-серверы для локальных (интранет) адресов</value>
|
||||
</data>
|
||||
<data name="menuMixedTestServer" xml:space="preserve">
|
||||
<value>Тест задержки и скорости всех серверов (Ctrl+E)</value>
|
||||
</data>
|
||||
|
||||
@@ -928,6 +928,9 @@
|
||||
<data name="TbSettingsRouteOnly" xml:space="preserve">
|
||||
<value>RouteOnly</value>
|
||||
</data>
|
||||
<data name="TbSettingsNotProxyLocalAddress" xml:space="preserve">
|
||||
<value>请勿将代理服务器用于本地(Intranet)地址</value>
|
||||
</data>
|
||||
<data name="menuMixedTestServer" xml:space="preserve">
|
||||
<value>一键多线程测试延迟和速度 (Ctrl+E)</value>
|
||||
</data>
|
||||
@@ -1244,7 +1247,7 @@
|
||||
<value>Outbound默认解析策略</value>
|
||||
</data>
|
||||
<data name="menuSetDefaultMultipleServer" xml:space="preserve">
|
||||
<value>多服务器优选延迟 (多选)</value>
|
||||
<value>多服务器最低延迟 (多选)</value>
|
||||
</data>
|
||||
<data name="TbSettingsMainGirdOrientation" xml:space="preserve">
|
||||
<value>主界面布局方向(需重启)</value>
|
||||
@@ -1252,4 +1255,10 @@
|
||||
<data name="menuSetDefaultLoadBalanceServer" xml:space="preserve">
|
||||
<value>多服务器负载均衡 (多选)</value>
|
||||
</data>
|
||||
<data name="TbSettingsDomainDNSAddress" xml:space="preserve">
|
||||
<value>Outbound域名解析地址</value>
|
||||
</data>
|
||||
<data name="menuProfileAutofitColumnWidth" xml:space="preserve">
|
||||
<value>自动调整列宽</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -928,6 +928,9 @@
|
||||
<data name="TbSettingsRouteOnly" xml:space="preserve">
|
||||
<value>RouteOnly</value>
|
||||
</data>
|
||||
<data name="TbSettingsNotProxyLocalAddress" xml:space="preserve">
|
||||
<value>請勿將代理伺服器用於本機(Intranet)位址</value>
|
||||
</data>
|
||||
<data name="menuMixedTestServer" xml:space="preserve">
|
||||
<value>一鍵多執行緒測試延遲和速度 (Ctrl+E)</value>
|
||||
</data>
|
||||
@@ -1135,4 +1138,7 @@
|
||||
<data name="menuOpenTheFileLocation" xml:space="preserve">
|
||||
<value>打開儲存所在的位置</value>
|
||||
</data>
|
||||
<data name="menuProfileAutofitColumnWidth" xml:space="preserve">
|
||||
<value>自動調整列寬</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -20,9 +20,10 @@
|
||||
"rules": [
|
||||
{
|
||||
"rule_set": [
|
||||
"geosite-geolocation-!cn"
|
||||
"geosite-cn",
|
||||
"geosite-geolocation-cn"
|
||||
],
|
||||
"server": "remote"
|
||||
"server": "local"
|
||||
},
|
||||
{
|
||||
"rule_set": [
|
||||
@@ -31,5 +32,5 @@
|
||||
"server": "block"
|
||||
}
|
||||
],
|
||||
"final": "local"
|
||||
"final": "remote"
|
||||
}
|
||||
@@ -20,9 +20,10 @@
|
||||
"rules": [
|
||||
{
|
||||
"rule_set": [
|
||||
"geosite-geolocation-!cn"
|
||||
"geosite-cn",
|
||||
"geosite-geolocation-cn"
|
||||
],
|
||||
"server": "remote"
|
||||
"server": "local"
|
||||
},
|
||||
{
|
||||
"rule_set": [
|
||||
@@ -31,5 +32,5 @@
|
||||
"server": "block"
|
||||
}
|
||||
],
|
||||
"final": "local"
|
||||
"final": "remote"
|
||||
}
|
||||
@@ -18,10 +18,13 @@ namespace v2rayN.ViewModels
|
||||
|
||||
[Reactive] public bool useSystemHosts { get; set; }
|
||||
[Reactive] public string domainStrategy4Freedom { get; set; }
|
||||
[Reactive] public string domainDNSAddress { get; set; }
|
||||
[Reactive] public string normalDNS { get; set; }
|
||||
|
||||
[Reactive] public string domainStrategy4Freedom2 { get; set; }
|
||||
[Reactive] public string domainDNSAddress2 { get; set; }
|
||||
[Reactive] public string normalDNS2 { get; set; }
|
||||
[Reactive] public string tunDNS2 { get; set; }
|
||||
[Reactive] public string domainStrategy4Freedom2 { get; set; }
|
||||
|
||||
public ReactiveCommand<Unit, Unit> SaveCmd { get; }
|
||||
public ReactiveCommand<Unit, Unit> ImportDefConfig4V2rayCmd { get; }
|
||||
@@ -36,12 +39,14 @@ namespace v2rayN.ViewModels
|
||||
var item = LazyConfig.Instance.GetDNSItem(ECoreType.Xray);
|
||||
useSystemHosts = item.useSystemHosts;
|
||||
domainStrategy4Freedom = item?.domainStrategy4Freedom ?? string.Empty;
|
||||
domainDNSAddress = item?.domainDNSAddress ?? string.Empty;
|
||||
normalDNS = item?.normalDNS ?? string.Empty;
|
||||
|
||||
var item2 = LazyConfig.Instance.GetDNSItem(ECoreType.sing_box);
|
||||
domainStrategy4Freedom2 = item2?.domainStrategy4Freedom ?? string.Empty;
|
||||
domainDNSAddress2 = item2?.domainDNSAddress ?? string.Empty;
|
||||
normalDNS2 = item2?.normalDNS ?? string.Empty;
|
||||
tunDNS2 = item2?.tunDNS ?? string.Empty;
|
||||
domainStrategy4Freedom2 = item2?.domainStrategy4Freedom ?? string.Empty;
|
||||
|
||||
SaveCmd = ReactiveCommand.Create(() =>
|
||||
{
|
||||
@@ -100,14 +105,16 @@ namespace v2rayN.ViewModels
|
||||
|
||||
var item = LazyConfig.Instance.GetDNSItem(ECoreType.Xray);
|
||||
item.domainStrategy4Freedom = domainStrategy4Freedom;
|
||||
item.domainDNSAddress = domainDNSAddress;
|
||||
item.useSystemHosts = useSystemHosts;
|
||||
item.normalDNS = normalDNS;
|
||||
ConfigHandler.SaveDNSItems(_config, item);
|
||||
|
||||
var item2 = LazyConfig.Instance.GetDNSItem(ECoreType.sing_box);
|
||||
item2.normalDNS = JsonUtils.Serialize(JsonUtils.ParseJson(normalDNS2));
|
||||
item2.tunDNS = JsonUtils.Serialize(JsonUtils.ParseJson(tunDNS2));
|
||||
item2.domainStrategy4Freedom = domainStrategy4Freedom2;
|
||||
item2.domainDNSAddress = domainDNSAddress2;
|
||||
item2.normalDNS = JsonUtils.Serialize(JsonUtils.ParseJson(normalDNS2));
|
||||
item2.tunDNS = JsonUtils.Serialize(JsonUtils.ParseJson(tunDNS2));;
|
||||
ConfigHandler.SaveDNSItems(_config, item2);
|
||||
|
||||
_noticeHandler?.Enqueue(ResUI.OperationSuccess);
|
||||
|
||||
@@ -234,7 +234,7 @@ namespace v2rayN.ViewModels
|
||||
y => y != null && !y.Text.IsNullOrEmpty())
|
||||
.Subscribe(c => ServerSelectedChanged(c));
|
||||
|
||||
SystemProxySelected = (int)_config.sysProxyType;
|
||||
SystemProxySelected = (int)_config.systemProxyItem.sysProxyType;
|
||||
this.WhenAnyValue(
|
||||
x => x.SystemProxySelected,
|
||||
y => y >= 0)
|
||||
@@ -429,7 +429,7 @@ namespace v2rayN.ViewModels
|
||||
//RefreshServers();
|
||||
|
||||
Reload();
|
||||
ChangeSystemProxyStatus(_config.sysProxyType, true);
|
||||
ChangeSystemProxyStatus(_config.systemProxyItem.sysProxyType, true);
|
||||
}
|
||||
|
||||
private void OnProgramStarted(object state, bool timeout)
|
||||
@@ -936,7 +936,7 @@ namespace v2rayN.ViewModels
|
||||
|
||||
//ConfigHandler.SaveConfig(_config, false);
|
||||
|
||||
ChangeSystemProxyStatus(_config.sysProxyType, false);
|
||||
ChangeSystemProxyStatus(_config.systemProxyItem.sysProxyType, false);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -955,21 +955,21 @@ namespace v2rayN.ViewModels
|
||||
|
||||
public void SetListenerType(ESysProxyType type)
|
||||
{
|
||||
if (_config.sysProxyType == type)
|
||||
if (_config.systemProxyItem.sysProxyType == type)
|
||||
{
|
||||
return;
|
||||
}
|
||||
_config.sysProxyType = type;
|
||||
_config.systemProxyItem.sysProxyType = type;
|
||||
ChangeSystemProxyStatus(type, true);
|
||||
|
||||
SystemProxySelected = (int)_config.sysProxyType;
|
||||
SystemProxySelected = (int)_config.systemProxyItem.sysProxyType;
|
||||
ConfigHandler.SaveConfig(_config, false);
|
||||
}
|
||||
|
||||
private void ChangeSystemProxyStatus(ESysProxyType type, bool blChange)
|
||||
{
|
||||
SysProxyHandle.UpdateSysProxy(_config, _config.tunModeItem.enableTun ? true : false);
|
||||
_noticeHandler?.SendMessage($"{ResUI.TipChangeSystemProxy} - {_config.sysProxyType.ToString()}", true);
|
||||
_noticeHandler?.SendMessage($"{ResUI.TipChangeSystemProxy} - {_config.systemProxyItem.sysProxyType.ToString()}", true);
|
||||
|
||||
Application.Current?.Dispatcher.Invoke((Action)(() =>
|
||||
{
|
||||
@@ -1046,7 +1046,7 @@ namespace v2rayN.ViewModels
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (_config.sysProxyType == (ESysProxyType)SystemProxySelected)
|
||||
if (_config.systemProxyItem.sysProxyType == (ESysProxyType)SystemProxySelected)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1209,11 +1209,12 @@ namespace v2rayN.ViewModels
|
||||
y => y != null && !y.IsNullOrEmpty())
|
||||
.Subscribe(c =>
|
||||
{
|
||||
if (!Utils.IsNullOrEmpty(CurrentLanguage))
|
||||
if (!Utils.IsNullOrEmpty(CurrentLanguage) && _config.uiItem.currentLanguage != CurrentLanguage)
|
||||
{
|
||||
_config.uiItem.currentLanguage = CurrentLanguage;
|
||||
Thread.CurrentThread.CurrentUICulture = new(CurrentLanguage);
|
||||
ConfigHandler.SaveConfig(_config);
|
||||
_noticeHandler?.Enqueue(ResUI.NeedRebootTips);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -1223,7 +1224,7 @@ namespace v2rayN.ViewModels
|
||||
StringBuilder sb = new();
|
||||
sb.Append($"[{EInboundProtocol.socks}:{LazyConfig.Instance.GetLocalPort(EInboundProtocol.socks)}]");
|
||||
sb.Append(" | ");
|
||||
//if (_config.sysProxyType == ESysProxyType.ForcedChange)
|
||||
//if (_config.systemProxyItem.sysProxyType == ESysProxyType.ForcedChange)
|
||||
//{
|
||||
// sb.Append($"[{Global.InboundHttp}({ResUI.SystemProxy}):{LazyConfig.Instance.GetLocalPort(Global.InboundHttp)}]");
|
||||
//}
|
||||
@@ -1293,4 +1294,4 @@ namespace v2rayN.ViewModels
|
||||
|
||||
#endregion UI
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -80,6 +80,7 @@ namespace v2rayN.ViewModels
|
||||
|
||||
#region System proxy
|
||||
|
||||
[Reactive] public bool notProxyLocalAddress { get; set; }
|
||||
[Reactive] public string systemProxyAdvancedProtocol { get; set; }
|
||||
[Reactive] public string systemProxyExceptions { get; set; }
|
||||
|
||||
@@ -178,8 +179,9 @@ namespace v2rayN.ViewModels
|
||||
|
||||
#region System proxy
|
||||
|
||||
systemProxyAdvancedProtocol = _config.systemProxyAdvancedProtocol;
|
||||
systemProxyExceptions = _config.systemProxyExceptions;
|
||||
notProxyLocalAddress = _config.systemProxyItem.notProxyLocalAddress;
|
||||
systemProxyAdvancedProtocol = _config.systemProxyItem.systemProxyAdvancedProtocol;
|
||||
systemProxyExceptions = _config.systemProxyItem.systemProxyExceptions;
|
||||
|
||||
#endregion System proxy
|
||||
|
||||
@@ -266,7 +268,8 @@ namespace v2rayN.ViewModels
|
||||
var needReboot = (EnableStatistics != _config.guiItem.enableStatistics
|
||||
|| EnableDragDropSort != _config.uiItem.enableDragDropSort
|
||||
|| EnableHWA != _config.guiItem.enableHWA
|
||||
|| CurrentFontFamily != _config.uiItem.currentFontFamily);
|
||||
|| CurrentFontFamily != _config.uiItem.currentFontFamily
|
||||
|| MainGirdOrientation != (int)_config.uiItem.mainGirdOrientation);
|
||||
|
||||
//if (Utile.IsNullOrEmpty(Kcpmtu.ToString()) || !Utile.IsNumeric(Kcpmtu.ToString())
|
||||
// || Utile.IsNullOrEmpty(Kcptti.ToString()) || !Utile.IsNumeric(Kcptti.ToString())
|
||||
@@ -338,8 +341,9 @@ namespace v2rayN.ViewModels
|
||||
_config.uiItem.mainGirdOrientation = (EGirdOrientation)MainGirdOrientation;
|
||||
|
||||
//systemProxy
|
||||
_config.systemProxyExceptions = systemProxyExceptions;
|
||||
_config.systemProxyAdvancedProtocol = systemProxyAdvancedProtocol;
|
||||
_config.systemProxyItem.systemProxyExceptions = systemProxyExceptions;
|
||||
_config.systemProxyItem.notProxyLocalAddress = notProxyLocalAddress;
|
||||
_config.systemProxyItem.systemProxyAdvancedProtocol = systemProxyAdvancedProtocol;
|
||||
|
||||
//tun mode
|
||||
_config.tunModeItem.strictRoute = TunStrictRoute;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<reactiveui:ReactiveUserControl
|
||||
x:Class="v2rayN.Views.ClashConnectionsView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
xmlns:reactiveui="http://reactiveui.net"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:reactiveui="http://reactiveui.net"
|
||||
xmlns:resx="clr-namespace:v2rayN.Resx"
|
||||
xmlns:vms="clr-namespace:v2rayN.ViewModels"
|
||||
d:DesignHeight="450"
|
||||
@@ -40,10 +40,11 @@
|
||||
|
||||
<Button
|
||||
x:Name="btnConnectionCloseAll"
|
||||
Width="30"
|
||||
Height="30"
|
||||
Width="24"
|
||||
Height="24"
|
||||
Margin="8,0"
|
||||
Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}">
|
||||
Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}"
|
||||
ToolTip="{x:Static resx:ResUI.menuConnectionCloseAll}">
|
||||
<materialDesign:PackIcon VerticalAlignment="Center" Kind="Close" />
|
||||
</Button>
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<reactiveui:ReactiveUserControl
|
||||
x:Class="v2rayN.Views.ClashProxiesView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
xmlns:reactiveui="http://reactiveui.net"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:converters="clr-namespace:v2rayN.Converters"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:reactiveui="http://reactiveui.net"
|
||||
xmlns:resx="clr-namespace:v2rayN.Resx"
|
||||
xmlns:vms="clr-namespace:v2rayN.ViewModels"
|
||||
d:DesignHeight="450"
|
||||
@@ -58,19 +58,21 @@
|
||||
|
||||
<Button
|
||||
x:Name="menuProxiesReload"
|
||||
Width="30"
|
||||
Height="30"
|
||||
Width="24"
|
||||
Height="24"
|
||||
Margin="8,0"
|
||||
Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}">
|
||||
Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}"
|
||||
ToolTip="{x:Static resx:ResUI.menuProxiesReload}">
|
||||
<materialDesign:PackIcon VerticalAlignment="Center" Kind="Reload" />
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
x:Name="menuProxiesDelaytest"
|
||||
Width="30"
|
||||
Height="30"
|
||||
Width="24"
|
||||
Height="24"
|
||||
Margin="8,0"
|
||||
Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}">
|
||||
Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}"
|
||||
ToolTip="{x:Static resx:ResUI.menuProxiesDelaytest}">
|
||||
<materialDesign:PackIcon VerticalAlignment="Center" Kind="LightningBolt" />
|
||||
</Button>
|
||||
|
||||
|
||||
@@ -49,33 +49,6 @@
|
||||
|
||||
<TabItem Header="{x:Static resx:ResUI.TbSettingsCoreDns}">
|
||||
<DockPanel Margin="{StaticResource SettingItemMargin}">
|
||||
<StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="{StaticResource SettingItemMargin}"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TbSettingsDomainStrategy4Freedom}" />
|
||||
<ComboBox
|
||||
x:Name="cmbdomainStrategy4Freedom"
|
||||
Width="200"
|
||||
Margin="{StaticResource SettingItemMargin}"
|
||||
Style="{StaticResource DefComboBox}" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="{StaticResource SettingItemMargin}"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TbSettingsUseSystemHosts}" />
|
||||
<ToggleButton
|
||||
x:Name="togUseSystemHosts"
|
||||
Grid.Row="5"
|
||||
Grid.Column="1"
|
||||
Margin="{StaticResource SettingItemMargin}"
|
||||
HorizontalAlignment="Left" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="{StaticResource SettingItemMargin}"
|
||||
@@ -83,7 +56,7 @@
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TbSettingsRemoteDNS}" />
|
||||
<TextBlock
|
||||
Margin="8,0,0,0"
|
||||
Margin="{StaticResource SettingItemMargin}"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}">
|
||||
<Hyperlink Click="linkDnsObjectDoc_Click">
|
||||
@@ -93,12 +66,53 @@
|
||||
</TextBlock>
|
||||
<Button
|
||||
x:Name="btnImportDefConfig4V2ray"
|
||||
Margin="8,0,0,0"
|
||||
Margin="{StaticResource SettingItemMargin}"
|
||||
Content="{x:Static resx:ResUI.TbSettingDnsImportDefConfig}"
|
||||
Cursor="Hand"
|
||||
Style="{StaticResource DefButton}" />
|
||||
</StackPanel>
|
||||
|
||||
<WrapPanel DockPanel.Dock="Bottom" Orientation="Horizontal">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="{StaticResource SettingItemMargin}"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TbSettingsUseSystemHosts}" />
|
||||
<ToggleButton
|
||||
x:Name="togUseSystemHosts"
|
||||
Margin="{StaticResource SettingItemMargin}"
|
||||
HorizontalAlignment="Left" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="{StaticResource SettingItemMargin}"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TbSettingsDomainStrategy4Freedom}" />
|
||||
<ComboBox
|
||||
x:Name="cmbdomainStrategy4Freedom"
|
||||
Width="150"
|
||||
Margin="{StaticResource SettingItemMargin}"
|
||||
Style="{StaticResource DefComboBox}" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="{StaticResource SettingItemMargin}"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TbSettingsDomainDNSAddress}" />
|
||||
<ComboBox
|
||||
x:Name="cmbdomainDNSAddress"
|
||||
Width="150"
|
||||
Margin="{StaticResource SettingItemMargin}"
|
||||
IsEditable="True"
|
||||
Style="{StaticResource DefComboBox}" />
|
||||
</StackPanel>
|
||||
</WrapPanel>
|
||||
|
||||
<TextBox
|
||||
x:Name="txtnormalDNS"
|
||||
Margin="{StaticResource SettingItemMargin}"
|
||||
@@ -116,7 +130,7 @@
|
||||
<DockPanel Margin="{StaticResource SettingItemMargin}">
|
||||
<StackPanel DockPanel.Dock="Top" Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="8,0,0,0"
|
||||
Margin="{StaticResource SettingItemMargin}"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}">
|
||||
<Hyperlink Click="linkDnsSingboxObjectDoc_Click">
|
||||
@@ -126,24 +140,40 @@
|
||||
</TextBlock>
|
||||
<Button
|
||||
x:Name="btnImportDefConfig4Singbox"
|
||||
Margin="8,0,0,0"
|
||||
Margin="{StaticResource SettingItemMargin}"
|
||||
Content="{x:Static resx:ResUI.TbSettingDnsImportDefConfig}"
|
||||
Cursor="Hand"
|
||||
Style="{StaticResource DefButton}" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="{StaticResource SettingItemMargin}"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TbSettingsDomainStrategy4Out}" />
|
||||
<ComboBox
|
||||
x:Name="cmbdomainStrategy4Out"
|
||||
Width="200"
|
||||
Margin="{StaticResource SettingItemMargin}"
|
||||
Style="{StaticResource DefComboBox}" />
|
||||
</StackPanel>
|
||||
<WrapPanel DockPanel.Dock="Bottom" Orientation="Horizontal">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="{StaticResource SettingItemMargin}"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TbSettingsDomainStrategy4Out}" />
|
||||
<ComboBox
|
||||
x:Name="cmbdomainStrategy4Out"
|
||||
Width="150"
|
||||
Margin="{StaticResource SettingItemMargin}"
|
||||
Style="{StaticResource DefComboBox}" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="{StaticResource SettingItemMargin}"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TbSettingsDomainDNSAddress}" />
|
||||
<ComboBox
|
||||
x:Name="cmbdomainDNSAddress2"
|
||||
Width="150"
|
||||
Margin="{StaticResource SettingItemMargin}"
|
||||
IsEditable="True"
|
||||
Style="{StaticResource DefComboBox}" />
|
||||
</StackPanel>
|
||||
</WrapPanel>
|
||||
|
||||
<Grid Margin="{StaticResource SettingItemMargin}">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
||||
@@ -28,13 +28,24 @@ namespace v2rayN.Views
|
||||
{
|
||||
cmbdomainStrategy4Out.Items.Add(it);
|
||||
});
|
||||
Global.DomainDNSAddress.ForEach(it =>
|
||||
{
|
||||
cmbdomainDNSAddress.Items.Add(it);
|
||||
});
|
||||
Global.SingboxDomainDNSAddress.ForEach(it =>
|
||||
{
|
||||
cmbdomainDNSAddress2.Items.Add(it);
|
||||
});
|
||||
|
||||
this.WhenActivated(disposables =>
|
||||
{
|
||||
this.Bind(ViewModel, vm => vm.useSystemHosts, v => v.togUseSystemHosts.IsChecked).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.domainStrategy4Freedom, v => v.cmbdomainStrategy4Freedom.Text).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.domainDNSAddress, v => v.cmbdomainDNSAddress.Text).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.normalDNS, v => v.txtnormalDNS.Text).DisposeWith(disposables);
|
||||
|
||||
this.Bind(ViewModel, vm => vm.domainStrategy4Freedom2, v => v.cmbdomainStrategy4Out.Text).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.domainDNSAddress2, v => v.cmbdomainDNSAddress2.Text).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.normalDNS2, v => v.txtnormalDNS2.Text).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.tunDNS2, v => v.txttunDNS2.Text).DisposeWith(disposables);
|
||||
|
||||
|
||||
@@ -495,18 +495,122 @@
|
||||
<TabControl
|
||||
x:Name="tabMain1"
|
||||
Grid.Row="2"
|
||||
HorizontalContentAlignment="Left">
|
||||
<TabItem x:Name="tabMsgView1" Header="{x:Static resx:ResUI.MsgInformationTitle}" />
|
||||
<TabItem x:Name="tabClashProxies1" Header="{x:Static resx:ResUI.TbProxies}" />
|
||||
<TabItem x:Name="tabClashConnections1" Header="{x:Static resx:ResUI.TbConnections}" />
|
||||
materialDesign:NavigationRailAssist.ShowSelectionBackground="True"
|
||||
Style="{StaticResource MaterialDesignNavigationRailTabControl}"
|
||||
TabStripPlacement="Left">
|
||||
<TabItem x:Name="tabMsgView1">
|
||||
<TabItem.Header>
|
||||
<StackPanel>
|
||||
<materialDesign:PackIcon
|
||||
Width="24"
|
||||
Height="24"
|
||||
HorizontalAlignment="Center"
|
||||
Kind="MessageTextOutline" />
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.MsgInformationTitle}" />
|
||||
</StackPanel>
|
||||
</TabItem.Header>
|
||||
</TabItem>
|
||||
<TabItem x:Name="tabClashProxies1">
|
||||
<TabItem.Header>
|
||||
<StackPanel>
|
||||
<materialDesign:PackIcon
|
||||
Width="24"
|
||||
Height="24"
|
||||
HorizontalAlignment="Center"
|
||||
Kind="ArrowDecisionOutline" />
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TbProxies}" />
|
||||
</StackPanel>
|
||||
</TabItem.Header>
|
||||
</TabItem>
|
||||
<TabItem x:Name="tabClashConnections1">
|
||||
<TabItem.Header>
|
||||
<StackPanel>
|
||||
<materialDesign:PackIcon
|
||||
Width="24"
|
||||
Height="24"
|
||||
HorizontalAlignment="Center"
|
||||
Kind="LanConnect" />
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TbConnections}" />
|
||||
</StackPanel>
|
||||
</TabItem.Header>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</Grid>
|
||||
<Grid x:Name="gridMain2" Visibility="Collapsed">
|
||||
<TabControl x:Name="tabMain2" HorizontalContentAlignment="Left">
|
||||
<TabItem x:Name="tabProfiles2" Header="{x:Static resx:ResUI.menuServers}" />
|
||||
<TabItem x:Name="tabMsgView2" Header="{x:Static resx:ResUI.MsgInformationTitle}" />
|
||||
<TabItem x:Name="tabClashProxies2" Header="{x:Static resx:ResUI.TbProxies}" />
|
||||
<TabItem x:Name="tabClashConnections2" Header="{x:Static resx:ResUI.TbConnections}" />
|
||||
<TabControl
|
||||
x:Name="tabMain2"
|
||||
materialDesign:NavigationRailAssist.ShowSelectionBackground="True"
|
||||
Style="{StaticResource MaterialDesignNavigationRailTabControl}"
|
||||
TabStripPlacement="Left">
|
||||
<TabItem x:Name="tabProfiles2">
|
||||
<TabItem.Header>
|
||||
<StackPanel>
|
||||
<materialDesign:PackIcon
|
||||
Width="24"
|
||||
Height="24"
|
||||
HorizontalAlignment="Center"
|
||||
Kind="Server" />
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.menuServers}" />
|
||||
</StackPanel>
|
||||
</TabItem.Header>
|
||||
</TabItem>
|
||||
<TabItem x:Name="tabMsgView2">
|
||||
<TabItem.Header>
|
||||
<StackPanel>
|
||||
<materialDesign:PackIcon
|
||||
Width="24"
|
||||
Height="24"
|
||||
HorizontalAlignment="Center"
|
||||
Kind="MessageTextOutline" />
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.MsgInformationTitle}" />
|
||||
</StackPanel>
|
||||
</TabItem.Header>
|
||||
</TabItem>
|
||||
<TabItem x:Name="tabClashProxies2">
|
||||
<TabItem.Header>
|
||||
<StackPanel>
|
||||
<materialDesign:PackIcon
|
||||
Width="24"
|
||||
Height="24"
|
||||
HorizontalAlignment="Center"
|
||||
Kind="ArrowDecisionOutline" />
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TbProxies}" />
|
||||
</StackPanel>
|
||||
</TabItem.Header>
|
||||
</TabItem>
|
||||
<TabItem x:Name="tabClashConnections2">
|
||||
<TabItem.Header>
|
||||
<StackPanel>
|
||||
<materialDesign:PackIcon
|
||||
Width="24"
|
||||
Height="24"
|
||||
HorizontalAlignment="Center"
|
||||
Kind="LanConnect" />
|
||||
<TextBlock
|
||||
HorizontalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TbConnections}" />
|
||||
</StackPanel>
|
||||
</TabItem.Header>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</Grid>
|
||||
<materialDesign:Snackbar x:Name="MainSnackbar" MessageQueue="{materialDesign:MessageQueue}" />
|
||||
|
||||
@@ -27,20 +27,22 @@
|
||||
TextBoxBase.TextChanged="cmbMsgFilter_TextChanged" />
|
||||
<Button
|
||||
x:Name="btnCopy"
|
||||
Width="30"
|
||||
Height="30"
|
||||
Width="24"
|
||||
Height="24"
|
||||
Margin="8,0"
|
||||
Click="menuMsgViewCopyAll_Click"
|
||||
Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}">
|
||||
Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}"
|
||||
ToolTip="{x:Static resx:ResUI.menuMsgViewCopyAll}">
|
||||
<materialDesign:PackIcon VerticalAlignment="Center" Kind="ContentCopy" />
|
||||
</Button>
|
||||
<Button
|
||||
x:Name="btnClear"
|
||||
Width="30"
|
||||
Height="30"
|
||||
Width="24"
|
||||
Height="24"
|
||||
Margin="8,0"
|
||||
Click="menuMsgViewClear_Click"
|
||||
Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}">
|
||||
Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}"
|
||||
ToolTip="{x:Static resx:ResUI.menuMsgViewClear}">
|
||||
<materialDesign:PackIcon VerticalAlignment="Center" Kind="Delete" />
|
||||
</Button>
|
||||
<TextBlock
|
||||
|
||||
@@ -853,19 +853,31 @@
|
||||
<TabItem Header="{x:Static resx:ResUI.TbSettingsSystemproxy}">
|
||||
<DockPanel Margin="{StaticResource SettingItemMargin}">
|
||||
<StackPanel DockPanel.Dock="Bottom" Orientation="Vertical">
|
||||
<TextBlock
|
||||
Grid.Row="3"
|
||||
Margin="{StaticResource SettingItemMargin}"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TbSettingsAdvancedProtocol}" />
|
||||
<ComboBox
|
||||
x:Name="cmbsystemProxyAdvancedProtocol"
|
||||
Grid.Row="4"
|
||||
MinWidth="200"
|
||||
Margin="{StaticResource SettingItemMargin}"
|
||||
materialDesign:HintAssist.Hint="Protocol"
|
||||
Style="{StaticResource DefComboBox}" />
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="{StaticResource SettingItemMargin}"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TbSettingsNotProxyLocalAddress}" />
|
||||
<ToggleButton
|
||||
x:Name="tognotProxyLocalAddress"
|
||||
Margin="{StaticResource SettingItemMargin}"
|
||||
HorizontalAlignment="Left" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock
|
||||
Margin="{StaticResource SettingItemMargin}"
|
||||
VerticalAlignment="Center"
|
||||
Style="{StaticResource ToolbarTextBlock}"
|
||||
Text="{x:Static resx:ResUI.TbSettingsAdvancedProtocol}" />
|
||||
<ComboBox
|
||||
x:Name="cmbsystemProxyAdvancedProtocol"
|
||||
MinWidth="400"
|
||||
Margin="{StaticResource SettingItemMargin}"
|
||||
materialDesign:HintAssist.Hint="Protocol"
|
||||
Style="{StaticResource DefComboBox}" />
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
<TextBlock
|
||||
|
||||
@@ -150,6 +150,7 @@ namespace v2rayN.Views
|
||||
this.Bind(ViewModel, vm => vm.SubConvertUrl, v => v.cmbSubConvertUrl.Text).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.MainGirdOrientation, v => v.cmbMainGirdOrientation.SelectedIndex).DisposeWith(disposables);
|
||||
|
||||
this.Bind(ViewModel, vm => vm.notProxyLocalAddress, v => v.tognotProxyLocalAddress.IsChecked).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.systemProxyAdvancedProtocol, v => v.cmbsystemProxyAdvancedProtocol.Text).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.systemProxyExceptions, v => v.txtsystemProxyExceptions.Text).DisposeWith(disposables);
|
||||
|
||||
|
||||
@@ -39,7 +39,8 @@
|
||||
Width="30"
|
||||
Height="30"
|
||||
Margin="4,0"
|
||||
Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}">
|
||||
Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}"
|
||||
ToolTip="{x:Static resx:ResUI.menuSubEdit}">
|
||||
<materialDesign:PackIcon VerticalAlignment="Center" Kind="Edit" />
|
||||
</Button>
|
||||
<Button
|
||||
@@ -47,7 +48,8 @@
|
||||
Width="30"
|
||||
Height="30"
|
||||
Margin="4,0"
|
||||
Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}">
|
||||
Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}"
|
||||
ToolTip="{x:Static resx:ResUI.menuSubAdd}">
|
||||
<materialDesign:PackIcon VerticalAlignment="Center" Kind="Plus" />
|
||||
</Button>
|
||||
|
||||
@@ -56,7 +58,8 @@
|
||||
Width="30"
|
||||
Height="30"
|
||||
Margin="20,0"
|
||||
Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}">
|
||||
Style="{StaticResource MaterialDesignFloatingActionMiniLightButton}"
|
||||
ToolTip="{x:Static resx:ResUI.menuProfileAutofitColumnWidth}">
|
||||
<materialDesign:PackIcon VerticalAlignment="Center" Kind="ArrowSplitVertical" />
|
||||
</Button>
|
||||
<TextBox
|
||||
@@ -75,7 +78,6 @@
|
||||
BorderThickness="1"
|
||||
CanUserAddRows="False"
|
||||
CanUserResizeRows="False"
|
||||
CanUserSortColumns="False"
|
||||
EnableRowVirtualization="True"
|
||||
Focusable="True"
|
||||
GridLinesVisibility="All"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<ApplicationIcon>v2rayN.ico</ApplicationIcon>
|
||||
<Copyright>Copyright © 2017-2024 (GPLv3)</Copyright>
|
||||
<FileVersion>6.52</FileVersion>
|
||||
<FileVersion>6.54</FileVersion>
|
||||
<SupportedOSPlatformVersion>7.0</SupportedOSPlatformVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<PackageReference Include="ReactiveUI.Validation" Version="4.0.9" />
|
||||
<PackageReference Include="ReactiveUI.WPF" Version="20.1.1" />
|
||||
<PackageReference Include="Splat.NLog" Version="15.1.1" />
|
||||
<PackageReference Include="YamlDotNet" Version="15.3.0" />
|
||||
<PackageReference Include="YamlDotNet" Version="16.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user