Add import default DNS config

This commit is contained in:
2dust
2023-04-26 10:43:05 +08:00
parent c692dd3a66
commit 282ad3ab2d
10 changed files with 110 additions and 1 deletions
@@ -20,6 +20,8 @@ namespace v2rayN.ViewModels
[Reactive] public string normalDNS2 { get; set; }
public ReactiveCommand<Unit, Unit> SaveCmd { get; }
public ReactiveCommand<Unit, Unit> ImportDefConfig4V2rayCmd { get; }
public ReactiveCommand<Unit, Unit> ImportDefConfig4SingboxCmd { get; }
public DNSSettingViewModel(Window view)
{
@@ -39,6 +41,16 @@ namespace v2rayN.ViewModels
SaveSetting();
});
ImportDefConfig4V2rayCmd = ReactiveCommand.Create(() =>
{
normalDNS = Utils.GetEmbedText(Global.DNSV2rayNormalFileName);
});
ImportDefConfig4SingboxCmd = ReactiveCommand.Create(() =>
{
normalDNS2 = Utils.GetEmbedText(Global.DNSSingboxNormalFileName);
});
Utils.SetDarkBorder(view, _config.uiItem.colorModeDark);
}