mirror of https://github.com/2dust/v2rayN
Tun mode can be auto turned on at startup
parent
373d89874c
commit
3575e69b43
|
@ -143,8 +143,6 @@
|
|||
|
||||
public int trayMenuServersLimit { get; set; } = 20;
|
||||
|
||||
public bool autoHideStartup { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region other entities
|
||||
|
|
|
@ -65,6 +65,7 @@ namespace v2rayN.Mode
|
|||
public string currentFontFamily { get; set; }
|
||||
public bool enableDragDropSort { get; set; }
|
||||
public bool doubleClick2Activate { get; set; }
|
||||
public bool autoHideStartup { get; set; } = true;
|
||||
public Dictionary<string, int> mainLvColWidth { get; set; }
|
||||
}
|
||||
|
||||
|
|
|
@ -212,6 +212,10 @@ namespace v2rayN.ViewModels
|
|||
SelectedMoveToGroup = new();
|
||||
SelectedRouting = new();
|
||||
SelectedServer = new();
|
||||
if (_config.tunModeItem.enableTun && Utils.IsAdministrator())
|
||||
{
|
||||
EnableTun = true;
|
||||
}
|
||||
|
||||
//RefreshServers();
|
||||
InitSubscriptionView();
|
||||
|
@ -255,7 +259,7 @@ namespace v2rayN.ViewModels
|
|||
x => x.EnableTun,
|
||||
y => y == true)
|
||||
.Subscribe(c => DoEnableTun(c));
|
||||
|
||||
|
||||
BindingUI();
|
||||
RestoreUI();
|
||||
AutoHideStartup();
|
||||
|
@ -1679,7 +1683,7 @@ namespace v2rayN.ViewModels
|
|||
|
||||
private void AutoHideStartup()
|
||||
{
|
||||
if (_config.autoHideStartup)
|
||||
if (_config.uiItem.autoHideStartup)
|
||||
{
|
||||
Observable.Range(1, 1)
|
||||
.Delay(TimeSpan.FromSeconds(1))
|
||||
|
|
|
@ -141,7 +141,7 @@ namespace v2rayN.ViewModels
|
|||
IgnoreGeoUpdateCore = _config.ignoreGeoUpdateCore;
|
||||
EnableAutoAdjustMainLvColWidth = _config.uiItem.enableAutoAdjustMainLvColWidth;
|
||||
EnableSecurityProtocolTls13 = _config.enableSecurityProtocolTls13;
|
||||
AutoHideStartup = _config.autoHideStartup;
|
||||
AutoHideStartup = _config.uiItem.autoHideStartup;
|
||||
EnableCheckPreReleaseUpdate = _config.checkPreReleaseUpdate;
|
||||
EnableDragDropSort = _config.uiItem.enableDragDropSort;
|
||||
DoubleClick2Activate = _config.uiItem.doubleClick2Activate;
|
||||
|
@ -309,7 +309,7 @@ namespace v2rayN.ViewModels
|
|||
_config.ignoreGeoUpdateCore = IgnoreGeoUpdateCore;
|
||||
_config.uiItem.enableAutoAdjustMainLvColWidth = EnableAutoAdjustMainLvColWidth;
|
||||
_config.enableSecurityProtocolTls13 = EnableSecurityProtocolTls13;
|
||||
_config.autoHideStartup = AutoHideStartup;
|
||||
_config.uiItem.autoHideStartup = AutoHideStartup;
|
||||
_config.autoUpdateInterval = autoUpdateInterval;
|
||||
_config.autoUpdateSubInterval = autoUpdateSubInterval;
|
||||
_config.checkPreReleaseUpdate = EnableCheckPreReleaseUpdate;
|
||||
|
|
Loading…
Reference in New Issue