Adjust some core

This commit is contained in:
2dust 2023-11-16 19:56:14 +08:00
parent f7ce49020f
commit 74332c58c5
5 changed files with 28 additions and 27 deletions

View file

@ -143,7 +143,7 @@
public static readonly List<string> flows = new() { "", "xtls-rprx-vision", "xtls-rprx-vision-udp443" }; public static readonly List<string> flows = new() { "", "xtls-rprx-vision", "xtls-rprx-vision-udp443" };
public static readonly List<string> networks = new() { "tcp", "kcp", "ws", "h2", "quic", "grpc" }; public static readonly List<string> networks = new() { "tcp", "kcp", "ws", "h2", "quic", "grpc" };
public static readonly List<string> kcpHeaderTypes = new() { "srtp", "utp", "wechat-video", "dtls", "wireguard" }; public static readonly List<string> kcpHeaderTypes = new() { "srtp", "utp", "wechat-video", "dtls", "wireguard" };
public static readonly List<string> coreTypes = new() { "v2fly", "SagerNet", "Xray", "v2fly_v5", "sing_box" }; public static readonly List<string> coreTypes = new() { "Xray", "sing_box" };
public static readonly List<string> coreTypes4VLESS = new() { "Xray", "sing_box" }; public static readonly List<string> coreTypes4VLESS = new() { "Xray", "sing_box" };
public static readonly List<string> domainStrategys = new() { "AsIs", "IPIfNonMatch", "IPOnDemand" }; public static readonly List<string> domainStrategys = new() { "AsIs", "IPIfNonMatch", "IPOnDemand" };
public static readonly List<string> domainStrategys4Singbox = new() { "ipv4_only", "ipv6_only", "prefer_ipv4", "prefer_ipv6", "" }; public static readonly List<string> domainStrategys4Singbox = new() { "ipv4_only", "ipv6_only", "prefer_ipv4", "prefer_ipv6", "" };

View file

