Compare commits
67 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1d0e8434ad | ||
|
|
e7b2deb941 | ||
|
|
2a37a6a28e | ||
|
|
735ebbe92a | ||
|
|
2031729656 | ||
|
|
f39fdc38cb | ||
|
|
6b62623615 | ||
|
|
f3f3dc1951 | ||
|
|
f4dd970f5e | ||
|
|
74332c58c5 | ||
|
|
f7ce49020f | ||
|
|
aaba1f7209 | ||
|
|
a9c7916b3d | ||
|
|
e3c8ccfafe | ||
|
|
2a22b65b2d | ||
|
|
ce5728e2df | ||
|
|
cba82e0e8e | ||
|
|
be30064f9a | ||
|
|
1798981380 | ||
|
|
06586d3405 | ||
|
|
31bcbd0e13 | ||
|
|
2652beed88 | ||
|
|
a2b87b862f | ||
|
|
85e8d9479e | ||
|
|
119508a4e3 | ||
|
|
3c2da0a225 | ||
|
|
ef79e6adf9 | ||
|
|
528400579a | ||
|
|
521ce1a487 | ||
|
|
014cc9bc16 | ||
|
|
34c6c953ac | ||
|
|
40fbbc7c58 | ||
|
|
534c329970 | ||
|
|
328d728257 | ||
|
|
fae6d42758 | ||
|
|
27693f6d23 | ||
|
|
89c4bab5b9 | ||
|
|
9d2ff04838 | ||
|
|
cf00243107 | ||
|
|
e8019ba7a5 | ||
|
|
4f30e3f0e3 | ||
|
|
047d08470f | ||
|
|
9643695389 | ||
|
|
5cabec86e7 | ||
|
|
f2d0e37255 | ||
|
|
9560851a3f | ||
|
|
4aeec1caa1 | ||
|
|
ae45b1ef44 | ||
|
|
aad1b087c9 | ||
|
|
b69c581fa1 | ||
|
|
9eb4d90cd6 | ||
|
|
958567c2c5 | ||
|
|
f1fc4583ed | ||
|
|
f7bfd5f766 | ||
|
|
aadc3c216a | ||
|
|
6fd2499daf | ||
|
|
f0405f1c5d | ||
|
|
1914cb3994 | ||
|
|
ab38fb572d | ||
|
|
46d7128a6e | ||
|
|
0821884ff3 | ||
|
|
62233281ef | ||
|
|
39504502af | ||
|
|
f97530a671 | ||
|
|
0fe7d5e598 | ||
|
|
527362dc9f | ||
|
|
1023426c8d |
106
.github/workflows/dotnet-desktop.yml
vendored
Normal file
106
.github/workflows/dotnet-desktop.yml
vendored
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
# This workflow uses actions that are not certified by GitHub.
|
||||||
|
# They are provided by a third-party and are governed by
|
||||||
|
# separate terms of service, privacy policy, and support
|
||||||
|
# documentation.
|
||||||
|
|
||||||
|
# This workflow will build, test, sign and package a WPF or Windows Forms desktop application
|
||||||
|
# built on .NET Core.
|
||||||
|
# To learn how to migrate your existing application to .NET Core,
|
||||||
|
# refer to https://docs.microsoft.com/en-us/dotnet/desktop-wpf/migration/convert-project-from-net-framework
|
||||||
|
#
|
||||||
|
# To configure this workflow:
|
||||||
|
#
|
||||||
|
# 1. Configure environment variables
|
||||||
|
# GitHub sets default environment variables for every workflow run.
|
||||||
|
# Replace the variables relative to your project in the "env" section below.
|
||||||
|
#
|
||||||
|
# 2. Signing
|
||||||
|
# Generate a signing certificate in the Windows Application
|
||||||
|
# Packaging Project or add an existing signing certificate to the project.
|
||||||
|
# Next, use PowerShell to encode the .pfx file using Base64 encoding
|
||||||
|
# by running the following Powershell script to generate the output string:
|
||||||
|
#
|
||||||
|
# $pfx_cert = Get-Content '.\SigningCertificate.pfx' -Encoding Byte
|
||||||
|
# [System.Convert]::ToBase64String($pfx_cert) | Out-File 'SigningCertificate_Encoded.txt'
|
||||||
|
#
|
||||||
|
# Open the output file, SigningCertificate_Encoded.txt, and copy the
|
||||||
|
# string inside. Then, add the string to the repo as a GitHub secret
|
||||||
|
# and name it "Base64_Encoded_Pfx."
|
||||||
|
# For more information on how to configure your signing certificate for
|
||||||
|
# this workflow, refer to https://github.com/microsoft/github-actions-for-desktop-apps#signing
|
||||||
|
#
|
||||||
|
# Finally, add the signing certificate password to the repo as a secret and name it "Pfx_Key".
|
||||||
|
# See "Build the Windows Application Packaging project" below to see how the secret is used.
|
||||||
|
#
|
||||||
|
# For more information on GitHub Actions, refer to https://github.com/features/actions
|
||||||
|
# For a complete CI/CD sample to get started with GitHub Action workflows for Desktop Applications,
|
||||||
|
# refer to https://github.com/microsoft/github-actions-for-desktop-apps
|
||||||
|
|
||||||
|
name: .NET Core Desktop
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "master" ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ "master" ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
build:
|
||||||
|
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
configuration: [Release]
|
||||||
|
|
||||||
|
runs-on: windows-latest # For a list of available runner types, refer to
|
||||||
|
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on
|
||||||
|
|
||||||
|
env:
|
||||||
|
Solution_Name: v2rayN\v2rayN.sln
|
||||||
|
#Test_Project_Path: your-test-project-path # Replace with the path to your test project, i.e. MyWpfApp.Tests\MyWpfApp.Tests.csproj.
|
||||||
|
Wap_Project_Directory: v2rayN\v2rayN\bin
|
||||||
|
#Wap_Project_Path: your-wap-project-path # Replace with the path to your Wap project, i.e. MyWpf.App.Package\MyWpfApp.Package.wapproj.
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
# Install the .NET Core workload
|
||||||
|
- name: Install .NET Core
|
||||||
|
uses: actions/setup-dotnet@v3
|
||||||
|
with:
|
||||||
|
dotnet-version: 6.0.x
|
||||||
|
|
||||||
|
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
|
||||||
|
- name: Setup MSBuild.exe
|
||||||
|
uses: microsoft/setup-msbuild@v1.0.2
|
||||||
|
|
||||||
|
# Restore the application to populate the obj folder with RuntimeIdentifiers
|
||||||
|
- name: Restore the application
|
||||||
|
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration
|
||||||
|
env:
|
||||||
|
Configuration: ${{ matrix.configuration }}
|
||||||
|
|
||||||
|
|
||||||
|
# Create the app package by building and packaging the Windows Application Packaging project
|
||||||
|
- name: Create the app package
|
||||||
|
run: msbuild $env:Solution_Name /p:Configuration=$env:Configuration
|
||||||
|
env:
|
||||||
|
Appx_Bundle: Always
|
||||||
|
Appx_Bundle_Platforms: x86|x64
|
||||||
|
Appx_Package_Build_Mode: StoreUpload
|
||||||
|
Configuration: ${{ matrix.configuration }}
|
||||||
|
|
||||||
|
- name: check output
|
||||||
|
run: ls ${{ env.Wap_Project_Directory }}
|
||||||
|
env:
|
||||||
|
Configuration: ${{ matrix.configuration }}
|
||||||
|
|
||||||
|
# Upload the MSIX package: https://github.com/marketplace/actions/upload-a-build-artifact
|
||||||
|
- name: Upload build artifacts
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: MSIX Package
|
||||||
|
path: ${{ env.Wap_Project_Directory }}\Release\net6.0-windows
|
||||||
@@ -9,9 +9,9 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Google.Protobuf" Version="3.23.3" />
|
<PackageReference Include="Google.Protobuf" Version="3.25.1" />
|
||||||
<PackageReference Include="Grpc.Net.Client" Version="2.54.0" />
|
<PackageReference Include="Grpc.Net.Client" Version="2.59.0" />
|
||||||
<PackageReference Include="Grpc.Tools" Version="2.54.0">
|
<PackageReference Include="Grpc.Tools" Version="2.59.0">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
public const string geoUrl = "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/{0}.dat";
|
public const string geoUrl = "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/{0}.dat";
|
||||||
public const string singboxGeoUrl = "https://github.com/soffchen/sing-{0}/releases/latest/download/{0}.db";
|
public const string singboxGeoUrl = "https://github.com/soffchen/sing-{0}/releases/latest/download/{0}.db";
|
||||||
public const string SpeedPingTestUrl = @"https://www.google.com/generate_204";
|
public const string SpeedPingTestUrl = @"https://www.google.com/generate_204";
|
||||||
|
public const string juicityCoreUrl = "https://github.com/juicity/juicity/releases";
|
||||||
public const string CustomRoutingListUrl = @"https://raw.githubusercontent.com/2dust/v2rayCustomRoutingList/master/";
|
public const string CustomRoutingListUrl = @"https://raw.githubusercontent.com/2dust/v2rayCustomRoutingList/master/";
|
||||||
|
|
||||||
public const string PromotionUrl = @"aHR0cHM6Ly85LjIzNDQ1Ni54eXovYWJjLmh0bWw=";
|
public const string PromotionUrl = @"aHR0cHM6Ly85LjIzNDQ1Ni54eXovYWJjLmh0bWw=";
|
||||||
@@ -119,6 +120,9 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
public static readonly List<string> SpeedTestUrls = new() {
|
public static readonly List<string> SpeedTestUrls = new() {
|
||||||
|
@"https://speed.cloudflare.com/__down?bytes=100000000",
|
||||||
|
@"https://speed.cloudflare.com/__down?bytes=10000000",
|
||||||
|
@"http://cachefly.cachefly.net/50mb.test",
|
||||||
@"http://cachefly.cachefly.net/100mb.test",
|
@"http://cachefly.cachefly.net/100mb.test",
|
||||||
@"http://cachefly.cachefly.net/10mb.test"
|
@"http://cachefly.cachefly.net/10mb.test"
|
||||||
};
|
};
|
||||||
@@ -139,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() { "v2fly", "SagerNet", "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", "" };
|
||||||
@@ -149,7 +153,7 @@
|
|||||||
|
|
||||||
public static readonly List<string> allowInsecures = new() { "true", "false", "" };
|
public static readonly List<string> allowInsecures = new() { "true", "false", "" };
|
||||||
public static readonly List<string> domainStrategy4Freedoms = new() { "AsIs", "UseIP", "UseIPv4", "UseIPv6", "" };
|
public static readonly List<string> domainStrategy4Freedoms = new() { "AsIs", "UseIP", "UseIPv4", "UseIPv6", "" };
|
||||||
public static readonly List<string> Languages = new() { "zh-Hans", "en", "fa-Ir", "ru" };
|
public static readonly List<string> Languages = new() { "zh-Hans", "zh-Hant", "en", "fa-Ir", "ru" };
|
||||||
public static readonly List<string> alpns = new() { "h2", "http/1.1", "h2,http/1.1", "" };
|
public static readonly List<string> alpns = new() { "h2", "http/1.1", "h2,http/1.1", "" };
|
||||||
public static readonly List<string> LogLevel = new() { "debug", "info", "warning", "error", "none" };
|
public static readonly List<string> LogLevel = new() { "debug", "info", "warning", "error", "none" };
|
||||||
public static readonly List<string> InboundTags = new() { "socks", "http", "socks2", "http2" };
|
public static readonly List<string> InboundTags = new() { "socks", "http", "socks2", "http2" };
|
||||||
|
|||||||
@@ -594,7 +594,7 @@ namespace v2rayN.Handler
|
|||||||
profileItem.configType = EConfigType.Custom;
|
profileItem.configType = EConfigType.Custom;
|
||||||
if (Utils.IsNullOrEmpty(profileItem.remarks))
|
if (Utils.IsNullOrEmpty(profileItem.remarks))
|
||||||
{
|
{
|
||||||
profileItem.remarks = $"import custom@{DateTime.Now.ToShortDateString()}";
|
profileItem.remarks = $"import custom@{DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss")}";
|
||||||
}
|
}
|
||||||
|
|
||||||
AddServerCommon(ref config, profileItem, true);
|
AddServerCommon(ref config, profileItem, true);
|
||||||
|
|||||||
@@ -80,6 +80,7 @@ namespace v2rayN.Handler
|
|||||||
|
|
||||||
if (File.Exists(fileName))
|
if (File.Exists(fileName))
|
||||||
{
|
{
|
||||||
|
File.SetAttributes(fileName, FileAttributes.Normal); //If the file has a read-only attribute, direct deletion will fail
|
||||||
File.Delete(fileName);
|
File.Delete(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -94,6 +95,7 @@ namespace v2rayN.Handler
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
File.Copy(addressFileName, fileName);
|
File.Copy(addressFileName, fileName);
|
||||||
|
File.SetAttributes(fileName, FileAttributes.Normal); //Copy will keep the attributes of addressFileName, so we need to add write permissions to fileName just in case of addressFileName is a read-only file.
|
||||||
|
|
||||||
//check again
|
//check again
|
||||||
if (!File.Exists(fileName))
|
if (!File.Exists(fileName))
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Reactive.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using v2rayN.Mode;
|
using v2rayN.Mode;
|
||||||
using v2rayN.Resx;
|
using v2rayN.Resx;
|
||||||
@@ -45,6 +46,25 @@ namespace v2rayN.Handler
|
|||||||
ShowMsg(true, $"{node.GetSummary()}");
|
ShowMsg(true, $"{node.GetSummary()}");
|
||||||
CoreStop();
|
CoreStop();
|
||||||
CoreStart(node);
|
CoreStart(node);
|
||||||
|
|
||||||
|
//In tun mode, do a delay check and restart the core
|
||||||
|
if (_config.tunModeItem.enableTun)
|
||||||
|
{
|
||||||
|
Observable.Range(1, 1)
|
||||||
|
.Delay(TimeSpan.FromSeconds(15))
|
||||||
|
.Subscribe(x =>
|
||||||
|
{
|
||||||
|
{
|
||||||
|
if (_process == null || _process.HasExited)
|
||||||
|
{
|
||||||
|
CoreStart(node);
|
||||||
|
ShowMsg(false, "Tun mode restart the core once");
|
||||||
|
Utils.SaveLog("Tun mode restart the core once");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -152,7 +172,7 @@ namespace v2rayN.Handler
|
|||||||
|
|
||||||
private void CoreStart(ProfileItem node)
|
private void CoreStart(ProfileItem node)
|
||||||
{
|
{
|
||||||
ShowMsg(false, string.Format(ResUI.StartService, DateTime.Now.ToString()));
|
ShowMsg(false, string.Format(ResUI.StartService, DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss")));
|
||||||
|
|
||||||
ECoreType coreType;
|
ECoreType coreType;
|
||||||
if (node.configType != EConfigType.Custom && _config.tunModeItem.enableTun)
|
if (node.configType != EConfigType.Custom && _config.tunModeItem.enableTun)
|
||||||
@@ -201,7 +221,7 @@ namespace v2rayN.Handler
|
|||||||
|
|
||||||
private int CoreStartViaString(string configStr)
|
private int CoreStartViaString(string configStr)
|
||||||
{
|
{
|
||||||
ShowMsg(false, string.Format(ResUI.StartService, DateTime.Now.ToString()));
|
ShowMsg(false, string.Format(ResUI.StartService, DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss")));
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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",
|
||||||
@@ -353,6 +353,27 @@ namespace v2rayN.Handler
|
|||||||
match = "sing-box",
|
match = "sing-box",
|
||||||
versionArg = "version",
|
versionArg = "version",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
coreInfos.Add(new CoreInfo
|
||||||
|
{
|
||||||
|
coreType = ECoreType.juicity,
|
||||||
|
coreExes = new List<string> { "juicity-client", "juicity" },
|
||||||
|
arguments = "run -c config.json",
|
||||||
|
coreUrl = Global.juicityCoreUrl
|
||||||
|
});
|
||||||
|
|
||||||
|
coreInfos.Add(new CoreInfo
|
||||||
|
{
|
||||||
|
coreType = ECoreType.hysteria2,
|
||||||
|
coreExes = new List<string> { "hysteria-windows-amd64", "hysteria-windows-386", "hysteria" },
|
||||||
|
arguments = "",
|
||||||
|
coreUrl = Global.hysteriaCoreUrl,
|
||||||
|
coreReleaseApiUrl = Global.hysteriaCoreUrl.Replace(Global.githubUrl, Global.githubApiUrl),
|
||||||
|
coreDownloadUrl32 = Global.hysteriaCoreUrl + "/download/{0}/hysteria-windows-386.exe",
|
||||||
|
coreDownloadUrl64 = Global.hysteriaCoreUrl + "/download/{0}/hysteria-windows-amd64.exe",
|
||||||
|
coreDownloadUrlArm64 = Global.hysteriaCoreUrl + "/download/{0}/hysteria-windows-arm64.exe",
|
||||||
|
redirectInfo = true,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion Core Type
|
#endregion Core Type
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ namespace v2rayN.Handler
|
|||||||
|
|
||||||
public void SendMessage(string msg, bool time)
|
public void SendMessage(string msg, bool time)
|
||||||
{
|
{
|
||||||
msg = $"{DateTime.Now} {msg}";
|
msg = $"{DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss")} {msg}";
|
||||||
MessageBus.Current.SendMessage(msg, "MsgView");
|
MessageBus.Current.SendMessage(msg, "MsgView");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -427,7 +427,7 @@ namespace v2rayN.Handler
|
|||||||
case ECoreType.v2fly_v5:
|
case ECoreType.v2fly_v5:
|
||||||
{
|
{
|
||||||
curVersion = getCoreVersion(type);
|
curVersion = getCoreVersion(type);
|
||||||
message = string.Format(ResUI.IsLatestCore, curVersion.ToVersionString("v"));
|
message = string.Format(ResUI.IsLatestCore, type, curVersion.ToVersionString("v"));
|
||||||
string osBit = "64";
|
string osBit = "64";
|
||||||
switch (RuntimeInformation.ProcessArchitecture)
|
switch (RuntimeInformation.ProcessArchitecture)
|
||||||
{
|
{
|
||||||
@@ -451,7 +451,7 @@ namespace v2rayN.Handler
|
|||||||
case ECoreType.clash_meta:
|
case ECoreType.clash_meta:
|
||||||
{
|
{
|
||||||
curVersion = getCoreVersion(type);
|
curVersion = getCoreVersion(type);
|
||||||
message = string.Format(ResUI.IsLatestCore, curVersion);
|
message = string.Format(ResUI.IsLatestCore, type, curVersion);
|
||||||
switch (RuntimeInformation.ProcessArchitecture)
|
switch (RuntimeInformation.ProcessArchitecture)
|
||||||
{
|
{
|
||||||
case Architecture.Arm64:
|
case Architecture.Arm64:
|
||||||
@@ -472,7 +472,7 @@ namespace v2rayN.Handler
|
|||||||
case ECoreType.sing_box:
|
case ECoreType.sing_box:
|
||||||
{
|
{
|
||||||
curVersion = getCoreVersion(type);
|
curVersion = getCoreVersion(type);
|
||||||
message = string.Format(ResUI.IsLatestCore, curVersion.ToVersionString("v"));
|
message = string.Format(ResUI.IsLatestCore, type, curVersion.ToVersionString("v"));
|
||||||
switch (RuntimeInformation.ProcessArchitecture)
|
switch (RuntimeInformation.ProcessArchitecture)
|
||||||
{
|
{
|
||||||
case Architecture.Arm64:
|
case Architecture.Arm64:
|
||||||
@@ -493,7 +493,7 @@ namespace v2rayN.Handler
|
|||||||
case ECoreType.v2rayN:
|
case ECoreType.v2rayN:
|
||||||
{
|
{
|
||||||
curVersion = new SemanticVersion(FileVersionInfo.GetVersionInfo(Utils.GetExePath()).FileVersion.ToString());
|
curVersion = new SemanticVersion(FileVersionInfo.GetVersionInfo(Utils.GetExePath()).FileVersion.ToString());
|
||||||
message = string.Format(ResUI.IsLatestN, curVersion);
|
message = string.Format(ResUI.IsLatestN, type, curVersion);
|
||||||
switch (RuntimeInformation.ProcessArchitecture)
|
switch (RuntimeInformation.ProcessArchitecture)
|
||||||
{
|
{
|
||||||
case Architecture.Arm64:
|
case Architecture.Arm64:
|
||||||
|
|||||||
@@ -12,6 +12,8 @@
|
|||||||
naiveproxy = 22,
|
naiveproxy = 22,
|
||||||
tuic = 23,
|
tuic = 23,
|
||||||
sing_box = 24,
|
sing_box = 24,
|
||||||
|
juicity = 25,
|
||||||
|
hysteria2 = 26,
|
||||||
v2rayN = 99
|
v2rayN = 99
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
705
v2rayN/v2rayN/Resx/ResUI.Designer.cs
generated
705
v2rayN/v2rayN/Resx/ResUI.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@@ -187,10 +187,10 @@
|
|||||||
<value>پیکربندی اولیه</value>
|
<value>پیکربندی اولیه</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="IsLatestCore" xml:space="preserve">
|
<data name="IsLatestCore" xml:space="preserve">
|
||||||
<value>{0} در حال حاضر به روز است.</value>
|
<value>{0} {1} در حال حاضر به روز است.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="IsLatestN" xml:space="preserve">
|
<data name="IsLatestN" xml:space="preserve">
|
||||||
<value>{0} در حال حاضر به روز است.</value>
|
<value>{0} {1} در حال حاضر به روز است.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LvAddress" xml:space="preserve">
|
<data name="LvAddress" xml:space="preserve">
|
||||||
<value>آدرس</value>
|
<value>آدرس</value>
|
||||||
|
|||||||
@@ -187,10 +187,10 @@
|
|||||||
<value>Initial Configuration</value>
|
<value>Initial Configuration</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="IsLatestCore" xml:space="preserve">
|
<data name="IsLatestCore" xml:space="preserve">
|
||||||
<value>{0} already up to date.</value>
|
<value>{0} {1} already up to date.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="IsLatestN" xml:space="preserve">
|
<data name="IsLatestN" xml:space="preserve">
|
||||||
<value>{0} already up to date.</value>
|
<value>{0} {1} already up to date.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LvAddress" xml:space="preserve">
|
<data name="LvAddress" xml:space="preserve">
|
||||||
<value>Address</value>
|
<value>Address</value>
|
||||||
@@ -1037,7 +1037,7 @@
|
|||||||
<value>FontFamily(Require restart)</value>
|
<value>FontFamily(Require restart)</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsCurrentFontFamilyTip" xml:space="preserve">
|
<data name="TbSettingsCurrentFontFamilyTip" xml:space="preserve">
|
||||||
<value>Copy the font TTF file to the directory guiFonts, restart the settings</value>
|
<value>Copy the font TTF/TTC file to the directory guiFonts, restart the settings</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsSocksPortTip" xml:space="preserve">
|
<data name="TbSettingsSocksPortTip" xml:space="preserve">
|
||||||
<value>http port=socks port+1</value>
|
<value>http port=socks port+1</value>
|
||||||
|
|||||||
@@ -187,10 +187,10 @@
|
|||||||
<value>Исходная конфигурация</value>
|
<value>Исходная конфигурация</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="IsLatestCore" xml:space="preserve">
|
<data name="IsLatestCore" xml:space="preserve">
|
||||||
<value>{0} является последней версией.</value>
|
<value>{0} {1} является последней версией.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="IsLatestN" xml:space="preserve">
|
<data name="IsLatestN" xml:space="preserve">
|
||||||
<value>{0} является последней версией.</value>
|
<value>{0} {1} является последней версией.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LvAddress" xml:space="preserve">
|
<data name="LvAddress" xml:space="preserve">
|
||||||
<value>Адрес</value>
|
<value>Адрес</value>
|
||||||
@@ -317,7 +317,7 @@
|
|||||||
<value>Сканирование URL-адреса импорта успешна.</value>
|
<value>Сканирование URL-адреса импорта успешна.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TestMeOutput" xml:space="preserve">
|
<data name="TestMeOutput" xml:space="preserve">
|
||||||
<value>Пинг текущей службы: {0} мс</value>
|
<value>Задержка текущего сервера: {0} мс</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="OperationSuccess" xml:space="preserve">
|
<data name="OperationSuccess" xml:space="preserve">
|
||||||
<value>Операция успешна</value>
|
<value>Операция успешна</value>
|
||||||
@@ -335,7 +335,7 @@
|
|||||||
<value>Примечания</value>
|
<value>Примечания</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LvUrl" xml:space="preserve">
|
<data name="LvUrl" xml:space="preserve">
|
||||||
<value>Url(Необязательно)</value>
|
<value>URL (необязательно)</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LvCount" xml:space="preserve">
|
<data name="LvCount" xml:space="preserve">
|
||||||
<value>Количество</value>
|
<value>Количество</value>
|
||||||
@@ -506,7 +506,7 @@
|
|||||||
<value>Тёмный режим</value>
|
<value>Тёмный режим</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsFollowSystemTheme" xml:space="preserve">
|
<data name="TbSettingsFollowSystemTheme" xml:space="preserve">
|
||||||
<value>следить за системной темой</value>
|
<value>Следить за системной темой</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsLanguage" xml:space="preserve">
|
<data name="TbSettingsLanguage" xml:space="preserve">
|
||||||
<value>Язык (требуется перезапуск)</value>
|
<value>Язык (требуется перезапуск)</value>
|
||||||
@@ -533,19 +533,19 @@
|
|||||||
<value>Очистить всю статистику</value>
|
<value>Очистить всю статистику</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="menuPingServer" xml:space="preserve">
|
<data name="menuPingServer" xml:space="preserve">
|
||||||
<value>Проверить пинг серверов (Ctrl+P)</value>
|
<value>Тест на задержку сервера (Ctrl+P)</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="menuRealPingServer" xml:space="preserve">
|
<data name="menuRealPingServer" xml:space="preserve">
|
||||||
<value>Тест на реальную задержку серверов (Ctrl+R)</value>
|
<value>Тест на реальную задержку сервера (Ctrl+R)</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="menuSortServerResult" xml:space="preserve">
|
<data name="menuSortServerResult" xml:space="preserve">
|
||||||
<value>Сортировать по результату теста</value>
|
<value>Сортировать по результату теста</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="menuSpeedServer" xml:space="preserve">
|
<data name="menuSpeedServer" xml:space="preserve">
|
||||||
<value>Проверить скорость загрузки серверов (Ctrl+T)</value>
|
<value>Тест на скорость загрузки сервера (Ctrl+T)</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="menuTcpingServer" xml:space="preserve">
|
<data name="menuTcpingServer" xml:space="preserve">
|
||||||
<value>Тестировать сервера с tcping (Ctrl+O)</value>
|
<value>Тест задержки с tcping (Ctrl+O)</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="menuTestMe" xml:space="preserve">
|
<data name="menuTestMe" xml:space="preserve">
|
||||||
<value>Проверить текущий статус службы</value>
|
<value>Проверить текущий статус службы</value>
|
||||||
@@ -644,7 +644,7 @@
|
|||||||
<value>Тип камуфляжа</value>
|
<value>Тип камуфляжа</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbId" xml:space="preserve">
|
<data name="TbId" xml:space="preserve">
|
||||||
<value>UUID(id)</value>
|
<value>UUID (id)</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbNetwork" xml:space="preserve">
|
<data name="TbNetwork" xml:space="preserve">
|
||||||
<value>Транспортный протокол сети</value>
|
<value>Транспортный протокол сети</value>
|
||||||
@@ -656,7 +656,7 @@
|
|||||||
<value>Порт</value>
|
<value>Порт</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbRemarks" xml:space="preserve">
|
<data name="TbRemarks" xml:space="preserve">
|
||||||
<value>Псевдоним (примечания)</value>
|
<value>Примечание</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbRequestHost" xml:space="preserve">
|
<data name="TbRequestHost" xml:space="preserve">
|
||||||
<value>Маскирующий домен (хост)</value>
|
<value>Маскирующий домен (хост)</value>
|
||||||
@@ -719,16 +719,22 @@
|
|||||||
<value>Разрешить подключения из локальной сети</value>
|
<value>Разрешить подключения из локальной сети</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsAutoHideStartup" xml:space="preserve">
|
<data name="TbSettingsAutoHideStartup" xml:space="preserve">
|
||||||
<value>Auto hide startup</value>
|
<value>Автоскрытие при автозапуске</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsAutoUpdateInterval" xml:space="preserve">
|
<data name="TbSettingsAutoUpdateInterval" xml:space="preserve">
|
||||||
<value>Интервал автоматического обновления Geo в часах</value>
|
<value>Интервал автоматического обновления Geo в часах</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="LvAutoUpdateInterval" xml:space="preserve">
|
||||||
|
<value>Интервал автоматического обновления в минутах</value>
|
||||||
|
</data>
|
||||||
<data name="TbSettingsCore" xml:space="preserve">
|
<data name="TbSettingsCore" xml:space="preserve">
|
||||||
<value>Ядро: базовые настройки</value>
|
<value>Ядро: базовые настройки</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsCoreDns" xml:space="preserve">
|
<data name="TbSettingsCoreDns" xml:space="preserve">
|
||||||
<value>V2ray DNS settings</value>
|
<value>Настройки DNS V2ray</value>
|
||||||
|
</data>
|
||||||
|
<data name="TbSettingsCoreDnsSingbox" xml:space="preserve">
|
||||||
|
<value>Настройки DNS sing-box</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsCoreKcp" xml:space="preserve">
|
<data name="TbSettingsCoreKcp" xml:space="preserve">
|
||||||
<value>Ядро: настройки KCP</value>
|
<value>Ядро: настройки KCP</value>
|
||||||
@@ -806,7 +812,7 @@
|
|||||||
<value>Включить протокол безопасности TLS v1.3 (обновление подписки)</value>
|
<value>Включить протокол безопасности TLS v1.3 (обновление подписки)</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsTrayMenuServersLimit" xml:space="preserve">
|
<data name="TbSettingsTrayMenuServersLimit" xml:space="preserve">
|
||||||
<value>Tray right-click menu servers display limit</value>
|
<value>Лимит серверов в меню трея</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsUdpEnabled" xml:space="preserve">
|
<data name="TbSettingsUdpEnabled" xml:space="preserve">
|
||||||
<value>Включить UDP</value>
|
<value>Включить UDP</value>
|
||||||
@@ -950,7 +956,7 @@
|
|||||||
<value>Поддержка DnsObject</value>
|
<value>Поддержка DnsObject</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SubUrlTips" xml:space="preserve">
|
<data name="SubUrlTips" xml:space="preserve">
|
||||||
<value>Group please leave blank here</value>
|
<value>Необязательное поле</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TipChangeRouting" xml:space="preserve">
|
<data name="TipChangeRouting" xml:space="preserve">
|
||||||
<value>Настройки маршрутизации изменены</value>
|
<value>Настройки маршрутизации изменены</value>
|
||||||
@@ -962,7 +968,7 @@
|
|||||||
<value>Только маршрут</value>
|
<value>Только маршрут</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="menuMixedTestServer" xml:space="preserve">
|
<data name="menuMixedTestServer" xml:space="preserve">
|
||||||
<value>Тест задержки и скорости (Ctrl+E)</value>
|
<value>Тест задержки и скорости всех серверов (Ctrl+E)</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LvTestDelay" xml:space="preserve">
|
<data name="LvTestDelay" xml:space="preserve">
|
||||||
<value>Задержка (ms)</value>
|
<value>Задержка (ms)</value>
|
||||||
@@ -983,7 +989,7 @@
|
|||||||
<value>Импортировать старый конфиг guiNConfig</value>
|
<value>Импортировать старый конфиг guiNConfig</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbEnableTunAs" xml:space="preserve">
|
<data name="TbEnableTunAs" xml:space="preserve">
|
||||||
<value>Включить интерфейс</value>
|
<value>Режим VPN</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsNewPort4LAN" xml:space="preserve">
|
<data name="TbSettingsNewPort4LAN" xml:space="preserve">
|
||||||
<value>Новый порт для локальной сети</value>
|
<value>Новый порт для локальной сети</value>
|
||||||
@@ -1037,7 +1043,7 @@
|
|||||||
<value>Шрифт (требуется перезагрузка)</value>
|
<value>Шрифт (требуется перезагрузка)</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsCurrentFontFamilyTip" xml:space="preserve">
|
<data name="TbSettingsCurrentFontFamilyTip" xml:space="preserve">
|
||||||
<value>Скопируйте файл шрифта TTF в каталог guiFonts, перезапустите настройки</value>
|
<value>Скопируйте файл шрифта TTF/TTC в каталог guiFonts, перезапустите настройки</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsSocksPortTip" xml:space="preserve">
|
<data name="TbSettingsSocksPortTip" xml:space="preserve">
|
||||||
<value>HTTP port=socks port+1</value>
|
<value>HTTP port=socks port+1</value>
|
||||||
@@ -1051,4 +1057,19 @@
|
|||||||
<data name="TbSettingsEnableHWA" xml:space="preserve">
|
<data name="TbSettingsEnableHWA" xml:space="preserve">
|
||||||
<value>Включить аппаратное ускорение (требуется перезагрузка)</value>
|
<value>Включить аппаратное ускорение (требуется перезагрузка)</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="menuRebootAsAdmin" xml:space="preserve">
|
||||||
|
<value>Перезагрузить как администратор</value>
|
||||||
|
</data>
|
||||||
|
<data name="menuDNSSetting" xml:space="preserve">
|
||||||
|
<value>Настройки DNS</value>
|
||||||
|
</data>
|
||||||
|
<data name="TbSettingsLogEnabledToFile" xml:space="preserve">
|
||||||
|
<value>Включить логгирование в файл</value>
|
||||||
|
</data>
|
||||||
|
<data name="TbSettingsSpeedTestTimeout" xml:space="preserve">
|
||||||
|
<value>Таймаут одиночного спидтеста</value>
|
||||||
|
</data>
|
||||||
|
<data name="TbSettingsSpeedTestUrl" xml:space="preserve">
|
||||||
|
<value>URL спидтеста</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -187,10 +187,10 @@
|
|||||||
<value>初始化配置</value>
|
<value>初始化配置</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="IsLatestCore" xml:space="preserve">
|
<data name="IsLatestCore" xml:space="preserve">
|
||||||
<value>{0} 已是最新版本。</value>
|
<value>{0} {1} 已是最新版本。</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="IsLatestN" xml:space="preserve">
|
<data name="IsLatestN" xml:space="preserve">
|
||||||
<value>{0} 已是最新版本。</value>
|
<value>{0} {1} 已是最新版本。</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LvAddress" xml:space="preserve">
|
<data name="LvAddress" xml:space="preserve">
|
||||||
<value>地址</value>
|
<value>地址</value>
|
||||||
@@ -1037,7 +1037,7 @@
|
|||||||
<value>当前字体(需重启)</value>
|
<value>当前字体(需重启)</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsCurrentFontFamilyTip" xml:space="preserve">
|
<data name="TbSettingsCurrentFontFamilyTip" xml:space="preserve">
|
||||||
<value>拷贝字体TTF文件到目录guiFonts,重启设置</value>
|
<value>拷贝字体TTF/TTC文件到目录guiFonts,重启设置</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbSettingsSocksPortTip" xml:space="preserve">
|
<data name="TbSettingsSocksPortTip" xml:space="preserve">
|
||||||
<value>http端口=socks端口+1</value>
|
<value>http端口=socks端口+1</value>
|
||||||
|
|||||||
1138
v2rayN/v2rayN/Resx/ResUI.zh-Hant.resx
Normal file
1138
v2rayN/v2rayN/Resx/ResUI.zh-Hant.resx
Normal file
File diff suppressed because it is too large
Load Diff
@@ -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; }
|
||||||
|
|
||||||
@@ -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; }
|
||||||
@@ -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);
|
||||||
@@ -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 = ResUI.CheckServerSettings;
|
RunningServerDisplay = ResUI.CheckServerSettings;
|
||||||
//RunningServerToolTipText = ResUI.CheckServerSettings;
|
RunningServerToolTipText = ResUI.CheckServerSettings;
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,17 @@ namespace v2rayN.Views
|
|||||||
public AddServer2Window(ProfileItem profileItem)
|
public AddServer2Window(ProfileItem profileItem)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
|
// 设置窗口的尺寸不大于屏幕的尺寸
|
||||||
|
if (this.Width > SystemParameters.WorkArea.Width)
|
||||||
|
{
|
||||||
|
this.Width = SystemParameters.WorkArea.Width;
|
||||||
|
}
|
||||||
|
if (this.Height > SystemParameters.WorkArea.Height)
|
||||||
|
{
|
||||||
|
this.Height = SystemParameters.WorkArea.Height;
|
||||||
|
}
|
||||||
|
|
||||||
this.Owner = Application.Current.MainWindow;
|
this.Owner = Application.Current.MainWindow;
|
||||||
this.Loaded += Window_Loaded;
|
this.Loaded += Window_Loaded;
|
||||||
ViewModel = new AddServer2ViewModel(profileItem, this);
|
ViewModel = new AddServer2ViewModel(profileItem, this);
|
||||||
|
|||||||
@@ -15,6 +15,17 @@ namespace v2rayN.Views
|
|||||||
public AddServerWindow(ProfileItem profileItem)
|
public AddServerWindow(ProfileItem profileItem)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
|
// 设置窗口的尺寸不大于屏幕的尺寸
|
||||||
|
if (this.Width > SystemParameters.WorkArea.Width)
|
||||||
|
{
|
||||||
|
this.Width = SystemParameters.WorkArea.Width;
|
||||||
|
}
|
||||||
|
if (this.Height > SystemParameters.WorkArea.Height)
|
||||||
|
{
|
||||||
|
this.Height = SystemParameters.WorkArea.Height;
|
||||||
|
}
|
||||||
|
|
||||||
this.Owner = Application.Current.MainWindow;
|
this.Owner = Application.Current.MainWindow;
|
||||||
this.Loaded += Window_Loaded;
|
this.Loaded += Window_Loaded;
|
||||||
cmbNetwork.SelectionChanged += CmbNetwork_SelectionChanged;
|
cmbNetwork.SelectionChanged += CmbNetwork_SelectionChanged;
|
||||||
|
|||||||
@@ -14,6 +14,17 @@ namespace v2rayN.Views
|
|||||||
public DNSSettingWindow()
|
public DNSSettingWindow()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
|
// 设置窗口的尺寸不大于屏幕的尺寸
|
||||||
|
if (this.Width > SystemParameters.WorkArea.Width)
|
||||||
|
{
|
||||||
|
this.Width = SystemParameters.WorkArea.Width;
|
||||||
|
}
|
||||||
|
if (this.Height > SystemParameters.WorkArea.Height)
|
||||||
|
{
|
||||||
|
this.Height = SystemParameters.WorkArea.Height;
|
||||||
|
}
|
||||||
|
|
||||||
this.Owner = Application.Current.MainWindow;
|
this.Owner = Application.Current.MainWindow;
|
||||||
_config = LazyConfig.Instance.GetConfig();
|
_config = LazyConfig.Instance.GetConfig();
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,17 @@ namespace v2rayN.Views
|
|||||||
public GlobalHotkeySettingWindow()
|
public GlobalHotkeySettingWindow()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
|
// 设置窗口的尺寸不大于屏幕的尺寸
|
||||||
|
if (this.Width > SystemParameters.WorkArea.Width)
|
||||||
|
{
|
||||||
|
this.Width = SystemParameters.WorkArea.Width;
|
||||||
|
}
|
||||||
|
if (this.Height > SystemParameters.WorkArea.Height)
|
||||||
|
{
|
||||||
|
this.Height = SystemParameters.WorkArea.Height;
|
||||||
|
}
|
||||||
|
|
||||||
this.Owner = Application.Current.MainWindow;
|
this.Owner = Application.Current.MainWindow;
|
||||||
_config = LazyConfig.Instance.GetConfig();
|
_config = LazyConfig.Instance.GetConfig();
|
||||||
_config.globalHotkeys ??= new List<KeyEventItem>();
|
_config.globalHotkeys ??= new List<KeyEventItem>();
|
||||||
|
|||||||
@@ -15,8 +15,6 @@
|
|||||||
Title="v2rayN"
|
Title="v2rayN"
|
||||||
Width="900"
|
Width="900"
|
||||||
Height="700"
|
Height="700"
|
||||||
MinWidth="900"
|
|
||||||
MinHeight="700"
|
|
||||||
x:TypeArguments="vms:MainWindowViewModel"
|
x:TypeArguments="vms:MainWindowViewModel"
|
||||||
Background="{DynamicResource MaterialDesignPaper}"
|
Background="{DynamicResource MaterialDesignPaper}"
|
||||||
FontFamily="{x:Static conv:MaterialDesignFonts.MyFont}"
|
FontFamily="{x:Static conv:MaterialDesignFonts.MyFont}"
|
||||||
@@ -214,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}"
|
||||||
@@ -231,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}"
|
||||||
@@ -386,6 +384,7 @@
|
|||||||
<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}">
|
Style="{StaticResource MaterialDesignChoiceChipPrimaryOutlineListBox}">
|
||||||
@@ -753,7 +752,8 @@
|
|||||||
<tb:TaskbarIcon
|
<tb:TaskbarIcon
|
||||||
x:Name="tbNotify"
|
x:Name="tbNotify"
|
||||||
IconSource="/v2rayN.ico"
|
IconSource="/v2rayN.ico"
|
||||||
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}">
|
||||||
|
|||||||
@@ -25,6 +25,19 @@ namespace v2rayN.Views
|
|||||||
public MainWindow()
|
public MainWindow()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
|
// 设置窗口的尺寸不大于屏幕的尺寸
|
||||||
|
if (this.Width > SystemParameters.WorkArea.Width)
|
||||||
|
{
|
||||||
|
this.Width = SystemParameters.WorkArea.Width;
|
||||||
|
}
|
||||||
|
if (this.Height > SystemParameters.WorkArea.Height)
|
||||||
|
{
|
||||||
|
this.Height = SystemParameters.WorkArea.Height;
|
||||||
|
}
|
||||||
|
|
||||||
|
lstGroup.MaxHeight = Math.Floor(SystemParameters.WorkArea.Height * 0.20 / 40) * 40;
|
||||||
|
|
||||||
_config = LazyConfig.Instance.GetConfig();
|
_config = LazyConfig.Instance.GetConfig();
|
||||||
|
|
||||||
App.Current.SessionEnding += Current_SessionEnding;
|
App.Current.SessionEnding += Current_SessionEnding;
|
||||||
@@ -126,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);
|
||||||
|
|
||||||
@@ -163,7 +176,7 @@ 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);
|
||||||
@@ -309,33 +322,29 @@ namespace v2rayN.Views
|
|||||||
{
|
{
|
||||||
if (Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl))
|
if (Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl))
|
||||||
{
|
{
|
||||||
if (e.Key == Key.V)
|
switch (e.Key)
|
||||||
{
|
{
|
||||||
|
case Key.V:
|
||||||
ViewModel?.AddServerViaClipboard();
|
ViewModel?.AddServerViaClipboard();
|
||||||
}
|
break;
|
||||||
else if (e.Key == Key.P)
|
case Key.P:
|
||||||
{
|
|
||||||
ViewModel?.ServerSpeedtest(ESpeedActionType.Ping);
|
ViewModel?.ServerSpeedtest(ESpeedActionType.Ping);
|
||||||
}
|
break;
|
||||||
else if (e.Key == Key.O)
|
case Key.O:
|
||||||
{
|
|
||||||
ViewModel?.ServerSpeedtest(ESpeedActionType.Tcping);
|
ViewModel?.ServerSpeedtest(ESpeedActionType.Tcping);
|
||||||
}
|
break;
|
||||||
else if (e.Key == Key.R)
|
case Key.R:
|
||||||
{
|
|
||||||
ViewModel?.ServerSpeedtest(ESpeedActionType.Realping);
|
ViewModel?.ServerSpeedtest(ESpeedActionType.Realping);
|
||||||
}
|
break;
|
||||||
else if (e.Key == Key.S)
|
case Key.S:
|
||||||
{
|
|
||||||
_ = ViewModel?.ScanScreenTaskAsync();
|
_ = ViewModel?.ScanScreenTaskAsync();
|
||||||
}
|
break;
|
||||||
else if (e.Key == Key.T)
|
case Key.T:
|
||||||
{
|
|
||||||
ViewModel?.ServerSpeedtest(ESpeedActionType.Speedtest);
|
ViewModel?.ServerSpeedtest(ESpeedActionType.Speedtest);
|
||||||
}
|
break;
|
||||||
else if (e.Key == Key.E)
|
case Key.E:
|
||||||
{
|
|
||||||
ViewModel?.ServerSpeedtest(ESpeedActionType.Mixedtest);
|
ViewModel?.ServerSpeedtest(ESpeedActionType.Mixedtest);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -18,6 +18,17 @@ namespace v2rayN.Views
|
|||||||
public OptionSettingWindow()
|
public OptionSettingWindow()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
|
// 设置窗口的尺寸不大于屏幕的尺寸
|
||||||
|
if (this.Width > SystemParameters.WorkArea.Width)
|
||||||
|
{
|
||||||
|
this.Width = SystemParameters.WorkArea.Width;
|
||||||
|
}
|
||||||
|
if (this.Height > SystemParameters.WorkArea.Height)
|
||||||
|
{
|
||||||
|
this.Height = SystemParameters.WorkArea.Height;
|
||||||
|
}
|
||||||
|
|
||||||
this.Owner = Application.Current.MainWindow;
|
this.Owner = Application.Current.MainWindow;
|
||||||
_config = LazyConfig.Instance.GetConfig();
|
_config = LazyConfig.Instance.GetConfig();
|
||||||
|
|
||||||
@@ -78,7 +89,12 @@ namespace v2rayN.Views
|
|||||||
//fill fonts
|
//fill fonts
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var files = Directory.GetFiles(Utils.GetFontsPath(), "*.ttf");
|
string[] searchPatterns = { "*.ttf", "*.ttc" };
|
||||||
|
var files = new List<string>();
|
||||||
|
foreach (var pattern in searchPatterns)
|
||||||
|
{
|
||||||
|
files.AddRange(Directory.GetFiles(Utils.GetFontsPath(), pattern));
|
||||||
|
}
|
||||||
var culture = _config.uiItem.currentLanguage == Global.Languages[0] ? "zh-cn" : "en-us";
|
var culture = _config.uiItem.currentLanguage == Global.Languages[0] ? "zh-cn" : "en-us";
|
||||||
var culture2 = "en-us";
|
var culture2 = "en-us";
|
||||||
foreach (var ttf in files)
|
foreach (var ttf in files)
|
||||||
|
|||||||
@@ -12,6 +12,17 @@ namespace v2rayN.Views
|
|||||||
public RoutingRuleDetailsWindow(RulesItem rulesItem)
|
public RoutingRuleDetailsWindow(RulesItem rulesItem)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
|
// 设置窗口的尺寸不大于屏幕的尺寸
|
||||||
|
if (this.Width > SystemParameters.WorkArea.Width)
|
||||||
|
{
|
||||||
|
this.Width = SystemParameters.WorkArea.Width;
|
||||||
|
}
|
||||||
|
if (this.Height > SystemParameters.WorkArea.Height)
|
||||||
|
{
|
||||||
|
this.Height = SystemParameters.WorkArea.Height;
|
||||||
|
}
|
||||||
|
|
||||||
this.Owner = Application.Current.MainWindow;
|
this.Owner = Application.Current.MainWindow;
|
||||||
this.Loaded += Window_Loaded;
|
this.Loaded += Window_Loaded;
|
||||||
clbProtocol.SelectionChanged += ClbProtocol_SelectionChanged;
|
clbProtocol.SelectionChanged += ClbProtocol_SelectionChanged;
|
||||||
|
|||||||
@@ -13,6 +13,17 @@ namespace v2rayN.Views
|
|||||||
public RoutingRuleSettingWindow(RoutingItem routingItem)
|
public RoutingRuleSettingWindow(RoutingItem routingItem)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
|
// 设置窗口的尺寸不大于屏幕的尺寸
|
||||||
|
if (this.Width > SystemParameters.WorkArea.Width)
|
||||||
|
{
|
||||||
|
this.Width = SystemParameters.WorkArea.Width;
|
||||||
|
}
|
||||||
|
if (this.Height > SystemParameters.WorkArea.Height)
|
||||||
|
{
|
||||||
|
this.Height = SystemParameters.WorkArea.Height;
|
||||||
|
}
|
||||||
|
|
||||||
this.Owner = Application.Current.MainWindow;
|
this.Owner = Application.Current.MainWindow;
|
||||||
this.Loaded += Window_Loaded;
|
this.Loaded += Window_Loaded;
|
||||||
this.PreviewKeyDown += RoutingRuleSettingWindow_PreviewKeyDown;
|
this.PreviewKeyDown += RoutingRuleSettingWindow_PreviewKeyDown;
|
||||||
|
|||||||
@@ -12,6 +12,17 @@ namespace v2rayN.Views
|
|||||||
public RoutingSettingWindow()
|
public RoutingSettingWindow()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
|
// 设置窗口的尺寸不大于屏幕的尺寸
|
||||||
|
if (this.Width > SystemParameters.WorkArea.Width)
|
||||||
|
{
|
||||||
|
this.Width = SystemParameters.WorkArea.Width;
|
||||||
|
}
|
||||||
|
if (this.Height > SystemParameters.WorkArea.Height)
|
||||||
|
{
|
||||||
|
this.Height = SystemParameters.WorkArea.Height;
|
||||||
|
}
|
||||||
|
|
||||||
this.Owner = Application.Current.MainWindow;
|
this.Owner = Application.Current.MainWindow;
|
||||||
this.Closing += RoutingSettingWindow_Closing;
|
this.Closing += RoutingSettingWindow_Closing;
|
||||||
this.PreviewKeyDown += RoutingSettingWindow_PreviewKeyDown;
|
this.PreviewKeyDown += RoutingSettingWindow_PreviewKeyDown;
|
||||||
@@ -77,6 +88,11 @@ namespace v2rayN.Views
|
|||||||
|
|
||||||
private void RoutingSettingWindow_PreviewKeyDown(object sender, KeyEventArgs e)
|
private void RoutingSettingWindow_PreviewKeyDown(object sender, KeyEventArgs e)
|
||||||
{
|
{
|
||||||
|
if (ViewModel?.enableRoutingBasic ?? false)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl))
|
if (Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl))
|
||||||
{
|
{
|
||||||
if (e.Key == Key.A)
|
if (e.Key == Key.A)
|
||||||
|
|||||||
@@ -11,6 +11,17 @@ namespace v2rayN.Views
|
|||||||
public SubEditWindow(SubItem subItem)
|
public SubEditWindow(SubItem subItem)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
|
// 设置窗口的尺寸不大于屏幕的尺寸
|
||||||
|
if (this.Width > SystemParameters.WorkArea.Width)
|
||||||
|
{
|
||||||
|
this.Width = SystemParameters.WorkArea.Width;
|
||||||
|
}
|
||||||
|
if (this.Height > SystemParameters.WorkArea.Height)
|
||||||
|
{
|
||||||
|
this.Height = SystemParameters.WorkArea.Height;
|
||||||
|
}
|
||||||
|
|
||||||
this.Owner = Application.Current.MainWindow;
|
this.Owner = Application.Current.MainWindow;
|
||||||
this.Loaded += Window_Loaded;
|
this.Loaded += Window_Loaded;
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,17 @@ namespace v2rayN.Views
|
|||||||
public SubSettingWindow()
|
public SubSettingWindow()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
|
// 设置窗口的尺寸不大于屏幕的尺寸
|
||||||
|
if (this.Width > SystemParameters.WorkArea.Width)
|
||||||
|
{
|
||||||
|
this.Width = SystemParameters.WorkArea.Width;
|
||||||
|
}
|
||||||
|
if (this.Height > SystemParameters.WorkArea.Height)
|
||||||
|
{
|
||||||
|
this.Height = SystemParameters.WorkArea.Height;
|
||||||
|
}
|
||||||
|
|
||||||
this.Owner = Application.Current.MainWindow;
|
this.Owner = Application.Current.MainWindow;
|
||||||
|
|
||||||
ViewModel = new SubSettingViewModel(this);
|
ViewModel = new SubSettingViewModel(this);
|
||||||
|
|||||||
@@ -10,22 +10,22 @@
|
|||||||
<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.27</FileVersion>
|
<FileVersion>6.30</FileVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Downloader" Version="3.0.6" />
|
<PackageReference Include="Downloader" Version="3.0.6" />
|
||||||
<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.118" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
<PackageReference Include="QRCoder.Xaml" Version="1.4.3" />
|
<PackageReference Include="QRCoder.Xaml" Version="1.4.3" />
|
||||||
<PackageReference Include="sqlite-net-pcl" Version="1.8.116" />
|
<PackageReference Include="sqlite-net-pcl" Version="1.8.116" />
|
||||||
<PackageReference Include="TaskScheduler" Version="2.10.1" />
|
<PackageReference Include="TaskScheduler" Version="2.10.1" />
|
||||||
<PackageReference Include="ZXing.Net.Bindings.Windows.Compatibility" Version="0.16.12" />
|
<PackageReference Include="ZXing.Net.Bindings.Windows.Compatibility" Version="0.16.12" />
|
||||||
<PackageReference Include="ReactiveUI.Fody" Version="18.4.1" />
|
<PackageReference Include="ReactiveUI.Fody" Version="19.5.1" />
|
||||||
<PackageReference Include="ReactiveUI.Validation" Version="3.0.22" />
|
<PackageReference Include="ReactiveUI.Validation" Version="3.1.7" />
|
||||||
<PackageReference Include="ReactiveUI.WPF" Version="18.4.1" />
|
<PackageReference Include="ReactiveUI.WPF" Version="19.5.1" />
|
||||||
<PackageReference Include="Splat.NLog" Version="14.6.37" />
|
<PackageReference Include="Splat.NLog" Version="14.8.6" />
|
||||||
<PackageReference Include="System.Reactive" Version="6.0.0" />
|
<PackageReference Include="System.Reactive" Version="6.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
@@ -108,6 +108,9 @@
|
|||||||
<EmbeddedResource Update="Resx\ResUI.zh-Hans.resx">
|
<EmbeddedResource Update="Resx\ResUI.zh-Hans.resx">
|
||||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Update="Resx\ResUI.zh-Hant.resx">
|
||||||
|
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Update="Resx\ResUI.fa-Ir.resx">
|
<EmbeddedResource Update="Resx\ResUI.fa-Ir.resx">
|
||||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
|||||||
@@ -92,9 +92,9 @@ namespace v2rayUpgrade
|
|||||||
File.Move(Application.ExecutablePath, thisAppOldFile);
|
File.Move(Application.ExecutablePath, thisAppOldFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
string entryOuputPath = GetPath(fullName);
|
string entryOutputPath = GetPath(fullName);
|
||||||
Directory.CreateDirectory(Path.GetDirectoryName(entryOuputPath)!);
|
Directory.CreateDirectory(Path.GetDirectoryName(entryOutputPath)!);
|
||||||
entry.ExtractToFile(entryOuputPath, true);
|
entry.ExtractToFile(entryOutputPath, true);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user