Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1b11425acd | ||
|
|
1e67850a80 | ||
|
|
975f89456f | ||
|
|
e267b4b379 | ||
|
|
2fd21690a5 | ||
|
|
b176ad03aa | ||
|
|
152c4802d0 | ||
|
|
8adbc57f23 | ||
|
|
d263a78db8 | ||
|
|
b94a065c06 |
@@ -9,7 +9,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Google.Protobuf" Version="3.23.0" />
|
<PackageReference Include="Google.Protobuf" Version="3.23.2" />
|
||||||
<PackageReference Include="Grpc.Net.Client" Version="2.53.0" />
|
<PackageReference Include="Grpc.Net.Client" Version="2.53.0" />
|
||||||
<PackageReference Include="Grpc.Tools" Version="2.54.0">
|
<PackageReference Include="Grpc.Tools" Version="2.54.0">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
|||||||
@@ -140,7 +140,6 @@ namespace v2rayN.Handler
|
|||||||
config.guiItem = new()
|
config.guiItem = new()
|
||||||
{
|
{
|
||||||
enableStatistics = false,
|
enableStatistics = false,
|
||||||
statisticsFreshRate = 1,
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
if (config.uiItem == null)
|
if (config.uiItem == null)
|
||||||
@@ -185,11 +184,6 @@ namespace v2rayN.Handler
|
|||||||
config.speedTestItem.speedPingTestUrl = Global.SpeedPingTestUrl;
|
config.speedTestItem.speedPingTestUrl = Global.SpeedPingTestUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (config.guiItem.statisticsFreshRate is > 100 or < 1)
|
|
||||||
{
|
|
||||||
config.guiItem.statisticsFreshRate = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (config.mux4Sbox == null)
|
if (config.mux4Sbox == null)
|
||||||
{
|
{
|
||||||
config.mux4Sbox = new()
|
config.mux4Sbox = new()
|
||||||
@@ -331,7 +325,6 @@ namespace v2rayN.Handler
|
|||||||
config.guiItem = new()
|
config.guiItem = new()
|
||||||
{
|
{
|
||||||
enableStatistics = configOld.enableStatistics,
|
enableStatistics = configOld.enableStatistics,
|
||||||
statisticsFreshRate = configOld.statisticsFreshRate,
|
|
||||||
keepOlderDedupl = configOld.keepOlderDedupl,
|
keepOlderDedupl = configOld.keepOlderDedupl,
|
||||||
ignoreGeoUpdateCore = configOld.ignoreGeoUpdateCore,
|
ignoreGeoUpdateCore = configOld.ignoreGeoUpdateCore,
|
||||||
autoUpdateInterval = configOld.autoUpdateInterval,
|
autoUpdateInterval = configOld.autoUpdateInterval,
|
||||||
@@ -1034,7 +1027,7 @@ namespace v2rayN.Handler
|
|||||||
addStatus = AddVlessServer(ref config, profileItem, false);
|
addStatus = AddVlessServer(ref config, profileItem, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (addStatus == 0 && profileItem.port > 0)
|
if (addStatus == 0)
|
||||||
{
|
{
|
||||||
countServers++;
|
countServers++;
|
||||||
lstAdd.Add(profileItem);
|
lstAdd.Add(profileItem);
|
||||||
|
|||||||
@@ -107,29 +107,18 @@ namespace v2rayN.Handler
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (_config.tunModeItem.enableTun)
|
singboxConfig.inbounds.Clear();
|
||||||
|
|
||||||
|
if (!_config.tunModeItem.enableTun || (_config.tunModeItem.enableTun && _config.tunModeItem.enableExInbound))
|
||||||
{
|
{
|
||||||
singboxConfig.inbounds.Clear();
|
var inbound = new Inbound4Sbox()
|
||||||
|
|
||||||
if (_config.tunModeItem.mtu <= 0)
|
|
||||||
{
|
{
|
||||||
_config.tunModeItem.mtu = Convert.ToInt32(Global.TunMtus[0]);
|
type = Global.InboundSocks,
|
||||||
}
|
tag = Global.InboundSocks,
|
||||||
if (Utils.IsNullOrEmpty(_config.tunModeItem.stack))
|
listen = Global.Loopback,
|
||||||
{
|
};
|
||||||
_config.tunModeItem.stack = Global.TunStacks[0];
|
singboxConfig.inbounds.Add(inbound);
|
||||||
}
|
|
||||||
|
|
||||||
var tunInbound = Utils.FromJson<Inbound4Sbox>(Utils.GetEmbedText(Global.TunSingboxInboundFileName));
|
|
||||||
tunInbound.mtu = _config.tunModeItem.mtu;
|
|
||||||
tunInbound.strict_route = _config.tunModeItem.strictRoute;
|
|
||||||
tunInbound.stack = _config.tunModeItem.stack;
|
|
||||||
|
|
||||||
singboxConfig.inbounds.Add(tunInbound);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var inbound = singboxConfig.inbounds[0];
|
|
||||||
inbound.listen_port = LazyConfig.Instance.GetLocalPort(Global.InboundSocks);
|
inbound.listen_port = LazyConfig.Instance.GetLocalPort(Global.InboundSocks);
|
||||||
inbound.sniff = _config.inbound[0].sniffingEnabled;
|
inbound.sniff = _config.inbound[0].sniffingEnabled;
|
||||||
inbound.sniff_override_destination = _config.inbound[0].routeOnly ? false : _config.inbound[0].sniffingEnabled;
|
inbound.sniff_override_destination = _config.inbound[0].routeOnly ? false : _config.inbound[0].sniffingEnabled;
|
||||||
@@ -174,6 +163,25 @@ namespace v2rayN.Handler
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_config.tunModeItem.enableTun)
|
||||||
|
{
|
||||||
|
if (_config.tunModeItem.mtu <= 0)
|
||||||
|
{
|
||||||
|
_config.tunModeItem.mtu = Convert.ToInt32(Global.TunMtus[0]);
|
||||||
|
}
|
||||||
|
if (Utils.IsNullOrEmpty(_config.tunModeItem.stack))
|
||||||
|
{
|
||||||
|
_config.tunModeItem.stack = Global.TunStacks[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
var tunInbound = Utils.FromJson<Inbound4Sbox>(Utils.GetEmbedText(Global.TunSingboxInboundFileName));
|
||||||
|
tunInbound.mtu = _config.tunModeItem.mtu;
|
||||||
|
tunInbound.strict_route = _config.tunModeItem.strictRoute;
|
||||||
|
tunInbound.stack = _config.tunModeItem.stack;
|
||||||
|
|
||||||
|
singboxConfig.inbounds.Add(tunInbound);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@@ -255,7 +263,6 @@ namespace v2rayN.Handler
|
|||||||
outbound.type = Global.vlessProtocolLite;
|
outbound.type = Global.vlessProtocolLite;
|
||||||
|
|
||||||
outbound.uuid = node.id;
|
outbound.uuid = node.id;
|
||||||
outbound.flow = node.flow;
|
|
||||||
|
|
||||||
outbound.packet_encoding = "xudp";
|
outbound.packet_encoding = "xudp";
|
||||||
|
|
||||||
@@ -263,6 +270,10 @@ namespace v2rayN.Handler
|
|||||||
{
|
{
|
||||||
outboundMux(node, outbound);
|
outboundMux(node, outbound);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
outbound.flow = node.flow;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (node.configType == EConfigType.Trojan)
|
else if (node.configType == EConfigType.Trojan)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -423,7 +423,6 @@ namespace v2rayN.Handler
|
|||||||
usersItem = vnextItem.users[0];
|
usersItem = vnextItem.users[0];
|
||||||
}
|
}
|
||||||
usersItem.id = node.id;
|
usersItem.id = node.id;
|
||||||
usersItem.flow = string.Empty;
|
|
||||||
usersItem.email = Global.userEMail;
|
usersItem.email = Global.userEMail;
|
||||||
usersItem.encryption = node.security;
|
usersItem.encryption = node.security;
|
||||||
|
|
||||||
@@ -462,7 +461,6 @@ namespace v2rayN.Handler
|
|||||||
serversItem.address = node.address;
|
serversItem.address = node.address;
|
||||||
serversItem.port = node.port;
|
serversItem.port = node.port;
|
||||||
serversItem.password = node.id;
|
serversItem.password = node.id;
|
||||||
serversItem.flow = string.Empty;
|
|
||||||
|
|
||||||
serversItem.ota = false;
|
serversItem.ota = false;
|
||||||
serversItem.level = 1;
|
serversItem.level = 1;
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ namespace v2rayN.Handler
|
|||||||
webSocket.Abort();
|
webSocket.Abort();
|
||||||
webSocket = null;
|
webSocket = null;
|
||||||
Init();
|
Init();
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (webSocket.State != WebSocketState.Open)
|
if (webSocket.State != WebSocketState.Open)
|
||||||
|
|||||||
@@ -61,8 +61,7 @@ namespace v2rayN.Handler
|
|||||||
_updateFunc(server);
|
_updateFunc(server);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var sleep = _config.guiItem.statisticsFreshRate < 1 ? 1 : _config.guiItem.statisticsFreshRate;
|
await Task.Delay(1000);
|
||||||
await Task.Delay(1000 * sleep);
|
|
||||||
await _channel.ConnectAsync();
|
await _channel.ConnectAsync();
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ namespace v2rayN.Handler
|
|||||||
_updateFunc = update;
|
_updateFunc = update;
|
||||||
|
|
||||||
_updateFunc(false, ResUI.MsgUpdateSubscriptionStart);
|
_updateFunc(false, ResUI.MsgUpdateSubscriptionStart);
|
||||||
var subItem = LazyConfig.Instance.SubItems();
|
var subItem = LazyConfig.Instance.SubItems().OrderBy(t => t.sort).ToList();
|
||||||
|
|
||||||
if (subItem == null || subItem.Count <= 0)
|
if (subItem == null || subItem.Count <= 0)
|
||||||
{
|
{
|
||||||
@@ -175,6 +175,10 @@ namespace v2rayN.Handler
|
|||||||
//_updateFunc(false, $"{hashCode}{ResUI.MsgNoValidSubscription}");
|
//_updateFunc(false, $"{hashCode}{ResUI.MsgNoValidSubscription}");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (!url.StartsWith(Global.httpsProtocol) && !url.StartsWith(Global.httpProtocol))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if (item.enabled == false)
|
if (item.enabled == false)
|
||||||
{
|
{
|
||||||
_updateFunc(false, $"{hashCode}{ResUI.MsgSkipSubscriptionUpdate}");
|
_updateFunc(false, $"{hashCode}{ResUI.MsgSkipSubscriptionUpdate}");
|
||||||
|
|||||||
@@ -88,8 +88,6 @@ namespace v2rayN.Mode
|
|||||||
|
|
||||||
public bool enableStatistics { get; set; }
|
public bool enableStatistics { get; set; }
|
||||||
|
|
||||||
public int statisticsFreshRate { get; set; }
|
|
||||||
|
|
||||||
public bool keepOlderDedupl { get; set; }
|
public bool keepOlderDedupl { get; set; }
|
||||||
|
|
||||||
public bool ignoreGeoUpdateCore { get; set; } = true;
|
public bool ignoreGeoUpdateCore { get; set; } = true;
|
||||||
@@ -165,6 +163,7 @@ namespace v2rayN.Mode
|
|||||||
public bool strictRoute { get; set; }
|
public bool strictRoute { get; set; }
|
||||||
public string stack { get; set; }
|
public string stack { get; set; }
|
||||||
public int mtu { get; set; }
|
public int mtu { get; set; }
|
||||||
|
public bool enableExInbound { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ namespace v2rayN.Mode
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// VLESS
|
/// VLESS
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string flow { get; set; }
|
public string? flow { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class Sniffing4Ray
|
public class Sniffing4Ray
|
||||||
|
|||||||
9
v2rayN/v2rayN/Resx/ResUI.Designer.cs
generated
9
v2rayN/v2rayN/Resx/ResUI.Designer.cs
generated
@@ -2752,15 +2752,6 @@ namespace v2rayN.Resx {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 查找类似 Statistics freshrate (second) 的本地化字符串。
|
|
||||||
/// </summary>
|
|
||||||
public static string TbSettingsStatisticsFreshRate {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("TbSettingsStatisticsFreshRate", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Subscription conversion Url 的本地化字符串。
|
/// 查找类似 Subscription conversion Url 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -793,9 +793,6 @@
|
|||||||
<data name="TbSettingsStatistics" xml:space="preserve">
|
<data name="TbSettingsStatistics" xml:space="preserve">
|
||||||
<value>فعال کردن آمار (نیاز به راه اندازی مجدد)</value>
|
<value>فعال کردن آمار (نیاز به راه اندازی مجدد)</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsStatisticsFreshRate" xml:space="preserve">
|
|
||||||
<value>نرخ تازه سازی آمار (ثانیه)</value>
|
|
||||||
</data>
|
|
||||||
<data name="TbSettingsSubConvert" xml:space="preserve">
|
<data name="TbSettingsSubConvert" xml:space="preserve">
|
||||||
<value>Subscription conversion Url</value>
|
<value>Subscription conversion Url</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -796,9 +796,6 @@
|
|||||||
<data name="TbSettingsStatistics" xml:space="preserve">
|
<data name="TbSettingsStatistics" xml:space="preserve">
|
||||||
<value>Enable Statistics (Require restart)</value>
|
<value>Enable Statistics (Require restart)</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsStatisticsFreshRate" xml:space="preserve">
|
|
||||||
<value>Statistics freshrate (second)</value>
|
|
||||||
</data>
|
|
||||||
<data name="TbSettingsSubConvert" xml:space="preserve">
|
<data name="TbSettingsSubConvert" xml:space="preserve">
|
||||||
<value>Subscription conversion Url</value>
|
<value>Subscription conversion Url</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -796,9 +796,6 @@
|
|||||||
<data name="TbSettingsStatistics" xml:space="preserve">
|
<data name="TbSettingsStatistics" xml:space="preserve">
|
||||||
<value>Включить статистику (требуется перезагрузка)</value>
|
<value>Включить статистику (требуется перезагрузка)</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsStatisticsFreshRate" xml:space="preserve">
|
|
||||||
<value>Частота обновления статистики в секундах</value>
|
|
||||||
</data>
|
|
||||||
<data name="TbSettingsSubConvert" xml:space="preserve">
|
<data name="TbSettingsSubConvert" xml:space="preserve">
|
||||||
<value>URL-адрес конверсии подписки</value>
|
<value>URL-адрес конверсии подписки</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -796,9 +796,6 @@
|
|||||||
<data name="TbSettingsStatistics" xml:space="preserve">
|
<data name="TbSettingsStatistics" xml:space="preserve">
|
||||||
<value>启用统计(实时网速显示,需重启)</value>
|
<value>启用统计(实时网速显示,需重启)</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsStatisticsFreshRate" xml:space="preserve">
|
|
||||||
<value>统计刷新频率(单位秒)</value>
|
|
||||||
</data>
|
|
||||||
<data name="TbSettingsSubConvert" xml:space="preserve">
|
<data name="TbSettingsSubConvert" xml:space="preserve">
|
||||||
<value>订阅转换网址(可选)</value>
|
<value>订阅转换网址(可选)</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
{
|
{
|
||||||
"type":"tun",
|
"type": "tun",
|
||||||
"tag":"tun-in",
|
"tag": "tun-in",
|
||||||
"interface_name":"singbox_tun",
|
"interface_name": "singbox_tun",
|
||||||
"inet4_address":"172.19.0.1/30",
|
"inet4_address": "172.19.0.1/30",
|
||||||
"mtu":9000,
|
"inet6_address": "fdfe:dcba:9876::1/126",
|
||||||
"auto_route":true,
|
"mtu": 9000,
|
||||||
"strict_route":false,
|
"auto_route": true,
|
||||||
"stack":"system",
|
"strict_route": false,
|
||||||
"sniff":true
|
"stack": "system",
|
||||||
|
"sniff": true
|
||||||
}
|
}
|
||||||
@@ -167,8 +167,8 @@ namespace v2rayN.ViewModels
|
|||||||
[Reactive]
|
[Reactive]
|
||||||
public ImageSource AppIcon { get; set; }
|
public ImageSource AppIcon { get; set; }
|
||||||
|
|
||||||
[Reactive]
|
//[Reactive]
|
||||||
public bool BlShowTrayTip { get; set; }
|
//public bool BlShowTrayTip { get; set; }
|
||||||
|
|
||||||
#endregion Menu
|
#endregion Menu
|
||||||
|
|
||||||
@@ -210,8 +210,8 @@ namespace v2rayN.ViewModels
|
|||||||
[Reactive]
|
[Reactive]
|
||||||
public string RunningServerDisplay { get; set; }
|
public string RunningServerDisplay { get; set; }
|
||||||
|
|
||||||
[Reactive]
|
//[Reactive]
|
||||||
public string RunningServerToolTipText { get; set; }
|
//public string RunningServerToolTipText { get; set; }
|
||||||
|
|
||||||
[Reactive]
|
[Reactive]
|
||||||
public string RunningInfoDisplay { get; set; }
|
public string RunningInfoDisplay { get; set; }
|
||||||
@@ -849,12 +849,12 @@ namespace v2rayN.ViewModels
|
|||||||
{
|
{
|
||||||
var runningSummary = running.GetSummary();
|
var runningSummary = running.GetSummary();
|
||||||
RunningServerDisplay = $"{ResUI.menuServers}:{runningSummary}";
|
RunningServerDisplay = $"{ResUI.menuServers}:{runningSummary}";
|
||||||
RunningServerToolTipText = runningSummary;
|
//RunningServerToolTipText = runningSummary;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
RunningServerDisplay =
|
RunningServerDisplay = ResUI.CheckServerSettings;
|
||||||
RunningServerToolTipText = ResUI.CheckServerSettings;
|
//RunningServerToolTipText = ResUI.CheckServerSettings;
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
@@ -1686,7 +1686,7 @@ namespace v2rayN.ViewModels
|
|||||||
}
|
}
|
||||||
CurrentFontSize = _config.uiItem.currentFontSize;
|
CurrentFontSize = _config.uiItem.currentFontSize;
|
||||||
CurrentLanguage = _config.uiItem.currentLanguage;
|
CurrentLanguage = _config.uiItem.currentLanguage;
|
||||||
BlShowTrayTip = _config.uiItem.showTrayTip;
|
//BlShowTrayTip = _config.uiItem.showTrayTip;
|
||||||
|
|
||||||
this.WhenAnyValue(
|
this.WhenAnyValue(
|
||||||
x => x.ColorModeDark,
|
x => x.ColorModeDark,
|
||||||
|
|||||||
@@ -51,7 +51,6 @@ namespace v2rayN.ViewModels
|
|||||||
|
|
||||||
[Reactive] public bool AutoRun { get; set; }
|
[Reactive] public bool AutoRun { get; set; }
|
||||||
[Reactive] public bool EnableStatistics { get; set; }
|
[Reactive] public bool EnableStatistics { get; set; }
|
||||||
[Reactive] public int StatisticsFreshRate { get; set; }
|
|
||||||
[Reactive] public bool KeepOlderDedupl { get; set; }
|
[Reactive] public bool KeepOlderDedupl { get; set; }
|
||||||
[Reactive] public bool IgnoreGeoUpdateCore { get; set; }
|
[Reactive] public bool IgnoreGeoUpdateCore { get; set; }
|
||||||
[Reactive] public bool EnableAutoAdjustMainLvColWidth { get; set; }
|
[Reactive] public bool EnableAutoAdjustMainLvColWidth { get; set; }
|
||||||
@@ -141,7 +140,6 @@ namespace v2rayN.ViewModels
|
|||||||
|
|
||||||
AutoRun = _config.guiItem.autoRun;
|
AutoRun = _config.guiItem.autoRun;
|
||||||
EnableStatistics = _config.guiItem.enableStatistics;
|
EnableStatistics = _config.guiItem.enableStatistics;
|
||||||
StatisticsFreshRate = _config.guiItem.statisticsFreshRate;
|
|
||||||
KeepOlderDedupl = _config.guiItem.keepOlderDedupl;
|
KeepOlderDedupl = _config.guiItem.keepOlderDedupl;
|
||||||
IgnoreGeoUpdateCore = _config.guiItem.ignoreGeoUpdateCore;
|
IgnoreGeoUpdateCore = _config.guiItem.ignoreGeoUpdateCore;
|
||||||
EnableAutoAdjustMainLvColWidth = _config.uiItem.enableAutoAdjustMainLvColWidth;
|
EnableAutoAdjustMainLvColWidth = _config.uiItem.enableAutoAdjustMainLvColWidth;
|
||||||
@@ -291,11 +289,6 @@ namespace v2rayN.ViewModels
|
|||||||
Utils.SetAutoRun(AutoRun);
|
Utils.SetAutoRun(AutoRun);
|
||||||
_config.guiItem.autoRun = AutoRun;
|
_config.guiItem.autoRun = AutoRun;
|
||||||
_config.guiItem.enableStatistics = EnableStatistics;
|
_config.guiItem.enableStatistics = EnableStatistics;
|
||||||
_config.guiItem.statisticsFreshRate = StatisticsFreshRate;
|
|
||||||
if (_config.guiItem.statisticsFreshRate > 100 || _config.guiItem.statisticsFreshRate < 1)
|
|
||||||
{
|
|
||||||
_config.guiItem.statisticsFreshRate = 1;
|
|
||||||
}
|
|
||||||
_config.guiItem.keepOlderDedupl = KeepOlderDedupl;
|
_config.guiItem.keepOlderDedupl = KeepOlderDedupl;
|
||||||
_config.guiItem.ignoreGeoUpdateCore = IgnoreGeoUpdateCore;
|
_config.guiItem.ignoreGeoUpdateCore = IgnoreGeoUpdateCore;
|
||||||
_config.uiItem.enableAutoAdjustMainLvColWidth = EnableAutoAdjustMainLvColWidth;
|
_config.uiItem.enableAutoAdjustMainLvColWidth = EnableAutoAdjustMainLvColWidth;
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ namespace v2rayN.ViewModels
|
|||||||
private void SaveSub()
|
private void SaveSub()
|
||||||
{
|
{
|
||||||
string remarks = SelectedSource.remarks;
|
string remarks = SelectedSource.remarks;
|
||||||
if (Utils.IsNullOrEmpty(remarks))
|
if (string.IsNullOrEmpty(remarks))
|
||||||
{
|
{
|
||||||
UI.Show(ResUI.PleaseFillRemarks);
|
UI.Show(ResUI.PleaseFillRemarks);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -301,7 +301,7 @@
|
|||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
@@ -323,13 +323,13 @@
|
|||||||
Margin="8"
|
Margin="8"
|
||||||
IsEnabled="{Binding ElementName=followSystemTheme, Path=IsChecked, Converter={StaticResource InverseBooleanConverter}}" />
|
IsEnabled="{Binding ElementName=followSystemTheme, Path=IsChecked, Converter={StaticResource InverseBooleanConverter}}" />
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Style="{StaticResource ToolbarTextBlock}"
|
Style="{StaticResource ToolbarTextBlock}"
|
||||||
Text="{x:Static resx:ResUI.TbSettingsFollowSystemTheme}" />
|
Text="{x:Static resx:ResUI.TbSettingsFollowSystemTheme}" />
|
||||||
<ToggleButton
|
<ToggleButton
|
||||||
x:Name="followSystemTheme"
|
x:Name="followSystemTheme"
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
@@ -856,23 +856,6 @@
|
|||||||
Header="{x:Static resx:ResUI.menuExit}" />
|
Header="{x:Static resx:ResUI.menuExit}" />
|
||||||
</ContextMenu>
|
</ContextMenu>
|
||||||
</tb:TaskbarIcon.ContextMenu>
|
</tb:TaskbarIcon.ContextMenu>
|
||||||
<tb:TaskbarIcon.TrayToolTip>
|
|
||||||
<Border
|
|
||||||
x:Name="borTrayToolTip"
|
|
||||||
Width="Auto"
|
|
||||||
Height="Auto"
|
|
||||||
Background="{DynamicResource MaterialDesignLightBackground}"
|
|
||||||
BorderBrush="{DynamicResource MaterialDesignDarkBackground}"
|
|
||||||
BorderThickness="0"
|
|
||||||
CornerRadius="4">
|
|
||||||
<TextBlock
|
|
||||||
Margin="8"
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Foreground="{DynamicResource MaterialDesignDarkBackground}"
|
|
||||||
Text="{Binding Mode=OneWay, Path=ToolTipText}" />
|
|
||||||
</Border>
|
|
||||||
</tb:TaskbarIcon.TrayToolTip>
|
|
||||||
</tb:TaskbarIcon>
|
</tb:TaskbarIcon>
|
||||||
<materialDesign:Snackbar x:Name="MainSnackbar" MessageQueue="{materialDesign:MessageQueue}" />
|
<materialDesign:Snackbar x:Name="MainSnackbar" MessageQueue="{materialDesign:MessageQueue}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -163,10 +163,10 @@ namespace v2rayN.Views
|
|||||||
this.BindCommand(ViewModel, vm => vm.SubUpdateViaProxyCmd, v => v.menuSubUpdateViaProxy2).DisposeWith(disposables);
|
this.BindCommand(ViewModel, vm => vm.SubUpdateViaProxyCmd, v => v.menuSubUpdateViaProxy2).DisposeWith(disposables);
|
||||||
|
|
||||||
this.OneWayBind(ViewModel, vm => vm.NotifyIcon, v => v.tbNotify.Icon).DisposeWith(disposables);
|
this.OneWayBind(ViewModel, vm => vm.NotifyIcon, v => v.tbNotify.Icon).DisposeWith(disposables);
|
||||||
this.OneWayBind(ViewModel, vm => vm.RunningServerToolTipText, v => v.tbNotify.ToolTipText).DisposeWith(disposables);
|
//this.OneWayBind(ViewModel, vm => vm.RunningServerToolTipText, v => v.tbNotify.ToolTipText).DisposeWith(disposables);
|
||||||
this.OneWayBind(ViewModel, vm => vm.NotifyLeftClickCmd, v => v.tbNotify.LeftClickCommand).DisposeWith(disposables);
|
this.OneWayBind(ViewModel, vm => vm.NotifyLeftClickCmd, v => v.tbNotify.LeftClickCommand).DisposeWith(disposables);
|
||||||
this.OneWayBind(ViewModel, vm => vm.AppIcon, v => v.Icon).DisposeWith(disposables);
|
this.OneWayBind(ViewModel, vm => vm.AppIcon, v => v.Icon).DisposeWith(disposables);
|
||||||
this.OneWayBind(ViewModel, vm => vm.BlShowTrayTip, v => v.borTrayToolTip.Visibility).DisposeWith(disposables);
|
//this.OneWayBind(ViewModel, vm => vm.BlShowTrayTip, v => v.borTrayToolTip.Visibility).DisposeWith(disposables);
|
||||||
|
|
||||||
//status bar
|
//status bar
|
||||||
this.OneWayBind(ViewModel, vm => vm.InboundDisplay, v => v.txtInboundDisplay.Text).DisposeWith(disposables);
|
this.OneWayBind(ViewModel, vm => vm.InboundDisplay, v => v.txtInboundDisplay.Text).DisposeWith(disposables);
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
<reactiveui:ReactiveWindow
|
<reactiveui:ReactiveWindow
|
||||||
x:Class="v2rayN.Views.OptionSettingWindow"
|
x:Class="v2rayN.Views.OptionSettingWindow"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:conv="clr-namespace:v2rayN.Converters"
|
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
||||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
||||||
xmlns:reactiveui="http://reactiveui.net"
|
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:conv="clr-namespace:v2rayN.Converters"
|
||||||
xmlns:resx="clr-namespace:v2rayN.Resx"
|
xmlns:resx="clr-namespace:v2rayN.Resx"
|
||||||
xmlns:vms="clr-namespace:v2rayN.ViewModels"
|
xmlns:vms="clr-namespace:v2rayN.ViewModels"
|
||||||
Title="{x:Static resx:ResUI.menuSetting}"
|
Title="{x:Static resx:ResUI.menuSetting}"
|
||||||
@@ -498,21 +498,6 @@
|
|||||||
Margin="{StaticResource SettingItemMargin}"
|
Margin="{StaticResource SettingItemMargin}"
|
||||||
HorizontalAlignment="Left" />
|
HorizontalAlignment="Left" />
|
||||||
|
|
||||||
<TextBlock
|
|
||||||
Grid.Row="3"
|
|
||||||
Grid.Column="0"
|
|
||||||
Margin="{StaticResource SettingItemMargin}"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Style="{StaticResource ToolbarTextBlock}"
|
|
||||||
Text="{x:Static resx:ResUI.TbSettingsStatisticsFreshRate}" />
|
|
||||||
<ComboBox
|
|
||||||
x:Name="cmbStatisticsFreshRate"
|
|
||||||
Grid.Row="3"
|
|
||||||
Grid.Column="1"
|
|
||||||
Width="200"
|
|
||||||
Margin="{StaticResource SettingItemMargin}"
|
|
||||||
Style="{StaticResource DefComboBox}" />
|
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="4"
|
Grid.Row="4"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
|
|||||||
@@ -44,10 +44,6 @@ namespace v2rayN.Views
|
|||||||
cmbmux4SboxProtocol.Items.Add(it);
|
cmbmux4SboxProtocol.Items.Add(it);
|
||||||
});
|
});
|
||||||
|
|
||||||
for (int i = 1; i <= 10; i++)
|
|
||||||
{
|
|
||||||
cmbStatisticsFreshRate.Items.Add(i);
|
|
||||||
}
|
|
||||||
Global.TunMtus.ForEach(it =>
|
Global.TunMtus.ForEach(it =>
|
||||||
{
|
{
|
||||||
cmbMtu.Items.Add(it);
|
cmbMtu.Items.Add(it);
|
||||||
@@ -150,7 +146,6 @@ namespace v2rayN.Views
|
|||||||
|
|
||||||
this.Bind(ViewModel, vm => vm.AutoRun, v => v.togAutoRun.IsChecked).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.AutoRun, v => v.togAutoRun.IsChecked).DisposeWith(disposables);
|
||||||
this.Bind(ViewModel, vm => vm.EnableStatistics, v => v.togEnableStatistics.IsChecked).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.EnableStatistics, v => v.togEnableStatistics.IsChecked).DisposeWith(disposables);
|
||||||
this.Bind(ViewModel, vm => vm.StatisticsFreshRate, v => v.cmbStatisticsFreshRate.Text).DisposeWith(disposables);
|
|
||||||
this.Bind(ViewModel, vm => vm.KeepOlderDedupl, v => v.togKeepOlderDedupl.IsChecked).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.KeepOlderDedupl, v => v.togKeepOlderDedupl.IsChecked).DisposeWith(disposables);
|
||||||
this.Bind(ViewModel, vm => vm.IgnoreGeoUpdateCore, v => v.togIgnoreGeoUpdateCore.IsChecked).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.IgnoreGeoUpdateCore, v => v.togIgnoreGeoUpdateCore.IsChecked).DisposeWith(disposables);
|
||||||
this.Bind(ViewModel, vm => vm.EnableAutoAdjustMainLvColWidth, v => v.togEnableAutoAdjustMainLvColWidth.IsChecked).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.EnableAutoAdjustMainLvColWidth, v => v.togEnableAutoAdjustMainLvColWidth.IsChecked).DisposeWith(disposables);
|
||||||
|
|||||||
@@ -10,11 +10,11 @@
|
|||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<ApplicationIcon>v2rayN.ico</ApplicationIcon>
|
<ApplicationIcon>v2rayN.ico</ApplicationIcon>
|
||||||
<Copyright>Copyright © 2017-2023 (GPLv3)</Copyright>
|
<Copyright>Copyright © 2017-2023 (GPLv3)</Copyright>
|
||||||
<FileVersion>6.25</FileVersion>
|
<FileVersion>6.26</FileVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Downloader" Version="3.0.4" />
|
<PackageReference Include="Downloader" Version="3.0.5" />
|
||||||
<PackageReference Include="MaterialDesignThemes" Version="4.9.0" />
|
<PackageReference Include="MaterialDesignThemes" Version="4.9.0" />
|
||||||
<PackageReference Include="H.NotifyIcon.Wpf" Version="2.0.108" />
|
<PackageReference Include="H.NotifyIcon.Wpf" Version="2.0.108" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
<PackageReference Include="ReactiveUI.Fody" Version="18.4.1" />
|
<PackageReference Include="ReactiveUI.Fody" Version="18.4.1" />
|
||||||
<PackageReference Include="ReactiveUI.Validation" Version="3.0.22" />
|
<PackageReference Include="ReactiveUI.Validation" Version="3.0.22" />
|
||||||
<PackageReference Include="ReactiveUI.WPF" Version="18.4.1" />
|
<PackageReference Include="ReactiveUI.WPF" Version="18.4.1" />
|
||||||
<PackageReference Include="Splat.NLog" Version="14.6.8" />
|
<PackageReference Include="Splat.NLog" Version="14.6.37" />
|
||||||
<PackageReference Include="System.Reactive" Version="5.0.0" />
|
<PackageReference Include="System.Reactive" Version="5.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user