@ -252,7 +252,7 @@ namespace v2rayN.Handler
{ {
coreType = ECoreType.v2fly_v5, coreType = ECoreType.v2fly_v5,
coreExes = new List<string> { "v2ray" }, coreExes = new List<string> { "v2ray" },
arguments = "run", arguments = "run -c config.json -format jsonv5",
coreUrl = Global.v2flyCoreUrl, coreUrl = Global.v2flyCoreUrl,
coreReleaseApiUrl = Global.v2flyCoreUrl.Replace(Global.githubUrl, Global.githubApiUrl), coreReleaseApiUrl = Global.v2flyCoreUrl.Replace(Global.githubUrl, Global.githubApiUrl),
coreDownloadUrl32 = Global.v2flyCoreUrl + "/download/{0}/v2ray-windows-{1}.zip", coreDownloadUrl32 = Global.v2flyCoreUrl + "/download/{0}/v2ray-windows-{1}.zip",

View file

@ -147,10 +147,10 @@ namespace v2rayN.ViewModels
public ReactiveCommand<Unit, Unit> CheckUpdateNCmd { get; } public ReactiveCommand<Unit, Unit> CheckUpdateNCmd { get; }
public ReactiveCommand<Unit, Unit> CheckUpdateV2flyCoreCmd { get; } public ReactiveCommand<Unit, Unit> CheckUpdateV2flyCoreCmd { get; }
public ReactiveCommand<Unit, Unit> CheckUpdateSagerNetCoreCmd { get; } //public ReactiveCommand<Unit, Unit> CheckUpdateSagerNetCoreCmd { get; }
public ReactiveCommand<Unit, Unit> CheckUpdateXrayCoreCmd { get; } public ReactiveCommand<Unit, Unit> CheckUpdateXrayCoreCmd { get; }
public ReactiveCommand<Unit, Unit> CheckUpdateClashCoreCmd { get; } //public ReactiveCommand<Unit, Unit> CheckUpdateClashCoreCmd { get; }
public ReactiveCommand<Unit, Unit> CheckUpdateClashMetaCoreCmd { get; } //public ReactiveCommand<Unit, Unit> CheckUpdateClashMetaCoreCmd { get; }
public ReactiveCommand<Unit, Unit> CheckUpdateSingBoxCoreCmd { get; } public ReactiveCommand<Unit, Unit> CheckUpdateSingBoxCoreCmd { get; }
public ReactiveCommand<Unit, Unit> CheckUpdateGeoCmd { get; } public ReactiveCommand<Unit, Unit> CheckUpdateGeoCmd { get; }
@ -500,22 +500,22 @@ namespace v2rayN.ViewModels
{ {
CheckUpdateCore(ECoreType.v2fly_v5); CheckUpdateCore(ECoreType.v2fly_v5);
}); });
CheckUpdateSagerNetCoreCmd = ReactiveCommand.Create(() => //CheckUpdateSagerNetCoreCmd = ReactiveCommand.Create(() =>
{ //{
CheckUpdateCore(ECoreType.SagerNet); // CheckUpdateCore(ECoreType.SagerNet);
}); //});
CheckUpdateXrayCoreCmd = ReactiveCommand.Create(() => CheckUpdateXrayCoreCmd = ReactiveCommand.Create(() =>
{ {
CheckUpdateCore(ECoreType.Xray); CheckUpdateCore(ECoreType.Xray);
}); });
CheckUpdateClashCoreCmd = ReactiveCommand.Create(() => //CheckUpdateClashCoreCmd = ReactiveCommand.Create(() =>
{ //{
CheckUpdateCore(ECoreType.clash); // CheckUpdateCore(ECoreType.clash);
}); //});
CheckUpdateClashMetaCoreCmd = ReactiveCommand.Create(() => //CheckUpdateClashMetaCoreCmd = ReactiveCommand.Create(() =>
{ //{
CheckUpdateCore(ECoreType.clash_meta); // CheckUpdateCore(ECoreType.clash_meta);
}); //});
CheckUpdateSingBoxCoreCmd = ReactiveCommand.Create(() => CheckUpdateSingBoxCoreCmd = ReactiveCommand.Create(() =>
{ {
CheckUpdateCore(ECoreType.sing_box); CheckUpdateCore(ECoreType.sing_box);

View file

@ -212,15 +212,15 @@
x:Name="menuCheckUpdateV2flyCore" x:Name="menuCheckUpdateV2flyCore"
Height="{StaticResource MenuItemHeight}" Height="{StaticResource MenuItemHeight}"
Header="V2fly v5 Core" /> Header="V2fly v5 Core" />
<MenuItem <!--<MenuItem
x:Name="menuCheckUpdateSagerNetCore" x:Name="menuCheckUpdateSagerNetCore"
Height="{StaticResource MenuItemHeight}" Height="{StaticResource MenuItemHeight}"
Header="SagerNet Core" /> Header="SagerNet Core" />-->
<MenuItem <MenuItem
x:Name="menuCheckUpdateXrayCore" x:Name="menuCheckUpdateXrayCore"
Height="{StaticResource MenuItemHeight}" Height="{StaticResource MenuItemHeight}"
Header="Xray Core" /> Header="Xray Core" />
<Separator Margin="-40,5" /> <!--<Separator Margin="-40,5" />
<MenuItem <MenuItem
x:Name="menuCheckUpdateClashCore" x:Name="menuCheckUpdateClashCore"
Height="{StaticResource MenuItemHeight}" Height="{StaticResource MenuItemHeight}"
@ -229,7 +229,7 @@
x:Name="menuCheckUpdateClashMetaCore" x:Name="menuCheckUpdateClashMetaCore"
Height="{StaticResource MenuItemHeight}" Height="{StaticResource MenuItemHeight}"
Header="Clash.Meta Core" /> Header="Clash.Meta Core" />
<Separator Margin="-40,5" /> <Separator Margin="-40,5" />-->
<MenuItem <MenuItem
x:Name="menuCheckUpdateSingBoxCore" x:Name="menuCheckUpdateSingBoxCore"
Height="{StaticResource MenuItemHeight}" Height="{StaticResource MenuItemHeight}"
@ -384,9 +384,10 @@
<WrapPanel Margin="2" DockPanel.Dock="Top"> <WrapPanel Margin="2" DockPanel.Dock="Top">
<ListBox <ListBox
x:Name="lstGroup" x:Name="lstGroup"
MaxHeight="120"
FontSize="{DynamicResource StdFontSize}" FontSize="{DynamicResource StdFontSize}"
ItemContainerStyle="{StaticResource MyChipListBoxItem}" ItemContainerStyle="{StaticResource MyChipListBoxItem}"
Style="{StaticResource MaterialDesignChoiceChipPrimaryOutlineListBox}" MaxHeight="120"> Style="{StaticResource MaterialDesignChoiceChipPrimaryOutlineListBox}">
<ListBox.ItemTemplate> <ListBox.ItemTemplate>
<DataTemplate> <DataTemplate>
<TextBlock Text="{Binding remarks}" /> <TextBlock Text="{Binding remarks}" />
@ -751,8 +752,8 @@
<tb:TaskbarIcon <tb:TaskbarIcon
x:Name="tbNotify" x:Name="tbNotify"
IconSource="/v2rayN.ico" IconSource="/v2rayN.ico"
ToolTipText="v2rayN" NoLeftClickDelay="True"
NoLeftClickDelay="True"> ToolTipText="v2rayN">
<tb:TaskbarIcon.ContextMenu> <tb:TaskbarIcon.ContextMenu>
<ContextMenu Style="{StaticResource DefContextMenu}"> <ContextMenu Style="{StaticResource DefContextMenu}">
<MenuItem x:Name="menuSystemProxyClear" Height="{StaticResource MenuItemHeight}"> <MenuItem x:Name="menuSystemProxyClear" Height="{StaticResource MenuItemHeight}">

View file

@ -139,10 +139,10 @@ namespace v2rayN.Views
//checkupdate //checkupdate
this.BindCommand(ViewModel, vm => vm.CheckUpdateNCmd, v => v.menuCheckUpdateN).DisposeWith(disposables); this.BindCommand(ViewModel, vm => vm.CheckUpdateNCmd, v => v.menuCheckUpdateN).DisposeWith(disposables);
this.BindCommand(ViewModel, vm => vm.CheckUpdateV2flyCoreCmd, v => v.menuCheckUpdateV2flyCore).DisposeWith(disposables); this.BindCommand(ViewModel, vm => vm.CheckUpdateV2flyCoreCmd, v => v.menuCheckUpdateV2flyCore).DisposeWith(disposables);
this.BindCommand(ViewModel, vm => vm.CheckUpdateSagerNetCoreCmd, v => v.menuCheckUpdateSagerNetCore).DisposeWith(disposables); //this.BindCommand(ViewModel, vm => vm.CheckUpdateSagerNetCoreCmd, v => v.menuCheckUpdateSagerNetCore).DisposeWith(disposables);
this.BindCommand(ViewModel, vm => vm.CheckUpdateXrayCoreCmd, v => v.menuCheckUpdateXrayCore).DisposeWith(disposables); this.BindCommand(ViewModel, vm => vm.CheckUpdateXrayCoreCmd, v => v.menuCheckUpdateXrayCore).DisposeWith(disposables);
this.BindCommand(ViewModel, vm => vm.CheckUpdateClashCoreCmd, v => v.menuCheckUpdateClashCore).DisposeWith(disposables); //this.BindCommand(ViewModel, vm => vm.CheckUpdateClashCoreCmd, v => v.menuCheckUpdateClashCore).DisposeWith(disposables);
this.BindCommand(ViewModel, vm => vm.CheckUpdateClashMetaCoreCmd, v => v.menuCheckUpdateClashMetaCore).DisposeWith(disposables); //this.BindCommand(ViewModel, vm => vm.CheckUpdateClashMetaCoreCmd, v => v.menuCheckUpdateClashMetaCore).DisposeWith(disposables);
this.BindCommand(ViewModel, vm => vm.CheckUpdateSingBoxCoreCmd, v => v.menuCheckUpdateSingBoxCore).DisposeWith(disposables); this.BindCommand(ViewModel, vm => vm.CheckUpdateSingBoxCoreCmd, v => v.menuCheckUpdateSingBoxCore).DisposeWith(disposables);
this.BindCommand(ViewModel, vm => vm.CheckUpdateGeoCmd, v => v.menuCheckUpdateGeo).DisposeWith(disposables); this.BindCommand(ViewModel, vm => vm.CheckUpdateGeoCmd, v => v.menuCheckUpdateGeo).DisposeWith(disposables);