Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2f0299a32d | |||
| 65a8bedb45 | |||
| d6e40fb7f5 | |||
| 4db65c2132 | |||
| 7f9ac74b86 | |||
| 1cb0ef2f72 | |||
| 8e8035af36 | |||
| 77aa28f46a | |||
| 62a2558174 | |||
| 45b6fe4d5a | |||
| 6b8b2d0b1b |
@@ -9,6 +9,10 @@ end_of_line = crlf
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.sh]
|
||||
end_of_line = lf
|
||||
indent_size = 2
|
||||
|
||||
[*.{yml,yaml}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
@@ -157,14 +161,14 @@ dotnet_naming_rule.non_field_members_should_be_pascal.symbols = non_field_member
|
||||
dotnet_naming_rule.non_field_members_should_be_pascal.style = pascal
|
||||
dotnet_naming_symbols.interface.applicable_kinds = interface
|
||||
dotnet_naming_symbols.interface.applicable_accessibilities = *
|
||||
dotnet_naming_symbols.interface.required_modifiers =
|
||||
dotnet_naming_symbols.interface.required_modifiers =
|
||||
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
|
||||
dotnet_naming_symbols.types.applicable_accessibilities = *
|
||||
dotnet_naming_symbols.types.required_modifiers =
|
||||
dotnet_naming_symbols.types.required_modifiers =
|
||||
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
|
||||
dotnet_naming_symbols.non_field_members.applicable_accessibilities = *
|
||||
dotnet_naming_symbols.non_field_members.required_modifiers =
|
||||
dotnet_naming_style.pascal.required_prefix =
|
||||
dotnet_naming_style.pascal.required_suffix =
|
||||
dotnet_naming_style.pascal.word_separator =
|
||||
dotnet_naming_style.pascal.capitalization = pascal_case
|
||||
dotnet_naming_symbols.non_field_members.required_modifiers =
|
||||
dotnet_naming_style.pascal.required_prefix =
|
||||
dotnet_naming_style.pascal.required_suffix =
|
||||
dotnet_naming_style.pascal.word_separator =
|
||||
dotnet_naming_style.pascal.capitalization = pascal_case
|
||||
|
||||
20
.github/workflows/build-linux.yml
vendored
20
.github/workflows/build-linux.yml
vendored
@@ -31,23 +31,23 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6.0.1
|
||||
uses: actions/checkout@v5.0.0
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
fetch-depth: '0'
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v5.0.1
|
||||
uses: actions/setup-dotnet@v5.0.0
|
||||
with:
|
||||
dotnet-version: '8.0.x'
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cd v2rayN
|
||||
dotnet publish ./v2rayN.Desktop/v2rayN.Desktop.csproj -c Release -r linux-x64 -p:SelfContained=true -o "$OutputPath64"
|
||||
dotnet publish ./v2rayN.Desktop/v2rayN.Desktop.csproj -c Release -r linux-arm64 -p:SelfContained=true -o "$OutputPathArm64"
|
||||
dotnet publish ./AmazTool/AmazTool.csproj -c Release -r linux-x64 -p:SelfContained=true -p:PublishTrimmed=true -o "$OutputPath64"
|
||||
dotnet publish ./AmazTool/AmazTool.csproj -c Release -r linux-arm64 -p:SelfContained=true -p:PublishTrimmed=true -o "$OutputPathArm64"
|
||||
dotnet publish ./v2rayN.Desktop/v2rayN.Desktop.csproj -c Release -r linux-x64 --self-contained=true -o "$OutputPath64"
|
||||
dotnet publish ./v2rayN.Desktop/v2rayN.Desktop.csproj -c Release -r linux-arm64 --self-contained=true -o "$OutputPathArm64"
|
||||
dotnet publish ./AmazTool/AmazTool.csproj -c Release -r linux-x64 --self-contained=true -p:PublishTrimmed=true -o "$OutputPath64"
|
||||
dotnet publish ./AmazTool/AmazTool.csproj -c Release -r linux-arm64 --self-contained=true -p:PublishTrimmed=true -o "$OutputPathArm64"
|
||||
|
||||
- name: Upload build artifacts
|
||||
uses: actions/upload-artifact@v5.0.0
|
||||
@@ -97,20 +97,20 @@ jobs:
|
||||
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/'))
|
||||
runs-on: ubuntu-24.04
|
||||
container:
|
||||
image: registry.access.redhat.com/ubi10/ubi
|
||||
image: quay.io/almalinuxorg/10-base:latest
|
||||
options: --platform=linux/amd64/v2
|
||||
env:
|
||||
RELEASE_TAG: ${{ github.event.inputs.release_tag != '' && github.event.inputs.release_tag || github.ref_name }}
|
||||
|
||||
steps:
|
||||
- name: Prepare tools (Red Hat)
|
||||
run: |
|
||||
dnf repolist all
|
||||
dnf -y makecache
|
||||
dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm
|
||||
dnf -y install epel-release
|
||||
dnf -y install sudo git rpm-build rpmdevtools dnf-plugins-core rsync findutils tar gzip unzip which
|
||||
|
||||
- name: Checkout repo (for scripts)
|
||||
uses: actions/checkout@v6.0.1
|
||||
uses: actions/checkout@v5.0.0
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
fetch-depth: '0'
|
||||
|
||||
12
.github/workflows/build-osx.yml
vendored
12
.github/workflows/build-osx.yml
vendored
@@ -26,23 +26,23 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6.0.1
|
||||
uses: actions/checkout@v5.0.0
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
fetch-depth: '0'
|
||||
|
||||
- name: Setup
|
||||
uses: actions/setup-dotnet@v5.0.1
|
||||
uses: actions/setup-dotnet@v5.0.0
|
||||
with:
|
||||
dotnet-version: '8.0.x'
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cd v2rayN
|
||||
dotnet publish ./v2rayN.Desktop/v2rayN.Desktop.csproj -c Release -r osx-x64 -p:SelfContained=true -o $OutputPath64
|
||||
dotnet publish ./v2rayN.Desktop/v2rayN.Desktop.csproj -c Release -r osx-arm64 -p:SelfContained=true -o $OutputPathArm64
|
||||
dotnet publish ./AmazTool/AmazTool.csproj -c Release -r osx-x64 -p:SelfContained=true -p:PublishTrimmed=true -o $OutputPath64
|
||||
dotnet publish ./AmazTool/AmazTool.csproj -c Release -r osx-arm64 -p:SelfContained=true -p:PublishTrimmed=true -o $OutputPathArm64
|
||||
dotnet publish ./v2rayN.Desktop/v2rayN.Desktop.csproj -c Release -r osx-x64 --self-contained=true -o $OutputPath64
|
||||
dotnet publish ./v2rayN.Desktop/v2rayN.Desktop.csproj -c Release -r osx-arm64 --self-contained=true -o $OutputPathArm64
|
||||
dotnet publish ./AmazTool/AmazTool.csproj -c Release -r osx-x64 --self-contained=true -p:PublishTrimmed=true -o $OutputPath64
|
||||
dotnet publish ./AmazTool/AmazTool.csproj -c Release -r osx-arm64 --self-contained=true -p:PublishTrimmed=true -o $OutputPathArm64
|
||||
|
||||
- name: Upload build artifacts
|
||||
uses: actions/upload-artifact@v5.0.0
|
||||
|
||||
12
.github/workflows/build-windows-desktop.yml
vendored
12
.github/workflows/build-windows-desktop.yml
vendored
@@ -26,23 +26,23 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6.0.1
|
||||
uses: actions/checkout@v5.0.0
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
fetch-depth: '0'
|
||||
|
||||
- name: Setup
|
||||
uses: actions/setup-dotnet@v5.0.1
|
||||
uses: actions/setup-dotnet@v5.0.0
|
||||
with:
|
||||
dotnet-version: '8.0.x'
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cd v2rayN
|
||||
dotnet publish ./v2rayN.Desktop/v2rayN.Desktop.csproj -c Release -r win-x64 -p:SelfContained=true -p:EnableWindowsTargeting=true -o $OutputPath64
|
||||
dotnet publish ./v2rayN.Desktop/v2rayN.Desktop.csproj -c Release -r win-arm64 -p:SelfContained=true -p:EnableWindowsTargeting=true -o $OutputPathArm64
|
||||
dotnet publish ./AmazTool/AmazTool.csproj -c Release -r win-x64 -p:SelfContained=true -p:EnableWindowsTargeting=true -p:PublishTrimmed=true -o $OutputPath64
|
||||
dotnet publish ./AmazTool/AmazTool.csproj -c Release -r win-arm64 -p:SelfContained=true -p:EnableWindowsTargeting=true -p:PublishTrimmed=true -o $OutputPathArm64
|
||||
dotnet publish ./v2rayN.Desktop/v2rayN.Desktop.csproj -c Release -r win-x64 --self-contained=true -p:EnableWindowsTargeting=true -o $OutputPath64
|
||||
dotnet publish ./v2rayN.Desktop/v2rayN.Desktop.csproj -c Release -r win-arm64 --self-contained=true -p:EnableWindowsTargeting=true -o $OutputPathArm64
|
||||
dotnet publish ./AmazTool/AmazTool.csproj -c Release -r win-x64 --self-contained=true -p:EnableWindowsTargeting=true -p:PublishTrimmed=true -o $OutputPath64
|
||||
dotnet publish ./AmazTool/AmazTool.csproj -c Release -r win-arm64 --self-contained=true -p:EnableWindowsTargeting=true -p:PublishTrimmed=true -o $OutputPathArm64
|
||||
|
||||
- name: Upload build artifacts
|
||||
uses: actions/upload-artifact@v5.0.0
|
||||
|
||||
18
.github/workflows/build-windows.yml
vendored
18
.github/workflows/build-windows.yml
vendored
@@ -27,22 +27,22 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v6.0.1
|
||||
uses: actions/checkout@v5.0.0
|
||||
|
||||
- name: Setup
|
||||
uses: actions/setup-dotnet@v5.0.1
|
||||
uses: actions/setup-dotnet@v5.0.0
|
||||
with:
|
||||
dotnet-version: '8.0.x'
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
cd v2rayN
|
||||
dotnet publish ./v2rayN/v2rayN.csproj -c Release -r win-x64 -p:SelfContained=false -p:EnableWindowsTargeting=true -o $OutputPath64
|
||||
dotnet publish ./v2rayN/v2rayN.csproj -c Release -r win-arm64 -p:SelfContained=false -p:EnableWindowsTargeting=true -o $OutputPathArm64
|
||||
dotnet publish ./v2rayN/v2rayN.csproj -c Release -r win-x64 -p:SelfContained=true -p:EnableWindowsTargeting=true -o $OutputPath64Sc
|
||||
dotnet publish ./AmazTool/AmazTool.csproj -c Release -r win-x64 -p:SelfContained=false -p:EnableWindowsTargeting=true -o $OutputPath64
|
||||
dotnet publish ./AmazTool/AmazTool.csproj -c Release -r win-arm64 -p:SelfContained=false -p:EnableWindowsTargeting=true -o $OutputPathArm64
|
||||
dotnet publish ./AmazTool/AmazTool.csproj -c Release -r win-x64 -p:SelfContained=true -p:EnableWindowsTargeting=true -p:PublishTrimmed=true -o $OutputPath64Sc
|
||||
dotnet publish ./v2rayN/v2rayN.csproj -c Release -r win-x64 --self-contained=false -p:EnableWindowsTargeting=true -o $OutputPath64
|
||||
dotnet publish ./v2rayN/v2rayN.csproj -c Release -r win-arm64 --self-contained=false -p:EnableWindowsTargeting=true -o $OutputPathArm64
|
||||
dotnet publish ./v2rayN/v2rayN.csproj -c Release -r win-x64 --self-contained=true -p:EnableWindowsTargeting=true -o $OutputPath64Sc
|
||||
dotnet publish ./AmazTool/AmazTool.csproj -c Release -r win-x64 --self-contained=false -p:EnableWindowsTargeting=true -o $OutputPath64
|
||||
dotnet publish ./AmazTool/AmazTool.csproj -c Release -r win-arm64 --self-contained=false -p:EnableWindowsTargeting=true -o $OutputPathArm64
|
||||
dotnet publish ./AmazTool/AmazTool.csproj -c Release -r win-x64 --self-contained=true -p:EnableWindowsTargeting=true -p:PublishTrimmed=true -o $OutputPath64Sc
|
||||
|
||||
|
||||
- name: Upload build artifacts
|
||||
@@ -68,4 +68,4 @@ jobs:
|
||||
file: ${{ github.workspace }}/v2rayN*.zip
|
||||
tag: ${{ github.event.inputs.release_tag }}
|
||||
file_glob: true
|
||||
prerelease: true
|
||||
prerelease: true
|
||||
47
package-debian-repo.sh
Executable file
47
package-debian-repo.sh
Executable file
@@ -0,0 +1,47 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# Root directory = the script's location
|
||||
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
|
||||
cd "$SCRIPT_DIR"
|
||||
|
||||
Version="$1"
|
||||
|
||||
PackagePath="v2rayn-unofficial-repo"
|
||||
mkdir -p "${PackagePath}/DEBIAN"
|
||||
mkdir -p "${PackagePath}"/etc/apt/{keyrings,sources.list.d}
|
||||
|
||||
curl -fsSLo "${PackagePath}/etc/apt/keyrings/v2rayn-unofficial.asc" "https://git.vlyaii.ru/api/packages/voronin9032/debian/repository.key"
|
||||
|
||||
# basic
|
||||
cat >"${PackagePath}/DEBIAN/control" <<-EOF
|
||||
Package: v2rayn-unofficial-repo
|
||||
Version: $Version
|
||||
Maintainer: Vlyaii <voronin9032n3@gmail.com>
|
||||
Homepage: https://git.vlyaii.ru/voronin9032/v2rayN
|
||||
Architecture: all
|
||||
Depends: ca-certificates
|
||||
Description: v2rayn-unofficial repository configuration
|
||||
EOF
|
||||
|
||||
cat >"${PackagePath}/etc/apt/sources.list.d/v2rayn-unofficial.sources" <<-EOF
|
||||
Types: deb
|
||||
URIs: https://git.vlyaii.ru/api/packages/voronin9032/debian
|
||||
Suites: debian
|
||||
Components: stable
|
||||
Architectures: amd64 all
|
||||
Signed-By: /etc/apt/keyrings/v2rayn-unofficial.asc
|
||||
EOF
|
||||
|
||||
# Patch
|
||||
# set owner to root:root
|
||||
sudo chown -R root:root "${PackagePath}"
|
||||
# set all directories to 755 (readable & traversable by all users)
|
||||
sudo find "${PackagePath}/etc" -type d -exec chmod 755 {} +
|
||||
# set all regular files to 644 (readable by all users)
|
||||
sudo find "${PackagePath}/etc" -type f -exec chmod 644 {} +
|
||||
# ensure main binaries are 755 (executable by all users)
|
||||
|
||||
# build deb package
|
||||
sudo dpkg-deb -Zzstd -z19 --build "$PackagePath"
|
||||
sudo mv "${PackagePath}.deb" "v2rayn-unofficial-repo_${Version}_all.deb"
|
||||
61
package-debian.sh
Normal file → Executable file
61
package-debian.sh
Normal file → Executable file
@@ -1,38 +1,58 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
Arch="$1"
|
||||
OutputPath="$2"
|
||||
Version="$3"
|
||||
# Root directory = the script's location
|
||||
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
|
||||
cd "$SCRIPT_DIR"
|
||||
source ./utils.sh
|
||||
|
||||
FileName="v2rayN-${Arch}.zip"
|
||||
wget -nv -O $FileName "https://github.com/2dust/v2rayN-core-bin/raw/refs/heads/master/$FileName"
|
||||
7z x $FileName
|
||||
cp -rf v2rayN-${Arch}/* $OutputPath
|
||||
Arch="linux-64"
|
||||
OutputPath="$(mktemp -d)"
|
||||
Version="$1"
|
||||
|
||||
PackagePath="v2rayN-Package-${Arch}"
|
||||
PROJ="./v2rayN/v2rayN.Desktop/v2rayN.Desktop.csproj"
|
||||
dotnet restore "$PROJ"
|
||||
sudo rm -rf "$(dirname "$PROJ")/bin/Release/net8.0"
|
||||
dotnet publish "${PROJ}" -c Release -r "linux-x64" --self-contained -p:StripSymbols=true -o "$OutputPath"
|
||||
PROJ="./v2rayN/AmazTool/AmazTool.csproj"
|
||||
dotnet restore "$PROJ"
|
||||
sudo rm -rf "$(dirname "$PROJ")/bin/Release/net8.0"
|
||||
dotnet publish "${PROJ}" -c Release -r "linux-x64" --self-contained -p:StripSymbols=true -p:PublishTrimmed=true -o "$OutputPath"
|
||||
|
||||
export RID_DIR="linux-x64"
|
||||
download_xray "$OutputPath/bin/xray"
|
||||
download_singbox "$OutputPath/bin/sing_box"
|
||||
download_geo_assets "$OutputPath"
|
||||
|
||||
PackagePath="v2rayn-unofficial"
|
||||
mkdir -p "${PackagePath}/DEBIAN"
|
||||
mkdir -p "${PackagePath}/opt"
|
||||
cp -rf $OutputPath "${PackagePath}/opt/v2rayN"
|
||||
echo "When this file exists, app will not store configs under this folder" > "${PackagePath}/opt/v2rayN/NotStoreConfigHere.txt"
|
||||
cp -rf "$OutputPath" "${PackagePath}/opt/v2rayN"
|
||||
echo "When this file exists, app will not store configs under this folder" >"${PackagePath}/opt/v2rayN/NotStoreConfigHere.txt"
|
||||
sudo find "${PackagePath}/opt/v2rayN" -type f -name "*.so" -exec strip {} +
|
||||
|
||||
if [ $Arch = "linux-64" ]; then
|
||||
Arch2="amd64"
|
||||
if [ "$Arch" = "linux-64" ]; then
|
||||
Arch2="amd64"
|
||||
else
|
||||
Arch2="arm64"
|
||||
Arch2="arm64"
|
||||
fi
|
||||
echo $Arch2
|
||||
|
||||
# basic
|
||||
cat >"${PackagePath}/DEBIAN/control" <<-EOF
|
||||
Package: v2rayN
|
||||
Package: v2rayn-unofficial
|
||||
Version: $Version
|
||||
Maintainer: Vlyaii <voronin9032n3@gmail.com>
|
||||
Homepage: https://git.vlyaii.ru/voronin9032/v2rayN
|
||||
Architecture: $Arch2
|
||||
Maintainer: https://github.com/2dust/v2rayN
|
||||
Depends: libc6 (>= 2.34), fontconfig (>= 2.13.1), desktop-file-utils (>= 0.26), xdg-utils (>= 1.1.3), coreutils (>= 8.32), bash (>= 5.1), libfreetype6 (>= 2.11)
|
||||
Replaces: v2rayn
|
||||
Depends: libc6 (>= 2.34), fontconfig (>= 2.13.1), desktop-file-utils (>= 0.26), xdg-utils (>= 1.1.3), coreutils (>= 8.32), bash (>= 5.1)
|
||||
Breaks: v2rayn
|
||||
Conflicts: v2rayn
|
||||
Description: A GUI client for Windows and Linux, support Xray core and sing-box-core and others
|
||||
EOF
|
||||
|
||||
cat >"${PackagePath}/DEBIAN/postinst" <<-EOF
|
||||
#!/bin/sh
|
||||
if [ ! -s /usr/share/applications/v2rayN.desktop ]; then
|
||||
cat >/usr/share/applications/v2rayN.desktop<<-END
|
||||
[Desktop Entry]
|
||||
@@ -65,5 +85,6 @@ sudo chmod 755 "${PackagePath}/opt/v2rayN/v2rayN" 2>/dev/null || true
|
||||
sudo chmod 755 "${PackagePath}/opt/v2rayN/AmazTool" 2>/dev/null || true
|
||||
|
||||
# build deb package
|
||||
sudo dpkg-deb -Zxz --build $PackagePath
|
||||
sudo mv "${PackagePath}.deb" "v2rayN-${Arch}.deb"
|
||||
sudo dpkg-deb -Zzstd -z19 --build "$PackagePath"
|
||||
sudo mv "${PackagePath}.deb" "v2rayn-unofficial_${Version}_${Arch2}.deb"
|
||||
sudo rm -rf "$OutputPath"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
Arch="$1"
|
||||
OutputPath="$2"
|
||||
@@ -13,7 +13,7 @@ PackagePath="v2rayN-Package-${Arch}"
|
||||
mkdir -p "$PackagePath/v2rayN.app/Contents/Resources"
|
||||
cp -rf "$OutputPath" "$PackagePath/v2rayN.app/Contents/MacOS"
|
||||
cp -f "$PackagePath/v2rayN.app/Contents/MacOS/v2rayN.icns" "$PackagePath/v2rayN.app/Contents/Resources/AppIcon.icns"
|
||||
echo "When this file exists, app will not store configs under this folder" > "$PackagePath/v2rayN.app/Contents/MacOS/NotStoreConfigHere.txt"
|
||||
echo "When this file exists, app will not store configs under this folder" >"$PackagePath/v2rayN.app/Contents/MacOS/NotStoreConfigHere.txt"
|
||||
chmod +x "$PackagePath/v2rayN.app/Contents/MacOS/v2rayN"
|
||||
|
||||
cat >"$PackagePath/v2rayN.app/Contents/Info.plist" <<-EOF
|
||||
@@ -43,18 +43,16 @@ cat >"$PackagePath/v2rayN.app/Contents/Info.plist" <<-EOF
|
||||
<true/>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<true/>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>12.7</string>
|
||||
</dict>
|
||||
</plist>
|
||||
EOF
|
||||
|
||||
create-dmg \
|
||||
--volname "v2rayN Installer" \
|
||||
--window-size 700 420 \
|
||||
--icon-size 100 \
|
||||
--icon "v2rayN.app" 160 185 \
|
||||
--hide-extension "v2rayN.app" \
|
||||
--app-drop-link 500 185 \
|
||||
"v2rayN-${Arch}.dmg" \
|
||||
"$PackagePath/v2rayN.app"
|
||||
--volname "v2rayN Installer" \
|
||||
--window-size 700 420 \
|
||||
--icon-size 100 \
|
||||
--icon "v2rayN.app" 160 185 \
|
||||
--hide-extension "v2rayN.app" \
|
||||
--app-drop-link 500 185 \
|
||||
"v2rayN-${Arch}.dmg" \
|
||||
"$PackagePath/v2rayN.app"
|
||||
|
||||
4
package-release-zip.sh
Normal file → Executable file
4
package-release-zip.sh
Normal file → Executable file
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
Arch="$1"
|
||||
OutputPath="$2"
|
||||
@@ -12,4 +12,4 @@ ZipPath64="./$OutputArch"
|
||||
mkdir $ZipPath64
|
||||
|
||||
cp -rf $OutputPath "$ZipPath64/$OutputArch"
|
||||
7z a -tZip $FileName "$ZipPath64/$OutputArch" -mx1
|
||||
7z a -tZip $FileName "$ZipPath64/$OutputArch" -mx1
|
||||
|
||||
668
package-rhel.sh
Normal file → Executable file
668
package-rhel.sh
Normal file → Executable file
@@ -1,18 +1,18 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
# == Require Red Hat Enterprise Linux/FedoraLinux/RockyLinux/AlmaLinux/CentOS OR Ubuntu/Debian ==
|
||||
# == Require Red Hat Enterprise Linux/FedoraLinux/RockyLinux/AlmaLinux/CentOS OR Ubuntu ==
|
||||
if [[ -r /etc/os-release ]]; then
|
||||
. /etc/os-release
|
||||
source /etc/os-release
|
||||
case "$ID" in
|
||||
rhel|rocky|almalinux|fedora|centos|ubuntu|debian)
|
||||
echo "[OK] Detected supported system: $NAME $VERSION_ID"
|
||||
;;
|
||||
*)
|
||||
echo "[ERROR] Unsupported system: $NAME ($ID)."
|
||||
echo "This script only supports Red Hat Enterprise Linux/RockyLinux/AlmaLinux/CentOS or Ubuntu/Debian."
|
||||
exit 1
|
||||
;;
|
||||
rhel | rocky | almalinux | fedora | centos | ubuntu)
|
||||
echo "[OK] Detected supported system: $NAME $VERSION_ID"
|
||||
;;
|
||||
*)
|
||||
echo "[ERROR] Unsupported system: $NAME ($ID)."
|
||||
echo "This script only supports Red Hat Enterprise Linux/RockyLinux/AlmaLinux/CentOS or Ubuntu."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
else
|
||||
echo "[ERROR] Cannot detect system (missing /etc/os-release)."
|
||||
@@ -37,12 +37,9 @@ fi
|
||||
echo "[OK] Kernel version >= ${MIN_KERNEL_MAJOR}.${MIN_KERNEL_MINOR}."
|
||||
|
||||
# ===== Config & Parse arguments =========================================================
|
||||
VERSION_ARG="${1:-}" # Pass version number like 7.13.8, or leave empty
|
||||
WITH_CORE="both" # Default: bundle both xray+sing-box
|
||||
AUTOSTART=0 # 1 = enable system-wide autostart (/etc/xdg/autostart)
|
||||
FORCE_NETCORE=0 # --netcore => skip archive bundle, use separate downloads
|
||||
ARCH_OVERRIDE="" # --arch x64|arm64|all (optional compile target)
|
||||
BUILD_FROM="" # --buildfrom 1|2|3 to select channel non-interactively
|
||||
VERSION_ARG="${1:-}" # Pass version number like 7.13.8, or leave empty
|
||||
WITH_CORE="both" # Default: bundle both xray+sing-box
|
||||
ARCH_OVERRIDE="" # --arch x64|arm64|all (optional compile target)
|
||||
|
||||
# If the first argument starts with --, do not treat it as a version number
|
||||
if [[ "${VERSION_ARG:-}" == --* ]]; then
|
||||
@@ -54,97 +51,86 @@ if [[ -n "${VERSION_ARG:-}" ]]; then shift || true; fi
|
||||
# Parse remaining optional arguments
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
--with-core) WITH_CORE="${2:-both}"; shift 2;;
|
||||
--autostart) AUTOSTART=1; shift;;
|
||||
--xray-ver) XRAY_VER="${2:-}"; shift 2;;
|
||||
--singbox-ver) SING_VER="${2:-}"; shift 2;;
|
||||
--netcore) FORCE_NETCORE=1; shift;;
|
||||
--arch) ARCH_OVERRIDE="${2:-}"; shift 2;;
|
||||
--buildfrom) BUILD_FROM="${2:-}"; shift 2;;
|
||||
*)
|
||||
if [[ -z "${VERSION_ARG:-}" ]]; then VERSION_ARG="$1"; fi
|
||||
shift;;
|
||||
--with-core)
|
||||
WITH_CORE="${2:-both}"
|
||||
shift 2
|
||||
;;
|
||||
--xray-ver)
|
||||
XRAY_VER="${2:-}"
|
||||
shift 2
|
||||
;;
|
||||
--singbox-ver)
|
||||
SING_VER="${2:-}"
|
||||
shift 2
|
||||
;;
|
||||
--arch)
|
||||
ARCH_OVERRIDE="${2:-}"
|
||||
shift 2
|
||||
;;
|
||||
--release)
|
||||
RPM_RELEASE="${2:-}"
|
||||
shift 2
|
||||
;;
|
||||
*)
|
||||
if [[ -z "${VERSION_ARG:-}" ]]; then VERSION_ARG="$1"; fi
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Conflict: version number AND --buildfrom cannot be used together
|
||||
if [[ -n "${VERSION_ARG:-}" && -n "${BUILD_FROM:-}" ]]; then
|
||||
echo "[ERROR] You cannot specify both an explicit version and --buildfrom at the same time."
|
||||
echo " Provide either a version (e.g. 7.14.0) OR --buildfrom 1|2|3."
|
||||
if [[ -z "${RPM_RELEASE:-}" ]]; then
|
||||
echo "--release is required"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# ===== Environment check + Dependencies ========================================
|
||||
host_arch="$(uname -m)"
|
||||
[[ "$host_arch" == "aarch64" || "$host_arch" == "x86_64" ]] || { echo "Only supports aarch64 / x86_64"; exit 1; }
|
||||
if ! [[ "$host_arch" == "aarch64" || "$host_arch" == "x86_64" ]]; then
|
||||
echo "Only supports aarch64 / x86_64"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
install_ok=0
|
||||
case "$ID" in
|
||||
# ------------------------------ RHEL family (UNCHANGED) ------------------------------
|
||||
rhel|rocky|almalinux|centos)
|
||||
if command -v dnf >/dev/null 2>&1; then
|
||||
sudo dnf -y install dotnet-sdk-8.0 rpm-build rpmdevtools curl unzip tar rsync || \
|
||||
# ------------------------------ RHEL family (UNCHANGED) ------------------------------
|
||||
rhel | rocky | almalinux | centos)
|
||||
if command -v dnf >/dev/null 2>&1; then
|
||||
sudo dnf -y install dotnet-sdk-8.0 rpm-build rpmdevtools curl unzip tar rsync ||
|
||||
sudo dnf -y install dotnet-sdk rpm-build rpmdevtools curl unzip tar rsync
|
||||
install_ok=1
|
||||
elif command -v yum >/dev/null 2>&1; then
|
||||
sudo yum -y install dotnet-sdk-8.0 rpm-build rpmdevtools curl unzip tar rsync || \
|
||||
install_ok=1
|
||||
elif command -v yum >/dev/null 2>&1; then
|
||||
sudo yum -y install dotnet-sdk-8.0 rpm-build rpmdevtools curl unzip tar rsync ||
|
||||
sudo yum -y install dotnet-sdk rpm-build rpmdevtools curl unzip tar rsync
|
||||
install_ok=1
|
||||
fi
|
||||
;;
|
||||
# ------------------------------ Ubuntu ----------------------------------------------
|
||||
ubuntu)
|
||||
sudo apt-get update
|
||||
# Ensure 'universe' (Ubuntu) to get 'rpm'
|
||||
if ! apt-cache policy | grep -q '^500 .*ubuntu.com/ubuntu.* universe'; then
|
||||
sudo apt-get -y install software-properties-common || true
|
||||
sudo add-apt-repository -y universe || true
|
||||
sudo apt-get update
|
||||
fi
|
||||
# Base tools + rpm (provides rpmbuild)
|
||||
sudo apt-get -y install curl unzip tar rsync rpm || true
|
||||
# Cross-arch binutils so strip matches target arch + objdump for brp scripts
|
||||
sudo apt-get -y install binutils binutils-x86-64-linux-gnu binutils-aarch64-linux-gnu || true
|
||||
# rpmbuild presence check
|
||||
if ! command -v rpmbuild >/dev/null 2>&1; then
|
||||
echo "[ERROR] 'rpmbuild' not found after installing 'rpm'."
|
||||
echo " Please ensure the 'rpm' package is available from your repos (universe on Ubuntu)."
|
||||
exit 1
|
||||
fi
|
||||
# .NET SDK 8 (best effort via apt)
|
||||
if ! command -v dotnet >/dev/null 2>&1; then
|
||||
sudo apt-get -y install dotnet-sdk-8.0 || true
|
||||
sudo apt-get -y install dotnet-sdk-8 || true
|
||||
sudo apt-get -y install dotnet-sdk || true
|
||||
fi
|
||||
install_ok=1
|
||||
;;
|
||||
# ------------------------------ Debian (KEEP, with local dotnet install) ------------
|
||||
debian)
|
||||
fi
|
||||
;;
|
||||
# ------------------------------ Ubuntu ----------------------------------------------
|
||||
ubuntu)
|
||||
sudo apt-get update
|
||||
# Ensure 'universe' (Ubuntu) to get 'rpm'
|
||||
if ! apt-cache policy | grep -q '^500 .*ubuntu.com/ubuntu.* universe'; then
|
||||
sudo apt-get -y install software-properties-common || true
|
||||
sudo add-apt-repository -y universe || true
|
||||
sudo apt-get update
|
||||
# Base tools + rpm (provides rpmbuild on Debian) + objdump/strip
|
||||
sudo apt-get -y install curl unzip tar rsync rpm binutils || true
|
||||
# rpmbuild presence check
|
||||
if ! command -v rpmbuild >/dev/null 2>&1; then
|
||||
echo "[ERROR] 'rpmbuild' not found after installing 'rpm'."
|
||||
echo " Please ensure 'rpm' is available from Debian repos."
|
||||
exit 1
|
||||
fi
|
||||
# Try apt for dotnet; fallback to official installer into $HOME/.dotnet
|
||||
if ! command -v dotnet >/dev/null 2>&1; then
|
||||
echo "[INFO] 'dotnet' not found. Installing .NET 8 SDK locally to \$HOME/.dotnet ..."
|
||||
tmp="$(mktemp -d)"; trap '[[ -n "${tmp:-}" ]] && rm -rf "$tmp"' RETURN
|
||||
curl -fsSL https://dot.net/v1/dotnet-install.sh -o "$tmp/dotnet-install.sh"
|
||||
bash "$tmp/dotnet-install.sh" --channel 8.0 --install-dir "$HOME/.dotnet"
|
||||
export PATH="$HOME/.dotnet:$HOME/.dotnet/tools:$PATH"
|
||||
export DOTNET_ROOT="$HOME/.dotnet"
|
||||
if ! command -v dotnet >/dev/null 2>&1; then
|
||||
echo "[ERROR] dotnet installation failed."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
install_ok=1
|
||||
;;
|
||||
fi
|
||||
# Base tools + rpm (provides rpmbuild)
|
||||
sudo apt-get -y install curl unzip tar rsync rpm || true
|
||||
# Cross-arch binutils so strip matches target arch + objdump for brp scripts
|
||||
sudo apt-get -y install binutils binutils-x86-64-linux-gnu binutils-aarch64-linux-gnu || true
|
||||
# rpmbuild presence check
|
||||
if ! command -v rpmbuild >/dev/null 2>&1; then
|
||||
echo "[ERROR] 'rpmbuild' not found after installing 'rpm'."
|
||||
echo " Please ensure the 'rpm' package is available from your repos (universe on Ubuntu)."
|
||||
exit 1
|
||||
fi
|
||||
# .NET SDK 8 (best effort via apt)
|
||||
if ! command -v dotnet >/dev/null 2>&1; then
|
||||
sudo apt-get -y install dotnet-sdk-8.0 || true
|
||||
sudo apt-get -y install dotnet-sdk-8 || true
|
||||
sudo apt-get -y install dotnet-sdk || true
|
||||
fi
|
||||
install_ok=1
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ "$install_ok" -ne 1 ]]; then
|
||||
@@ -158,6 +144,8 @@ command -v curl >/dev/null
|
||||
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
|
||||
cd "$SCRIPT_DIR"
|
||||
|
||||
source ./utils.sh
|
||||
|
||||
# Git submodules (best effort)
|
||||
if [[ -f .gitmodules ]]; then
|
||||
git submodule sync --recursive || true
|
||||
@@ -169,348 +157,16 @@ PROJECT="v2rayN.Desktop/v2rayN.Desktop.csproj"
|
||||
if [[ ! -f "$PROJECT" ]]; then
|
||||
PROJECT="$(find . -maxdepth 3 -name 'v2rayN.Desktop.csproj' | head -n1 || true)"
|
||||
fi
|
||||
[[ -f "$PROJECT" ]] || { echo "v2rayN.Desktop.csproj not found"; exit 1; }
|
||||
|
||||
# ===== Resolve GUI version & auto checkout ============================================
|
||||
VERSION=""
|
||||
|
||||
choose_channel() {
|
||||
# If --buildfrom provided, map it directly and skip interaction.
|
||||
if [[ -n "${BUILD_FROM:-}" ]]; then
|
||||
case "$BUILD_FROM" in
|
||||
1) echo "latest"; return 0;;
|
||||
2) echo "prerelease"; return 0;;
|
||||
3) echo "keep"; return 0;;
|
||||
*) echo "[ERROR] Invalid --buildfrom value: ${BUILD_FROM}. Use 1|2|3." >&2; exit 1;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Print menu to stderr and read from /dev/tty so stdout only carries the token.
|
||||
local ch="latest" sel=""
|
||||
if [[ -t 0 ]]; then
|
||||
echo "[?] Choose v2rayN release channel:" >&2
|
||||
echo " 1) Latest (stable) [default]" >&2
|
||||
echo " 2) Pre-release (preview)" >&2
|
||||
echo " 3) Keep current (do nothing)" >&2
|
||||
printf "Enter 1, 2 or 3 [default 1]: " >&2
|
||||
if read -r sel </dev/tty; then
|
||||
case "${sel:-}" in
|
||||
2) ch="prerelease" ;;
|
||||
3) ch="keep" ;;
|
||||
*) ch="latest" ;;
|
||||
esac
|
||||
else
|
||||
ch="latest"
|
||||
fi
|
||||
else
|
||||
ch="latest"
|
||||
fi
|
||||
echo "$ch"
|
||||
[[ -f "$PROJECT" ]] || {
|
||||
echo "v2rayN.Desktop.csproj not found"
|
||||
exit 1
|
||||
}
|
||||
|
||||
get_latest_tag_latest() {
|
||||
# Resolve /releases/latest → tag_name
|
||||
curl -fsSL "https://api.github.com/repos/2dust/v2rayN/releases/latest" \
|
||||
| grep -Eo '"tag_name":\s*"v?[^"]+"' \
|
||||
| head -n1 \
|
||||
| sed -E 's/.*"tag_name":\s*"v?([^"]+)".*/\1/'
|
||||
}
|
||||
|
||||
get_latest_tag_prerelease() {
|
||||
# Resolve newest prerelease=true tag; prefer jq, fallback to sed/grep (no awk)
|
||||
local json tag
|
||||
json="$(curl -fsSL "https://api.github.com/repos/2dust/v2rayN/releases?per_page=20")" || return 1
|
||||
|
||||
# 1) Use jq if present
|
||||
if command -v jq >/dev/null 2>&1; then
|
||||
tag="$(printf '%s' "$json" \
|
||||
| jq -r '[.[] | select(.prerelease==true)][0].tag_name' 2>/dev/null \
|
||||
| sed 's/^v//')" || true
|
||||
fi
|
||||
|
||||
# 2) Fallback to sed/grep only
|
||||
if [[ -z "${tag:-}" || "${tag:-}" == "null" ]]; then
|
||||
tag="$(printf '%s' "$json" \
|
||||
| tr '\n' ' ' \
|
||||
| sed 's/},[[:space:]]*{/\n/g' \
|
||||
| grep -m1 -E '"prerelease"[[:space:]]*:[[:space:]]*true' \
|
||||
| grep -Eo '"tag_name"[[:space:]]*:[[:space:]]*"v?[^"]+"' \
|
||||
| head -n1 \
|
||||
| sed -E 's/.*"tag_name"[[:space:]]*:[[:space:]]*"v?([^"]+)".*/\1/')" || true
|
||||
fi
|
||||
|
||||
[[ -n "${tag:-}" && "${tag:-}" != "null" ]] || return 1
|
||||
printf '%s\n' "$tag"
|
||||
}
|
||||
|
||||
git_try_checkout() {
|
||||
# Try a series of refs and checkout when found.
|
||||
local want="$1" ref=""
|
||||
if git rev-parse --git-dir >/dev/null 2>&1; then
|
||||
git fetch --tags --force --prune --depth=1 || true
|
||||
if git rev-parse "refs/tags/v${want}" >/dev/null 2>&1; then
|
||||
ref="v${want}"
|
||||
elif git rev-parse "refs/tags/${want}" >/dev/null 2>&1; then
|
||||
ref="${want}"
|
||||
elif git rev-parse --verify "${want}" >/dev/null 2>&1; then
|
||||
ref="${want}"
|
||||
fi
|
||||
if [[ -n "$ref" ]]; then
|
||||
echo "[OK] Found ref '${ref}', checking out..."
|
||||
git checkout -f "${ref}"
|
||||
if [[ -f .gitmodules ]]; then
|
||||
git submodule sync --recursive || true
|
||||
git submodule update --init --recursive || true
|
||||
fi
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
return 1
|
||||
}
|
||||
|
||||
if git rev-parse --git-dir >/dev/null 2>&1; then
|
||||
if [[ -n "${VERSION_ARG:-}" ]]; then
|
||||
echo "[*] Trying to switch v2rayN repo to version: ${VERSION_ARG}"
|
||||
if git_try_checkout "${VERSION_ARG#v}"; then
|
||||
VERSION="${VERSION_ARG#v}"
|
||||
else
|
||||
echo "[WARN] Tag '${VERSION_ARG}' not found."
|
||||
ch="$(choose_channel)"
|
||||
if [[ "$ch" == "keep" ]]; then
|
||||
echo "[*] Keep current repository state (no checkout)."
|
||||
if git describe --tags --abbrev=0 >/dev/null 2>&1; then
|
||||
VERSION="$(git describe --tags --abbrev=0)"
|
||||
else
|
||||
VERSION="0.0.0+git"
|
||||
fi
|
||||
VERSION="${VERSION#v}"
|
||||
else
|
||||
echo "[*] Resolving ${ch} tag from GitHub releases..."
|
||||
tag=""
|
||||
if [[ "$ch" == "prerelease" ]]; then
|
||||
tag="$(get_latest_tag_prerelease || true)"
|
||||
if [[ -z "$tag" ]]; then
|
||||
echo "[WARN] Failed to resolve prerelease tag, falling back to latest."
|
||||
tag="$(get_latest_tag_latest || true)"
|
||||
fi
|
||||
else
|
||||
tag="$(get_latest_tag_latest || true)"
|
||||
fi
|
||||
[[ -n "$tag" ]] || { echo "[ERROR] Failed to resolve latest tag for channel '${ch}'."; exit 1; }
|
||||
echo "[*] Latest tag for '${ch}': ${tag}"
|
||||
git_try_checkout "$tag" || { echo "[ERROR] Failed to checkout '${tag}'."; exit 1; }
|
||||
VERSION="${tag#v}"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
ch="$(choose_channel)"
|
||||
if [[ "$ch" == "keep" ]]; then
|
||||
echo "[*] Keep current repository state (no checkout)."
|
||||
if git describe --tags --abbrev=0 >/dev/null 2>&1; then
|
||||
VERSION="$(git describe --tags --abbrev=0)"
|
||||
else
|
||||
VERSION="0.0.0+git"
|
||||
fi
|
||||
VERSION="${VERSION#v}"
|
||||
else
|
||||
echo "[*] Resolving ${ch} tag from GitHub releases..."
|
||||
tag=""
|
||||
if [[ "$ch" == "prerelease" ]]; then
|
||||
tag="$(get_latest_tag_prerelease || true)"
|
||||
if [[ -z "$tag" ]]; then
|
||||
echo "[WARN] Failed to resolve prerelease tag, falling back to latest."
|
||||
tag="$(get_latest_tag_latest || true)"
|
||||
fi
|
||||
else
|
||||
tag="$(get_latest_tag_latest || true)"
|
||||
fi
|
||||
[[ -n "$tag" ]] || { echo "[ERROR] Failed to resolve latest tag for channel '${ch}'."; exit 1; }
|
||||
echo "[*] Latest tag for '${ch}': ${tag}"
|
||||
git_try_checkout "$tag" || { echo "[ERROR] Failed to checkout '${tag}'."; exit 1; }
|
||||
VERSION="${tag#v}"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "[WARN] Current directory is not a git repo; cannot checkout version. Proceeding on current tree."
|
||||
VERSION="${VERSION_ARG:-}"
|
||||
if [[ -z "$VERSION" ]]; then
|
||||
if git describe --tags --abbrev=0 >/dev/null 2>&1; then
|
||||
VERSION="$(git describe --tags --abbrev=0)"
|
||||
else
|
||||
VERSION="0.0.0+git"
|
||||
fi
|
||||
fi
|
||||
VERSION="${VERSION#v}"
|
||||
fi
|
||||
echo "[*] GUI version resolved as: ${VERSION}"
|
||||
|
||||
# ===== Helpers for core/rules download (use RID_DIR for arch sync) =====================
|
||||
download_xray() {
|
||||
# Download Xray core and install to outdir/xray
|
||||
local outdir="$1" ver="${XRAY_VER:-}" url tmp zipname="xray.zip"
|
||||
mkdir -p "$outdir"
|
||||
if [[ -n "${XRAY_VER:-}" ]]; then ver="${XRAY_VER}"; fi
|
||||
if [[ -z "$ver" ]]; then
|
||||
ver="$(curl -fsSL https://api.github.com/repos/XTLS/Xray-core/releases/latest \
|
||||
| grep -Eo '"tag_name":\s*"v[^"]+"' | sed -E 's/.*"v([^"]+)".*/\1/' | head -n1)" || true
|
||||
fi
|
||||
[[ -n "$ver" ]] || { echo "[xray] Failed to get version"; return 1; }
|
||||
if [[ "$RID_DIR" == "linux-arm64" ]]; then
|
||||
url="https://github.com/XTLS/Xray-core/releases/download/v${ver}/Xray-linux-arm64-v8a.zip"
|
||||
else
|
||||
url="https://github.com/XTLS/Xray-core/releases/download/v${ver}/Xray-linux-64.zip"
|
||||
fi
|
||||
echo "[+] Download xray: $url"
|
||||
tmp="$(mktemp -d)"; trap '[[ -n "${tmp:-}" ]] && rm -rf "$tmp"' RETURN
|
||||
curl -fL "$url" -o "$tmp/$zipname"
|
||||
unzip -q "$tmp/$zipname" -d "$tmp"
|
||||
install -Dm755 "$tmp/xray" "$outdir/xray"
|
||||
}
|
||||
|
||||
download_singbox() {
|
||||
# Download sing-box core and install to outdir/sing-box
|
||||
local outdir="$1" ver="${SING_VER:-}" url tmp tarname="singbox.tar.gz" bin
|
||||
mkdir -p "$outdir"
|
||||
if [[ -n "${SING_VER:-}" ]]; then ver="${SING_VER}"; fi
|
||||
if [[ -z "$ver" ]]; then
|
||||
ver="$(curl -fsSL https://api.github.com/repos/SagerNet/sing-box/releases/latest \
|
||||
| grep -Eo '"tag_name":\s*"v[^"]+"' | sed -E 's/.*"v([^"]+)".*/\1/' | head -n1)" || true
|
||||
fi
|
||||
[[ -n "$ver" ]] || { echo "[sing-box] Failed to get version"; return 1; }
|
||||
if [[ "$RID_DIR" == "linux-arm64" ]]; then
|
||||
url="https://github.com/SagerNet/sing-box/releases/download/v${ver}/sing-box-${ver}-linux-arm64.tar.gz"
|
||||
else
|
||||
url="https://github.com/SagerNet/sing-box/releases/download/v${ver}/sing-box-${ver}-linux-amd64.tar.gz"
|
||||
fi
|
||||
echo "[+] Download sing-box: $url"
|
||||
tmp="$(mktemp -d)"; trap '[[ -n "${tmp:-}" ]] && rm -rf "$tmp"' RETURN
|
||||
curl -fL "$url" -o "$tmp/$tarname"
|
||||
tar -C "$tmp" -xzf "$tmp/$tarname"
|
||||
bin="$(find "$tmp" -type f -name 'sing-box' | head -n1 || true)"
|
||||
[[ -n "$bin" ]] || { echo "[!] sing-box unpack failed"; return 1; }
|
||||
install -Dm755 "$bin" "$outdir/sing-box"
|
||||
}
|
||||
|
||||
# ---- NEW: download_mihomo (REQUIRED in --netcore mode) ----
|
||||
download_mihomo() {
|
||||
# Download mihomo into outroot/bin/mihomo/mihomo
|
||||
local outroot="$1"
|
||||
local url=""
|
||||
if [[ "$RID_DIR" == "linux-arm64" ]]; then
|
||||
url="https://raw.githubusercontent.com/2dust/v2rayN-core-bin/refs/heads/master/v2rayN-linux-arm64/bin/mihomo/mihomo"
|
||||
else
|
||||
url="https://raw.githubusercontent.com/2dust/v2rayN-core-bin/refs/heads/master/v2rayN-linux-64/bin/mihomo/mihomo"
|
||||
fi
|
||||
echo "[+] Download mihomo: $url"
|
||||
mkdir -p "$outroot/bin/mihomo"
|
||||
curl -fL "$url" -o "$outroot/bin/mihomo/mihomo"
|
||||
chmod +x "$outroot/bin/mihomo/mihomo" || true
|
||||
}
|
||||
|
||||
# Move geo files to a unified path: outroot/bin
|
||||
unify_geo_layout() {
|
||||
local outroot="$1"
|
||||
mkdir -p "$outroot/bin"
|
||||
local names=( \
|
||||
"geosite.dat" \
|
||||
"geoip.dat" \
|
||||
"geoip-only-cn-private.dat" \
|
||||
"Country.mmdb" \
|
||||
"geoip.metadb" \
|
||||
)
|
||||
for n in "${names[@]}"; do
|
||||
# If file exists under bin/xray/, move it up to bin/
|
||||
if [[ -f "$outroot/bin/xray/$n" ]]; then
|
||||
mv -f "$outroot/bin/xray/$n" "$outroot/bin/$n"
|
||||
fi
|
||||
# If file already in bin/, leave it as-is
|
||||
if [[ -f "$outroot/bin/$n" ]]; then
|
||||
:
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# Download geo/rule assets; then unify to bin/
|
||||
download_geo_assets() {
|
||||
local outroot="$1"
|
||||
local bin_dir="$outroot/bin"
|
||||
local srss_dir="$bin_dir/srss"
|
||||
mkdir -p "$bin_dir" "$srss_dir"
|
||||
|
||||
echo "[+] Download Xray Geo to ${bin_dir}"
|
||||
curl -fsSL -o "$bin_dir/geosite.dat" \
|
||||
"https://github.com/Loyalsoldier/V2ray-rules-dat/releases/latest/download/geosite.dat"
|
||||
curl -fsSL -o "$bin_dir/geoip.dat" \
|
||||
"https://github.com/Loyalsoldier/V2ray-rules-dat/releases/latest/download/geoip.dat"
|
||||
curl -fsSL -o "$bin_dir/geoip-only-cn-private.dat" \
|
||||
"https://raw.githubusercontent.com/Loyalsoldier/geoip/release/geoip-only-cn-private.dat"
|
||||
curl -fsSL -o "$bin_dir/Country.mmdb" \
|
||||
"https://raw.githubusercontent.com/Loyalsoldier/geoip/release/Country.mmdb"
|
||||
|
||||
echo "[+] Download sing-box rule DB & rule-sets"
|
||||
curl -fsSL -o "$bin_dir/geoip.metadb" \
|
||||
"https://github.com/MetaCubeX/meta-rules-dat/releases/latest/download/geoip.metadb" || true
|
||||
|
||||
for f in \
|
||||
geoip-private.srs geoip-cn.srs geoip-facebook.srs geoip-fastly.srs \
|
||||
geoip-google.srs geoip-netflix.srs geoip-telegram.srs geoip-twitter.srs; do
|
||||
curl -fsSL -o "$srss_dir/$f" \
|
||||
"https://raw.githubusercontent.com/2dust/sing-box-rules/rule-set-geoip/$f" || true
|
||||
done
|
||||
for f in \
|
||||
geosite-cn.srs geosite-gfw.srs geosite-google.srs geosite-greatfire.srs \
|
||||
geosite-geolocation-cn.srs geosite-category-ads-all.srs geosite-private.srs; do
|
||||
curl -fsSL -o "$srss_dir/$f" \
|
||||
"https://raw.githubusercontent.com/2dust/sing-box-rules/rule-set-geosite/$f" || true
|
||||
done
|
||||
|
||||
# Unify to bin/
|
||||
unify_geo_layout "$outroot"
|
||||
}
|
||||
|
||||
# Prefer the prebuilt v2rayN core bundle; then unify geo layout
|
||||
download_v2rayn_bundle() {
|
||||
local outroot="$1"
|
||||
local url=""
|
||||
if [[ "$RID_DIR" == "linux-arm64" ]]; then
|
||||
url="https://raw.githubusercontent.com/2dust/v2rayN-core-bin/refs/heads/master/v2rayN-linux-arm64.zip"
|
||||
else
|
||||
url="https://raw.githubusercontent.com/2dust/v2rayN-core-bin/refs/heads/master/v2rayN-linux-64.zip"
|
||||
fi
|
||||
echo "[+] Try v2rayN bundle archive: $url"
|
||||
local tmp zipname
|
||||
tmp="$(mktemp -d)"; zipname="$tmp/v2rayn.zip"
|
||||
curl -fL "$url" -o "$zipname" || { echo "[!] Bundle download failed"; return 1; }
|
||||
unzip -q "$zipname" -d "$tmp" || { echo "[!] Bundle unzip failed"; return 1; }
|
||||
|
||||
if [[ -d "$tmp/bin" ]]; then
|
||||
mkdir -p "$outroot/bin"
|
||||
rsync -a "$tmp/bin/" "$outroot/bin/"
|
||||
else
|
||||
rsync -a "$tmp/" "$outroot/"
|
||||
fi
|
||||
|
||||
rm -f "$outroot/v2rayn.zip" 2>/dev/null || true
|
||||
# keep mihomo
|
||||
# find "$outroot" -type d -name "mihomo" -prune -exec rm -rf {} + 2>/dev/null || true
|
||||
|
||||
local nested_dir
|
||||
nested_dir="$(find "$outroot" -maxdepth 1 -type d -name 'v2rayN-linux-*' | head -n1 || true)"
|
||||
if [[ -n "${nested_dir:-}" && -d "$nested_dir/bin" ]]; then
|
||||
mkdir -p "$outroot/bin"
|
||||
rsync -a "$nested_dir/bin/" "$outroot/bin/"
|
||||
rm -rf "$nested_dir"
|
||||
fi
|
||||
|
||||
# Unify to bin/
|
||||
unify_geo_layout "$outroot"
|
||||
|
||||
echo "[+] Bundle extracted to $outroot"
|
||||
}
|
||||
VERSION="$VERSION_ARG"
|
||||
|
||||
# ===== Build results collection for --arch all ========================================
|
||||
BUILT_RPMS=() # Will collect absolute paths of built RPMs
|
||||
BUILT_ALL=0 # Flag to know if we should print the final summary
|
||||
BUILT_RPMS=() # Will collect absolute paths of built RPMs
|
||||
BUILT_ALL=0 # Flag to know if we should print the final summary
|
||||
|
||||
# ===== Build (single-arch) function ====================================================
|
||||
build_for_arch() {
|
||||
@@ -518,29 +174,41 @@ build_for_arch() {
|
||||
local short="$1"
|
||||
local rid rpm_target archdir
|
||||
case "$short" in
|
||||
x64) rid="linux-x64"; rpm_target="x86_64"; archdir="x86_64" ;;
|
||||
arm64) rid="linux-arm64"; rpm_target="aarch64"; archdir="aarch64" ;;
|
||||
*) echo "[ERROR] Unknown arch '$short' (use x64|arm64)"; return 1;;
|
||||
x64)
|
||||
rid="linux-x64"
|
||||
rpm_target="x86_64"
|
||||
archdir="x86_64"
|
||||
;;
|
||||
arm64)
|
||||
rid="linux-arm64"
|
||||
rpm_target="aarch64"
|
||||
archdir="aarch64"
|
||||
;;
|
||||
*)
|
||||
echo "[ERROR] Unknown arch '$short' (use x64|arm64)"
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "[*] Building for target: $short (RID=$rid, RPM --target $rpm_target)"
|
||||
|
||||
# .NET publish (self-contained) for this RID
|
||||
dotnet clean "$PROJECT" -c Release
|
||||
rm -rf "$(dirname "$PROJECT")/bin/Release/net8.0" || true
|
||||
|
||||
dotnet restore "$PROJECT"
|
||||
rm -rf "$(dirname "$PROJECT")/bin/Release/net8.0" || true
|
||||
dotnet publish "$PROJECT" \
|
||||
-c Release -r "$rid" \
|
||||
--sc \
|
||||
-p:PublishSingleFile=false \
|
||||
-p:SelfContained=true \
|
||||
-p:IncludeNativeLibrariesForSelfExtract=true
|
||||
-p:IncludeNativeLibrariesForSelfExtract=true \
|
||||
-p:StripSymbols=true
|
||||
|
||||
# Per-arch variables (scoped)
|
||||
local RID_DIR="$rid"
|
||||
local PUBDIR
|
||||
PUBDIR="$(dirname "$PROJECT")/bin/Release/net8.0/${RID_DIR}/publish"
|
||||
[[ -d "$PUBDIR" ]]
|
||||
sudo find "$PUBDIR" -type f -name "*.so" -exec strip {} +
|
||||
|
||||
# Make RID_DIR visible to download helpers (they read this var)
|
||||
export RID_DIR
|
||||
@@ -580,31 +248,13 @@ build_for_arch() {
|
||||
mkdir -p "$WORKDIR/$PKGROOT/bin/xray" "$WORKDIR/$PKGROOT/bin/sing_box"
|
||||
|
||||
# Bundle / cores per-arch
|
||||
if [[ "$FORCE_NETCORE" -eq 0 ]]; then
|
||||
if download_v2rayn_bundle "$WORKDIR/$PKGROOT"; then
|
||||
echo "[*] Using v2rayN bundle archive."
|
||||
else
|
||||
echo "[*] Bundle failed, fallback to separate core + rules."
|
||||
if [[ "$WITH_CORE" == "xray" || "$WITH_CORE" == "both" ]]; then
|
||||
download_xray "$WORKDIR/$PKGROOT/bin/xray" || echo "[!] xray download failed (skipped)"
|
||||
fi
|
||||
if [[ "$WITH_CORE" == "sing-box" || "$WITH_CORE" == "both" ]]; then
|
||||
download_singbox "$WORKDIR/$PKGROOT/bin/sing_box" || echo "[!] sing-box download failed (skipped)"
|
||||
fi
|
||||
download_geo_assets "$WORKDIR/$PKGROOT" || echo "[!] Geo rules download failed (skipped)"
|
||||
fi
|
||||
else
|
||||
echo "[*] --netcore specified: use separate core + rules."
|
||||
if [[ "$WITH_CORE" == "xray" || "$WITH_CORE" == "both" ]]; then
|
||||
download_xray "$WORKDIR/$PKGROOT/bin/xray" || echo "[!] xray download failed (skipped)"
|
||||
fi
|
||||
if [[ "$WITH_CORE" == "sing-box" || "$WITH_CORE" == "both" ]]; then
|
||||
download_singbox "$WORKDIR/$PKGROOT/bin/sing_box" || echo "[!] sing-box download failed (skipped)"
|
||||
fi
|
||||
download_geo_assets "$WORKDIR/$PKGROOT" || echo "[!] Geo rules download failed (skipped)"
|
||||
# ---- REQUIRED: always fetch mihomo in netcore mode, per-arch ----
|
||||
download_mihomo "$WORKDIR/$PKGROOT" || echo "[!] mihomo download failed (skipped)"
|
||||
if [[ "$WITH_CORE" == "xray" || "$WITH_CORE" == "both" ]]; then
|
||||
download_xray "$WORKDIR/$PKGROOT/bin/xray" || echo "[!] xray download failed (skipped)"
|
||||
fi
|
||||
if [[ "$WITH_CORE" == "sing-box" || "$WITH_CORE" == "both" ]]; then
|
||||
download_singbox "$WORKDIR/$PKGROOT/bin/sing_box" || echo "[!] sing-box download failed (skipped)"
|
||||
fi
|
||||
download_geo_assets "$WORKDIR/$PKGROOT" || echo "[!] Geo rules download failed (skipped)"
|
||||
|
||||
# Tarball
|
||||
mkdir -p "$SOURCEDIR"
|
||||
@@ -613,32 +263,34 @@ build_for_arch() {
|
||||
# SPEC
|
||||
local SPECFILE="$SPECDIR/v2rayN.spec"
|
||||
mkdir -p "$SPECDIR"
|
||||
cat > "$SPECFILE" <<'SPEC'
|
||||
cat >"$SPECFILE" <<'SPEC'
|
||||
%global debug_package %{nil}
|
||||
%undefine _debuginfo_subpackages
|
||||
%undefine _debugsource_packages
|
||||
# Ignore outdated LTTng dependencies incorrectly reported by the .NET runtime (to avoid installation failures)
|
||||
%global __requires_exclude ^liblttng-ust\.so\..*$
|
||||
|
||||
Name: v2rayN
|
||||
Name: v2rayn-unofficial
|
||||
Version: __VERSION__
|
||||
Release: 1%{?dist}
|
||||
Release: __RELEASE__
|
||||
Summary: v2rayN (Avalonia) GUI client for Linux (x86_64/aarch64)
|
||||
License: GPL-3.0-only
|
||||
URL: https://github.com/2dust/v2rayN
|
||||
URL: https://git.vlyaii.ru/voronin9032/v2rayN
|
||||
BugURL: https://github.com/2dust/v2rayN/issues
|
||||
ExclusiveArch: aarch64 x86_64
|
||||
Source0: __PKGROOT__.tar.gz
|
||||
|
||||
# Runtime dependencies (Avalonia / X11 / Fonts / GL)
|
||||
Requires: cairo, pango, openssl, mesa-libEGL, mesa-libGL
|
||||
Requires: freetype, cairo, pango, openssl, mesa-libEGL, mesa-libGL
|
||||
Requires: glibc >= 2.34
|
||||
Requires: fontconfig >= 2.13.1
|
||||
Requires: desktop-file-utils >= 0.26
|
||||
Requires: xdg-utils >= 1.1.3
|
||||
Requires: coreutils >= 8.32
|
||||
Requires: bash >= 5.1
|
||||
Requires: freetype >= 2.10
|
||||
|
||||
Conflicts: v2rayN
|
||||
Obsoletes: v2rayN
|
||||
|
||||
%description
|
||||
v2rayN Linux for Red Hat Enterprise Linux
|
||||
@@ -712,41 +364,9 @@ fi
|
||||
%{_datadir}/icons/hicolor/256x256/apps/v2rayn.png
|
||||
SPEC
|
||||
|
||||
# Autostart injection (inside %install) and %files entry
|
||||
if [[ "$AUTOSTART" -eq 1 ]]; then
|
||||
awk '
|
||||
BEGIN{ins=0}
|
||||
/^%post$/ && !ins {
|
||||
print "# --- Autostart (.desktop) ---"
|
||||
print "install -dm0755 %{buildroot}/etc/xdg/autostart"
|
||||
print "cat > %{buildroot}/etc/xdg/autostart/v2rayn.desktop << '\''EOF'\''"
|
||||
print "[Desktop Entry]"
|
||||
print "Type=Application"
|
||||
print "Name=v2rayN (Autostart)"
|
||||
print "Exec=v2rayn"
|
||||
print "X-GNOME-Autostart-enabled=true"
|
||||
print "NoDisplay=false"
|
||||
print "EOF"
|
||||
ins=1
|
||||
}
|
||||
{print}
|
||||
' "$SPECFILE" > "${SPECFILE}.tmp" && mv "${SPECFILE}.tmp" "$SPECFILE"
|
||||
|
||||
awk '
|
||||
BEGIN{infiles=0; done=0}
|
||||
/^%files$/ {infiles=1}
|
||||
infiles && done==0 && $0 ~ /%{_datadir}\/icons\/hicolor\/256x256\/apps\/v2rayn\.png/ {
|
||||
print
|
||||
print "%config(noreplace) /etc/xdg/autostart/v2rayn.desktop"
|
||||
done=1
|
||||
next
|
||||
}
|
||||
{print}
|
||||
' "$SPECFILE" > "${SPECFILE}.tmp" && mv "${SPECFILE}.tmp" "$SPECFILE"
|
||||
fi
|
||||
|
||||
# Replace placeholders
|
||||
sed -i "s/__VERSION__/${VERSION}/g" "$SPECFILE"
|
||||
sed -i "s/__RELEASE__/${RPM_RELEASE}/g" "$SPECFILE"
|
||||
sed -i "s/__PKGROOT__/${PKGROOT}/g" "$SPECFILE"
|
||||
|
||||
# ----- Select proper 'strip' per target arch on Ubuntu only (cross-binutils) -----
|
||||
@@ -761,7 +381,7 @@ SPEC
|
||||
STRIP_BIN="/usr/bin/aarch64-linux-gnu-strip"
|
||||
fi
|
||||
if [[ -x "$STRIP_BIN" ]]; then
|
||||
STRIP_ARGS=( --define "__strip $STRIP_BIN" )
|
||||
STRIP_ARGS=(--define "__strip $STRIP_BIN")
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -781,7 +401,7 @@ SPEC
|
||||
|
||||
echo "Build done for $short. RPM at:"
|
||||
local f
|
||||
for f in "${TOPDIR}/RPMS/${archdir}/v2rayN-${VERSION}-1"*.rpm; do
|
||||
for f in "${TOPDIR}/RPMS/${archdir}/v2rayN-${VERSION}-${RPM_RELEASE}"*.rpm; do
|
||||
[[ -e "$f" ]] || continue
|
||||
echo " $f"
|
||||
BUILT_RPMS+=("$f")
|
||||
@@ -790,30 +410,30 @@ SPEC
|
||||
|
||||
# ===== Arch selection and build orchestration =========================================
|
||||
case "${ARCH_OVERRIDE:-}" in
|
||||
"")
|
||||
# No --arch: use host architecture
|
||||
if [[ "$host_arch" == "aarch64" ]]; then
|
||||
build_for_arch arm64
|
||||
else
|
||||
build_for_arch x64
|
||||
fi
|
||||
;;
|
||||
x64|amd64)
|
||||
build_for_arch x64
|
||||
;;
|
||||
arm64|aarch64)
|
||||
"")
|
||||
# No --arch: use host architecture
|
||||
if [[ "$host_arch" == "aarch64" ]]; then
|
||||
build_for_arch arm64
|
||||
;;
|
||||
all)
|
||||
BUILT_ALL=1
|
||||
# Build x64 and arm64 separately; each package contains its own arch-only binaries.
|
||||
else
|
||||
build_for_arch x64
|
||||
build_for_arch arm64
|
||||
;;
|
||||
*)
|
||||
echo "[ERROR] Unknown --arch '${ARCH_OVERRIDE}'. Use x64|arm64|all."
|
||||
exit 1
|
||||
;;
|
||||
fi
|
||||
;;
|
||||
x64 | amd64)
|
||||
build_for_arch x64
|
||||
;;
|
||||
arm64 | aarch64)
|
||||
build_for_arch arm64
|
||||
;;
|
||||
all)
|
||||
BUILT_ALL=1
|
||||
# Build x64 and arm64 separately; each package contains its own arch-only binaries.
|
||||
build_for_arch x64
|
||||
build_for_arch arm64
|
||||
;;
|
||||
*)
|
||||
echo "[ERROR] Unknown --arch '${ARCH_OVERRIDE}'. Use x64|arm64|all."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
# ===== Final summary if building both arches ==========================================
|
||||
|
||||
120
utils.sh
Normal file
120
utils.sh
Normal file
@@ -0,0 +1,120 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
download_xray() {
|
||||
# Download Xray core and install to outdir/xray
|
||||
local outdir="$1" ver="${XRAY_VER:-}" url tmp zipname="xray.zip"
|
||||
mkdir -p "$outdir"
|
||||
if [[ -n "${XRAY_VER:-}" ]]; then ver="${XRAY_VER}"; fi
|
||||
if [[ -z "$ver" ]]; then
|
||||
echo "Downloading latest xray"
|
||||
ver="$(curl -fsSL https://api.github.com/repos/XTLS/Xray-core/releases/latest |
|
||||
grep -Eo '"tag_name":\s*"v[^"]+"' | sed -E 's/.*"v([^"]+)".*/\1/' | head -n1)" || true
|
||||
fi
|
||||
if [[ -z "$ver" ]]; then
|
||||
echo "[xray] Failed to get version"
|
||||
return 1
|
||||
fi
|
||||
if [[ "$RID_DIR" == "linux-arm64" ]]; then
|
||||
url="https://github.com/XTLS/Xray-core/releases/download/v${ver}/Xray-linux-arm64-v8a.zip"
|
||||
else
|
||||
url="https://github.com/XTLS/Xray-core/releases/download/v${ver}/Xray-linux-64.zip"
|
||||
fi
|
||||
echo "[+] Download xray: $url"
|
||||
tmp="$(mktemp -d)"
|
||||
trap '[[ -n "${tmp:-}" ]] && rm -rf "$tmp"' RETURN
|
||||
curl -fL "$url" -o "$tmp/$zipname"
|
||||
unzip -q "$tmp/$zipname" -d "$tmp"
|
||||
install -Dm755 "$tmp/xray" "$outdir/xray"
|
||||
}
|
||||
|
||||
download_singbox() {
|
||||
# Download sing-box core and install to outdir/sing-box
|
||||
local outdir="$1" ver="${SING_VER:-}" url tmp tarname="singbox.tar.gz" bin
|
||||
mkdir -p "$outdir"
|
||||
if [[ -n "${SING_VER:-}" ]]; then ver="${SING_VER}"; fi
|
||||
if [[ -z "$ver" ]]; then
|
||||
echo "Downloading latest sing-box"
|
||||
ver="$(curl -fsSL https://api.github.com/repos/SagerNet/sing-box/releases/latest |
|
||||
grep -Eo '"tag_name":\s*"v[^"]+"' | sed -E 's/.*"v([^"]+)".*/\1/' | head -n1)" || true
|
||||
fi
|
||||
if [[ -z "$ver" ]]; then
|
||||
echo "[sing-box] Failed to get version"
|
||||
return 1
|
||||
fi
|
||||
if [[ "$RID_DIR" == "linux-arm64" ]]; then
|
||||
url="https://github.com/SagerNet/sing-box/releases/download/v${ver}/sing-box-${ver}-linux-arm64.tar.gz"
|
||||
else
|
||||
url="https://github.com/SagerNet/sing-box/releases/download/v${ver}/sing-box-${ver}-linux-amd64.tar.gz"
|
||||
fi
|
||||
echo "[+] Download sing-box: $url"
|
||||
tmp="$(mktemp -d)"
|
||||
trap '[[ -n "${tmp:-}" ]] && rm -rf "$tmp"' RETURN
|
||||
curl -fL "$url" -o "$tmp/$tarname"
|
||||
tar -C "$tmp" -xzf "$tmp/$tarname"
|
||||
bin="$(find "$tmp" -type f -name 'sing-box' | head -n1 || true)"
|
||||
[[ -n "$bin" ]] || {
|
||||
echo "[!] sing-box unpack failed"
|
||||
return 1
|
||||
}
|
||||
install -Dm755 "$bin" "$outdir/sing-box"
|
||||
}
|
||||
|
||||
# Move geo files to a unified path: outroot/bin
|
||||
unify_geo_layout() {
|
||||
local outroot="$1"
|
||||
mkdir -p "$outroot/bin"
|
||||
local names=(
|
||||
"geosite.dat"
|
||||
"geoip.dat"
|
||||
"geoip-only-cn-private.dat"
|
||||
"Country.mmdb"
|
||||
"geoip.metadb"
|
||||
)
|
||||
for n in "${names[@]}"; do
|
||||
# If file exists under bin/xray/, move it up to bin/
|
||||
if [[ -f "$outroot/bin/xray/$n" ]]; then
|
||||
mv -f "$outroot/bin/xray/$n" "$outroot/bin/$n"
|
||||
fi
|
||||
# If file already in bin/, leave it as-is
|
||||
if [[ -f "$outroot/bin/$n" ]]; then
|
||||
:
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# Download geo/rule assets; then unify to bin/
|
||||
download_geo_assets() {
|
||||
local outroot="$1"
|
||||
local bin_dir="$outroot/bin"
|
||||
local srss_dir="$bin_dir/srss"
|
||||
mkdir -p "$bin_dir" "$srss_dir"
|
||||
echo "[+] Download Xray Geo to ${bin_dir}"
|
||||
curl -fsSL -o "$bin_dir/geosite.dat" \
|
||||
"https://github.com/Loyalsoldier/V2ray-rules-dat/releases/latest/download/geosite.dat"
|
||||
curl -fsSL -o "$bin_dir/geoip.dat" \
|
||||
"https://github.com/Loyalsoldier/V2ray-rules-dat/releases/latest/download/geoip.dat"
|
||||
curl -fsSL -o "$bin_dir/geoip-only-cn-private.dat" \
|
||||
"https://raw.githubusercontent.com/Loyalsoldier/geoip/release/geoip-only-cn-private.dat"
|
||||
curl -fsSL -o "$bin_dir/Country.mmdb" \
|
||||
"https://raw.githubusercontent.com/Loyalsoldier/geoip/release/Country.mmdb"
|
||||
|
||||
echo "[+] Download sing-box rule DB & rule-sets"
|
||||
curl -fsSL -o "$bin_dir/geoip.metadb" \
|
||||
"https://github.com/MetaCubeX/meta-rules-dat/releases/latest/download/geoip.metadb" || true
|
||||
|
||||
for f in \
|
||||
geoip-private.srs geoip-cn.srs geoip-facebook.srs geoip-fastly.srs \
|
||||
geoip-google.srs geoip-netflix.srs geoip-telegram.srs geoip-twitter.srs; do
|
||||
curl -fsSL -o "$srss_dir/$f" \
|
||||
"https://raw.githubusercontent.com/2dust/sing-box-rules/rule-set-geoip/$f" || true
|
||||
done
|
||||
for f in \
|
||||
geosite-cn.srs geosite-gfw.srs geosite-greatfire.srs \
|
||||
geosite-geolocation-cn.srs geosite-category-ads-all.srs geosite-private.srs; do
|
||||
curl -fsSL -o "$srss_dir/$f" \
|
||||
"https://raw.githubusercontent.com/2dust/sing-box-rules/rule-set-geosite/$f" || true
|
||||
done
|
||||
|
||||
# Unify to bin/
|
||||
unify_geo_layout "$outroot"
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project>
|
||||
|
||||
<PropertyGroup>
|
||||
<Version>7.16.6</Version>
|
||||
<Version>7.16.1</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
||||
@@ -6,23 +6,23 @@
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageVersion Include="Avalonia.AvaloniaEdit" Version="11.3.0" />
|
||||
<PackageVersion Include="Avalonia.Controls.DataGrid" Version="11.3.9" />
|
||||
<PackageVersion Include="Avalonia.Desktop" Version="11.3.9" />
|
||||
<PackageVersion Include="Avalonia.Diagnostics" Version="11.3.9" />
|
||||
<PackageVersion Include="Avalonia.Controls.DataGrid" Version="11.3.8" />
|
||||
<PackageVersion Include="Avalonia.Desktop" Version="11.3.8" />
|
||||
<PackageVersion Include="Avalonia.Diagnostics" Version="11.3.8" />
|
||||
<PackageVersion Include="ReactiveUI.Avalonia" Version="11.3.8" />
|
||||
<PackageVersion Include="CliWrap" Version="3.10.0" />
|
||||
<PackageVersion Include="CliWrap" Version="3.9.0" />
|
||||
<PackageVersion Include="Downloader" Version="4.0.3" />
|
||||
<PackageVersion Include="H.NotifyIcon.Wpf" Version="2.4.1" />
|
||||
<PackageVersion Include="H.NotifyIcon.Wpf" Version="2.3.2" />
|
||||
<PackageVersion Include="MaterialDesignThemes" Version="5.3.0" />
|
||||
<PackageVersion Include="MessageBox.Avalonia" Version="3.3.0" />
|
||||
<PackageVersion Include="QRCoder" Version="1.7.0" />
|
||||
<PackageVersion Include="ReactiveUI" Version="22.3.1" />
|
||||
<PackageVersion Include="ReactiveUI" Version="22.2.1" />
|
||||
<PackageVersion Include="ReactiveUI.Fody" Version="19.5.41" />
|
||||
<PackageVersion Include="ReactiveUI.WPF" Version="22.3.1" />
|
||||
<PackageVersion Include="Semi.Avalonia" Version="11.3.7.1" />
|
||||
<PackageVersion Include="ReactiveUI.WPF" Version="22.2.1" />
|
||||
<PackageVersion Include="Semi.Avalonia" Version="11.3.7" />
|
||||
<PackageVersion Include="Semi.Avalonia.AvaloniaEdit" Version="11.2.0.1" />
|
||||
<PackageVersion Include="Semi.Avalonia.DataGrid" Version="11.3.7.1" />
|
||||
<PackageVersion Include="NLog" Version="6.0.6" />
|
||||
<PackageVersion Include="Semi.Avalonia.DataGrid" Version="11.3.7" />
|
||||
<PackageVersion Include="NLog" Version="6.0.5" />
|
||||
<PackageVersion Include="sqlite-net-pcl" Version="1.9.172" />
|
||||
<PackageVersion Include="TaskScheduler" Version="2.12.2" />
|
||||
<PackageVersion Include="WebDav.Client" Version="2.9.0" />
|
||||
|
||||
@@ -425,7 +425,7 @@ public class Utils
|
||||
var domain = authority;
|
||||
|
||||
// Handle IPv6 addresses, e.g., "[2001:db8::1]:443"
|
||||
if (authority.StartsWith('[') && authority.Contains(']'))
|
||||
if (authority.StartsWith("[") && authority.Contains("]"))
|
||||
{
|
||||
var closingBracketIndex = authority.LastIndexOf(']');
|
||||
if (closingBracketIndex < authority.Length - 1 && authority[closingBracketIndex + 1] == ':')
|
||||
|
||||
@@ -73,7 +73,6 @@ public class Global
|
||||
public const string GrpcMultiMode = "multi";
|
||||
public const int MaxPort = 65536;
|
||||
public const int MinFontSize = 8;
|
||||
public const int MinFontSizeCount = 13;
|
||||
public const string RebootAs = "rebootas";
|
||||
public const string AvaAssets = "avares://v2rayN/Assets/";
|
||||
public const string LocalAppData = "V2RAYN_LOCAL_APPLICATION_DATA_V2";
|
||||
@@ -586,6 +585,7 @@ public class Global
|
||||
|
||||
public static readonly List<string> IPAPIUrls =
|
||||
[
|
||||
@"https://speed.cloudflare.com/meta",
|
||||
@"https://api.ip.sb/geoip",
|
||||
@"https://api-ipv4.ip.sb/geoip",
|
||||
@"https://api-ipv6.ip.sb/geoip",
|
||||
|
||||
@@ -2080,7 +2080,7 @@ public static class ConfigHandler
|
||||
/// <returns>0 if successful</returns>
|
||||
public static async Task<int> InitBuiltinRouting(Config config, bool blImportAdvancedRules = false)
|
||||
{
|
||||
var ver = "V4-";
|
||||
var ver = "V3-";
|
||||
var items = await AppManager.Instance.RoutingItems();
|
||||
|
||||
//TODO Temporary code to be removed later
|
||||
@@ -2091,7 +2091,7 @@ public static class ConfigHandler
|
||||
items = await AppManager.Instance.RoutingItems();
|
||||
}
|
||||
|
||||
if (!blImportAdvancedRules && items.Count(u => u.Remarks.StartsWith(ver)) > 0)
|
||||
if (!blImportAdvancedRules && items.Count > 0)
|
||||
{
|
||||
//migrate
|
||||
//TODO Temporary code to be removed later
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace ServiceLib.Handler.Fmt;
|
||||
|
||||
public class BaseFmt
|
||||
{
|
||||
private static readonly string[] _allowInsecureArray = new[] { "insecure", "allowInsecure", "allow_insecure" };
|
||||
private static readonly string[] _allowInsecureArray = new[] { "insecure", "allowInsecure", "allow_insecure", "verify" };
|
||||
|
||||
protected static string GetIpv6(string address)
|
||||
{
|
||||
@@ -118,16 +118,7 @@ public class BaseFmt
|
||||
}
|
||||
if (item.Extra.IsNotEmpty())
|
||||
{
|
||||
var node = JsonUtils.ParseJson(item.Extra);
|
||||
var extra = node != null
|
||||
? JsonUtils.Serialize(node, new JsonSerializerOptions
|
||||
{
|
||||
WriteIndented = false,
|
||||
DefaultIgnoreCondition = JsonIgnoreCondition.Never,
|
||||
Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping
|
||||
})
|
||||
: item.Extra;
|
||||
dicQuery.Add("extra", Utils.UrlEncode(extra));
|
||||
dicQuery.Add("extra", Utils.UrlEncode(item.Extra));
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -246,21 +237,7 @@ public class BaseFmt
|
||||
item.RequestHost = GetQueryDecoded(query, "host");
|
||||
item.Path = GetQueryDecoded(query, "path", "/");
|
||||
item.HeaderType = GetQueryDecoded(query, "mode");
|
||||
var extraDecoded = GetQueryDecoded(query, "extra");
|
||||
if (extraDecoded.IsNotEmpty())
|
||||
{
|
||||
var node = JsonUtils.ParseJson(extraDecoded);
|
||||
if (node != null)
|
||||
{
|
||||
extraDecoded = JsonUtils.Serialize(node, new JsonSerializerOptions
|
||||
{
|
||||
WriteIndented = true,
|
||||
DefaultIgnoreCondition = JsonIgnoreCondition.Never,
|
||||
Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping
|
||||
});
|
||||
}
|
||||
}
|
||||
item.Extra = extraDecoded;
|
||||
item.Extra = GetQueryDecoded(query, "extra");
|
||||
break;
|
||||
|
||||
case nameof(ETransport.http):
|
||||
|
||||
@@ -41,66 +41,7 @@ public class ShadowsocksFmt : BaseFmt
|
||||
//url = Utile.Base64Encode(url);
|
||||
//new Sip002
|
||||
var pw = Utils.Base64Encode($"{item.Security}:{item.Id}", true);
|
||||
|
||||
// plugin
|
||||
var plugin = string.Empty;
|
||||
var pluginArgs = string.Empty;
|
||||
|
||||
if (item.Network == nameof(ETransport.tcp) && item.HeaderType == Global.TcpHeaderHttp)
|
||||
{
|
||||
plugin = "obfs-local";
|
||||
pluginArgs = $"obfs=http;obfs-host={item.RequestHost};";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (item.Network == nameof(ETransport.ws))
|
||||
{
|
||||
pluginArgs += "mode=websocket;";
|
||||
pluginArgs += $"host={item.RequestHost};";
|
||||
pluginArgs += $"path={item.Path};";
|
||||
}
|
||||
else if (item.Network == nameof(ETransport.quic))
|
||||
{
|
||||
pluginArgs += "mode=quic;";
|
||||
}
|
||||
if (item.StreamSecurity == Global.StreamSecurity)
|
||||
{
|
||||
pluginArgs += "tls;";
|
||||
var certs = CertPemManager.ParsePemChain(item.Cert);
|
||||
if (certs.Count > 0)
|
||||
{
|
||||
var cert = certs.First();
|
||||
const string beginMarker = "-----BEGIN CERTIFICATE-----\n";
|
||||
const string endMarker = "\n-----END CERTIFICATE-----";
|
||||
|
||||
var base64Content = cert.Replace(beginMarker, "").Replace(endMarker, "").Trim();
|
||||
|
||||
// https://github.com/shadowsocks/v2ray-plugin/blob/e9af1cdd2549d528deb20a4ab8d61c5fbe51f306/args.go#L172
|
||||
// Equal signs and commas [and backslashes] must be escaped with a backslash.
|
||||
base64Content = base64Content.Replace("=", "\\=");
|
||||
|
||||
pluginArgs += $"certRaw={base64Content};";
|
||||
}
|
||||
}
|
||||
if (pluginArgs.Length > 0)
|
||||
{
|
||||
plugin = "v2ray-plugin";
|
||||
}
|
||||
}
|
||||
|
||||
var dicQuery = new Dictionary<string, string>();
|
||||
if (plugin.IsNotEmpty())
|
||||
{
|
||||
var pluginStr = plugin + ";" + pluginArgs;
|
||||
// pluginStr remove last ';' and url encode
|
||||
if (pluginStr.EndsWith(';'))
|
||||
{
|
||||
pluginStr = pluginStr[..^1];
|
||||
}
|
||||
dicQuery["plugin"] = Utils.UrlEncode(pluginStr);
|
||||
}
|
||||
|
||||
return ToUri(EConfigType.Shadowsocks, item.Address, item.Port, pw, dicQuery, remark);
|
||||
return ToUri(EConfigType.Shadowsocks, item.Address, item.Port, pw, null, remark);
|
||||
}
|
||||
|
||||
private static readonly Regex UrlFinder = new(@"ss://(?<base64>[A-Za-z0-9+-/=_]+)(?:#(?<tag>\S+))?", RegexOptions.IgnoreCase | RegexOptions.Compiled);
|
||||
@@ -183,82 +124,19 @@ public class ShadowsocksFmt : BaseFmt
|
||||
var queryParameters = Utils.ParseQueryString(parsedUrl.Query);
|
||||
if (queryParameters["plugin"] != null)
|
||||
{
|
||||
var pluginStr = queryParameters["plugin"];
|
||||
var pluginParts = pluginStr.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
if (pluginParts.Length == 0)
|
||||
//obfs-host exists
|
||||
var obfsHost = queryParameters["plugin"]?.Split(';').FirstOrDefault(t => t.Contains("obfs-host"));
|
||||
if (queryParameters["plugin"].Contains("obfs=http") && obfsHost.IsNotEmpty())
|
||||
{
|
||||
obfsHost = obfsHost?.Replace("obfs-host=", "");
|
||||
item.Network = Global.DefaultNetwork;
|
||||
item.HeaderType = Global.TcpHeaderHttp;
|
||||
item.RequestHost = obfsHost ?? "";
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var pluginName = pluginParts[0];
|
||||
|
||||
// A typo in https://github.com/shadowsocks/shadowsocks-org/blob/6b1c064db4129de99c516294960e731934841c94/docs/doc/sip002.md?plain=1#L15
|
||||
// "simple-obfs" should be "obfs-local"
|
||||
if (pluginName == "simple-obfs")
|
||||
{
|
||||
pluginName = "obfs-local";
|
||||
}
|
||||
|
||||
// Parse obfs-local plugin
|
||||
if (pluginName == "obfs-local")
|
||||
{
|
||||
var obfsMode = pluginParts.FirstOrDefault(t => t.StartsWith("obfs="));
|
||||
var obfsHost = pluginParts.FirstOrDefault(t => t.StartsWith("obfs-host="));
|
||||
|
||||
if ((!obfsMode.IsNullOrEmpty()) && obfsMode.Contains("obfs=http") && obfsHost.IsNotEmpty())
|
||||
{
|
||||
obfsHost = obfsHost.Replace("obfs-host=", "");
|
||||
item.Network = Global.DefaultNetwork;
|
||||
item.HeaderType = Global.TcpHeaderHttp;
|
||||
item.RequestHost = obfsHost;
|
||||
}
|
||||
}
|
||||
// Parse v2ray-plugin
|
||||
else if (pluginName == "v2ray-plugin")
|
||||
{
|
||||
var mode = pluginParts.FirstOrDefault(t => t.StartsWith("mode="), "websocket");
|
||||
var host = pluginParts.FirstOrDefault(t => t.StartsWith("host="));
|
||||
var path = pluginParts.FirstOrDefault(t => t.StartsWith("path="));
|
||||
var hasTls = pluginParts.Any(t => t == "tls");
|
||||
var certRaw = pluginParts.FirstOrDefault(t => t.StartsWith("certRaw="));
|
||||
|
||||
var modeValue = mode.Replace("mode=", "");
|
||||
if (modeValue == "websocket")
|
||||
{
|
||||
item.Network = nameof(ETransport.ws);
|
||||
if (!host.IsNullOrEmpty())
|
||||
{
|
||||
item.RequestHost = host.Replace("host=", "");
|
||||
item.Sni = item.RequestHost;
|
||||
}
|
||||
if (!path.IsNullOrEmpty())
|
||||
{
|
||||
item.Path = path.Replace("path=", "");
|
||||
}
|
||||
}
|
||||
else if (modeValue == "quic")
|
||||
{
|
||||
item.Network = nameof(ETransport.quic);
|
||||
}
|
||||
|
||||
if (hasTls)
|
||||
{
|
||||
item.StreamSecurity = Global.StreamSecurity;
|
||||
|
||||
if (!certRaw.IsNullOrEmpty())
|
||||
{
|
||||
var certBase64 = certRaw.Replace("certRaw=", "");
|
||||
|
||||
certBase64 = certBase64.Replace("\\=", "=");
|
||||
|
||||
const string beginMarker = "-----BEGIN CERTIFICATE-----\n";
|
||||
const string endMarker = "\n-----END CERTIFICATE-----";
|
||||
var certPem = beginMarker + certBase64 + endMarker;
|
||||
item.Cert = certPem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return item;
|
||||
|
||||
@@ -45,18 +45,18 @@ public class SocksFmt : BaseFmt
|
||||
};
|
||||
result = result[Global.ProtocolShares[EConfigType.SOCKS].Length..];
|
||||
//remark
|
||||
var indexRemark = result.IndexOf('#');
|
||||
var indexRemark = result.IndexOf("#");
|
||||
if (indexRemark > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
item.Remarks = Utils.UrlDecode(result.Substring(indexRemark + 1));
|
||||
item.Remarks = Utils.UrlDecode(result.Substring(indexRemark + 1, result.Length - indexRemark - 1));
|
||||
}
|
||||
catch { }
|
||||
result = result[..indexRemark];
|
||||
}
|
||||
//part decode
|
||||
var indexS = result.IndexOf('@');
|
||||
var indexS = result.IndexOf("@");
|
||||
if (indexS > 0)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -71,25 +71,28 @@ public class DownloaderHelper
|
||||
}
|
||||
};
|
||||
|
||||
var lastUpdateTime = DateTime.Now;
|
||||
var totalDatetime = DateTime.Now;
|
||||
var totalSecond = 0;
|
||||
var hasValue = false;
|
||||
double maxSpeed = 0;
|
||||
await using var downloader = new Downloader.DownloadService(downloadOpt);
|
||||
|
||||
//downloader.DownloadStarted += (sender, value) =>
|
||||
//{
|
||||
// if (progress != null)
|
||||
// {
|
||||
// progress.Report("Start download data...");
|
||||
// }
|
||||
//};
|
||||
downloader.DownloadProgressChanged += (sender, value) =>
|
||||
{
|
||||
if (progress != null && value.BytesPerSecondSpeed > 0)
|
||||
var ts = DateTime.Now - totalDatetime;
|
||||
if (progress != null && ts.Seconds > totalSecond)
|
||||
{
|
||||
hasValue = true;
|
||||
totalSecond = ts.Seconds;
|
||||
if (value.BytesPerSecondSpeed > maxSpeed)
|
||||
{
|
||||
maxSpeed = value.BytesPerSecondSpeed;
|
||||
}
|
||||
|
||||
var ts = DateTime.Now - lastUpdateTime;
|
||||
if (ts.TotalMilliseconds >= 1000)
|
||||
{
|
||||
lastUpdateTime = DateTime.Now;
|
||||
var speed = (maxSpeed / 1000 / 1000).ToString("#0.0");
|
||||
progress.Report(speed);
|
||||
}
|
||||
@@ -99,19 +102,10 @@ public class DownloaderHelper
|
||||
{
|
||||
if (progress != null)
|
||||
{
|
||||
if (hasValue && maxSpeed > 0)
|
||||
{
|
||||
var finalSpeed = (maxSpeed / 1000 / 1000).ToString("#0.0");
|
||||
progress.Report(finalSpeed);
|
||||
}
|
||||
else if (value.Error != null)
|
||||
if (!hasValue && value.Error != null)
|
||||
{
|
||||
progress.Report(value.Error?.Message);
|
||||
}
|
||||
else
|
||||
{
|
||||
progress.Report("0");
|
||||
}
|
||||
}
|
||||
};
|
||||
//progress.Report("......");
|
||||
|
||||
@@ -10,15 +10,6 @@ public class ActionPrecheckManager(Config config)
|
||||
|
||||
private readonly Config _config = config;
|
||||
|
||||
// sing-box supported transports for different protocol types
|
||||
private static readonly HashSet<string> SingboxUnsupportedTransports = [nameof(ETransport.kcp), nameof(ETransport.xhttp)];
|
||||
|
||||
private static readonly HashSet<EConfigType> SingboxTransportSupportedProtocols =
|
||||
[EConfigType.VMess, EConfigType.VLESS, EConfigType.Trojan, EConfigType.Shadowsocks];
|
||||
|
||||
private static readonly HashSet<string> SingboxShadowsocksAllowedTransports =
|
||||
[nameof(ETransport.tcp), nameof(ETransport.ws), nameof(ETransport.quic)];
|
||||
|
||||
public async Task<List<string>> Check(string? indexId)
|
||||
{
|
||||
if (indexId.IsNullOrEmpty())
|
||||
@@ -183,16 +174,26 @@ public class ActionPrecheckManager(Config config)
|
||||
return errors;
|
||||
}
|
||||
|
||||
var net = item.GetNetwork();
|
||||
var net = item.GetNetwork() ?? item.Network;
|
||||
|
||||
if (coreType == ECoreType.sing_box)
|
||||
{
|
||||
var transportError = ValidateSingboxTransport(item.ConfigType, net);
|
||||
if (transportError != null)
|
||||
// sing-box does not support xhttp / kcp
|
||||
// sing-box does not support transports like ws/http/httpupgrade/etc. when the node is not vmess/trojan/vless
|
||||
if (net is nameof(ETransport.kcp) or nameof(ETransport.xhttp))
|
||||
{
|
||||
errors.Add(transportError);
|
||||
errors.Add(string.Format(ResUI.CoreNotSupportNetwork, nameof(ECoreType.sing_box), net));
|
||||
return errors;
|
||||
}
|
||||
|
||||
if (item.ConfigType is not (EConfigType.VMess or EConfigType.VLESS or EConfigType.Trojan))
|
||||
{
|
||||
if (net is nameof(ETransport.ws) or nameof(ETransport.http) or nameof(ETransport.h2) or nameof(ETransport.quic) or nameof(ETransport.httpupgrade))
|
||||
{
|
||||
errors.Add(string.Format(ResUI.CoreNotSupportProtocolTransport, nameof(ECoreType.sing_box), item.ConfigType.ToString(), net));
|
||||
return errors;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (coreType is ECoreType.Xray)
|
||||
{
|
||||
@@ -208,31 +209,6 @@ public class ActionPrecheckManager(Config config)
|
||||
return errors;
|
||||
}
|
||||
|
||||
private static string? ValidateSingboxTransport(EConfigType configType, string net)
|
||||
{
|
||||
// sing-box does not support xhttp / kcp transports
|
||||
if (SingboxUnsupportedTransports.Contains(net))
|
||||
{
|
||||
return string.Format(ResUI.CoreNotSupportNetwork, nameof(ECoreType.sing_box), net);
|
||||
}
|
||||
|
||||
// sing-box does not support non-tcp transports for protocols other than vmess/trojan/vless/shadowsocks
|
||||
if (!SingboxTransportSupportedProtocols.Contains(configType) && net != nameof(ETransport.tcp))
|
||||
{
|
||||
return string.Format(ResUI.CoreNotSupportProtocolTransport,
|
||||
nameof(ECoreType.sing_box), configType.ToString(), net);
|
||||
}
|
||||
|
||||
// sing-box shadowsocks only supports tcp/ws/quic transports
|
||||
if (configType == EConfigType.Shadowsocks && !SingboxShadowsocksAllowedTransports.Contains(net))
|
||||
{
|
||||
return string.Format(ResUI.CoreNotSupportProtocolTransport,
|
||||
nameof(ECoreType.sing_box), configType.ToString(), net);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private async Task<List<string>> ValidateRelatedNodesExistAndValid(ProfileItem? item)
|
||||
{
|
||||
var errors = new List<string>();
|
||||
|
||||
@@ -374,15 +374,11 @@ public class CertPemManager
|
||||
{
|
||||
var beginIndex = pemChain.IndexOf(beginMarker, index, StringComparison.Ordinal);
|
||||
if (beginIndex == -1)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
var endIndex = pemChain.IndexOf(endMarker, beginIndex, StringComparison.Ordinal);
|
||||
if (endIndex == -1)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
// Extract certificate content
|
||||
var base64Start = beginIndex + beginMarker.Length;
|
||||
|
||||
@@ -216,8 +216,6 @@ public class Transport4Sbox
|
||||
public string? idle_timeout { get; set; }
|
||||
public string? ping_timeout { get; set; }
|
||||
public bool? permit_without_stream { get; set; }
|
||||
public int? max_early_data { get; set; }
|
||||
public string? early_data_header_name { get; set; }
|
||||
}
|
||||
|
||||
public class Headers4Sbox
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
namespace ServiceLib.Models;
|
||||
|
||||
public class UpdateResult
|
||||
{
|
||||
public bool Success { get; set; }
|
||||
public string? Msg { get; set; }
|
||||
public SemanticVersion? Version { get; set; }
|
||||
public string? Url { get; set; }
|
||||
|
||||
public UpdateResult(bool success, string? msg)
|
||||
{
|
||||
Success = success;
|
||||
Msg = msg;
|
||||
}
|
||||
|
||||
public UpdateResult(bool success, SemanticVersion? version)
|
||||
{
|
||||
Success = success;
|
||||
Version = version;
|
||||
}
|
||||
}
|
||||
@@ -411,6 +411,8 @@ public class WsSettings4Ray
|
||||
|
||||
public class Headers4Ray
|
||||
{
|
||||
public string Host { get; set; }
|
||||
|
||||
[JsonPropertyName("User-Agent")]
|
||||
public string UserAgent { get; set; }
|
||||
}
|
||||
|
||||
130
v2rayN/ServiceLib/Resx/ResUI.Designer.cs
generated
130
v2rayN/ServiceLib/Resx/ResUI.Designer.cs
generated
@@ -529,7 +529,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Next proxy remarks 的本地化字符串。
|
||||
/// 查找类似 Next proxy Configuration remarks 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string LvNextProfile {
|
||||
get {
|
||||
@@ -547,7 +547,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Previous proxy remarks 的本地化字符串。
|
||||
/// 查找类似 Previous proxy Configuration remarks 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string LvPrevProfile {
|
||||
get {
|
||||
@@ -736,7 +736,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Add [Anytls] 的本地化字符串。
|
||||
/// 查找类似 Add [Anytls] Configuration 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuAddAnytlsServer {
|
||||
get {
|
||||
@@ -745,7 +745,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Add Child 的本地化字符串。
|
||||
/// 查找类似 Add Child Configuration 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuAddChildServer {
|
||||
get {
|
||||
@@ -754,7 +754,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Add a custom configuration 的本地化字符串。
|
||||
/// 查找类似 Add a custom configuration Configuration 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuAddCustomServer {
|
||||
get {
|
||||
@@ -763,7 +763,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Add [HTTP] 的本地化字符串。
|
||||
/// 查找类似 Add [HTTP] Configuration 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuAddHttpServer {
|
||||
get {
|
||||
@@ -772,7 +772,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Add [Hysteria2] 的本地化字符串。
|
||||
/// 查找类似 Add [Hysteria2] Configuration 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuAddHysteria2Server {
|
||||
get {
|
||||
@@ -781,7 +781,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Add Policy Group 的本地化字符串。
|
||||
/// 查找类似 Add Policy Group Configuration 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuAddPolicyGroupServer {
|
||||
get {
|
||||
@@ -790,7 +790,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Add Proxy Chain 的本地化字符串。
|
||||
/// 查找类似 Add Proxy Chain Configuration 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuAddProxyChainServer {
|
||||
get {
|
||||
@@ -799,7 +799,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Import Share Links from clipboard 的本地化字符串。
|
||||
/// 查找类似 Import Share Links from clipboard (Ctrl+V) 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuAddServerViaClipboard {
|
||||
get {
|
||||
@@ -817,7 +817,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Scan QR code on the screen 的本地化字符串。
|
||||
/// 查找类似 Scan QR code on the screen (Ctrl+S) 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuAddServerViaScan {
|
||||
get {
|
||||
@@ -826,7 +826,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Add [Shadowsocks] 的本地化字符串。
|
||||
/// 查找类似 Add [Shadowsocks] Configuration 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuAddShadowsocksServer {
|
||||
get {
|
||||
@@ -835,7 +835,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Add [SOCKS] 的本地化字符串。
|
||||
/// 查找类似 Add [SOCKS] Configuration 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuAddSocksServer {
|
||||
get {
|
||||
@@ -844,7 +844,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Add [Trojan] 的本地化字符串。
|
||||
/// 查找类似 Add [Trojan] Configuration 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuAddTrojanServer {
|
||||
get {
|
||||
@@ -853,7 +853,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Add [TUIC] 的本地化字符串。
|
||||
/// 查找类似 Add [TUIC] Configuration 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuAddTuicServer {
|
||||
get {
|
||||
@@ -862,7 +862,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Add [VLESS] 的本地化字符串。
|
||||
/// 查找类似 Add [VLESS] Configuration 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuAddVlessServer {
|
||||
get {
|
||||
@@ -871,7 +871,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Add [VMess] 的本地化字符串。
|
||||
/// 查找类似 Add [VMess] Configuration 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuAddVmessServer {
|
||||
get {
|
||||
@@ -880,7 +880,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Add [WireGuard] 的本地化字符串。
|
||||
/// 查找类似 Add [WireGuard] Configuration 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuAddWireguardServer {
|
||||
get {
|
||||
@@ -952,7 +952,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Clone selected 的本地化字符串。
|
||||
/// 查找类似 Clone selected Configuration 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuCopyServer {
|
||||
get {
|
||||
@@ -970,7 +970,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Edit 的本地化字符串。
|
||||
/// 查找类似 Edit Configuration (Ctrl+D) 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuEditServer {
|
||||
get {
|
||||
@@ -997,7 +997,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Export selected for complete configuration 的本地化字符串。
|
||||
/// 查找类似 Export selected Configuration for complete configuration 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuExport2ClientConfig {
|
||||
get {
|
||||
@@ -1006,7 +1006,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Export selected for complete configuration to clipboard 的本地化字符串。
|
||||
/// 查找类似 Export selected Configuration for complete configuration to clipboard 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuExport2ClientConfigClipboard {
|
||||
get {
|
||||
@@ -1015,7 +1015,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Export Share Link to Clipboard 的本地化字符串。
|
||||
/// 查找类似 Export Share Link to Clipboard (Ctrl+C) 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuExport2ShareUrl {
|
||||
get {
|
||||
@@ -1033,7 +1033,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Export 的本地化字符串。
|
||||
/// 查找类似 Export Configuration 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuExportConfig {
|
||||
get {
|
||||
@@ -1069,7 +1069,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Fallback by sing-box 的本地化字符串。
|
||||
/// 查找类似 Multi-Configuration Fallback by sing-box 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuGenGroupMultipleServerSingBoxFallback {
|
||||
get {
|
||||
@@ -1078,7 +1078,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 LeastPing by sing-box 的本地化字符串。
|
||||
/// 查找类似 Multi-Configuration LeastPing by sing-box 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuGenGroupMultipleServerSingBoxLeastPing {
|
||||
get {
|
||||
@@ -1087,7 +1087,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Fallback by Xray 的本地化字符串。
|
||||
/// 查找类似 Multi-Configuration Fallback by Xray 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuGenGroupMultipleServerXrayFallback {
|
||||
get {
|
||||
@@ -1096,7 +1096,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 LeastLoad by Xray 的本地化字符串。
|
||||
/// 查找类似 Multi-Configuration LeastLoad by Xray 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuGenGroupMultipleServerXrayLeastLoad {
|
||||
get {
|
||||
@@ -1105,7 +1105,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 LeastPing by Xray 的本地化字符串。
|
||||
/// 查找类似 Multi-Configuration LeastPing by Xray 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuGenGroupMultipleServerXrayLeastPing {
|
||||
get {
|
||||
@@ -1114,7 +1114,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Random by Xray 的本地化字符串。
|
||||
/// 查找类似 Multi-Configuration Random by Xray 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuGenGroupMultipleServerXrayRandom {
|
||||
get {
|
||||
@@ -1123,7 +1123,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 RoundRobin by Xray 的本地化字符串。
|
||||
/// 查找类似 Multi-Configuration RoundRobin by Xray 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuGenGroupMultipleServerXrayRoundRobin {
|
||||
get {
|
||||
@@ -1249,7 +1249,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Move to bottom 的本地化字符串。
|
||||
/// 查找类似 Move to bottom (B) 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuMoveBottom {
|
||||
get {
|
||||
@@ -1258,7 +1258,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Down 的本地化字符串。
|
||||
/// 查找类似 Down (D) 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuMoveDown {
|
||||
get {
|
||||
@@ -1285,7 +1285,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Move to top 的本地化字符串。
|
||||
/// 查找类似 Move to top (T) 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuMoveTop {
|
||||
get {
|
||||
@@ -1294,7 +1294,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Up 的本地化字符串。
|
||||
/// 查找类似 Up (U) 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuMoveUp {
|
||||
get {
|
||||
@@ -1312,7 +1312,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Copy 的本地化字符串。
|
||||
/// 查找类似 Copy (Ctrl+C) 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuMsgViewCopy {
|
||||
get {
|
||||
@@ -1330,7 +1330,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Select all 的本地化字符串。
|
||||
/// 查找类似 Select all (Ctrl+A) 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuMsgViewSelectAll {
|
||||
get {
|
||||
@@ -1402,7 +1402,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Select active node 的本地化字符串。
|
||||
/// 查找类似 Select active node (Enter) 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuProxiesSelectActivity {
|
||||
get {
|
||||
@@ -1411,7 +1411,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Test real delay 的本地化字符串。
|
||||
/// 查找类似 Test Configurations real delay (Ctrl+R) 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuRealPingServer {
|
||||
get {
|
||||
@@ -1501,7 +1501,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Remove Child 的本地化字符串。
|
||||
/// 查找类似 Remove Child Configuration 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuRemoveChildServer {
|
||||
get {
|
||||
@@ -1510,7 +1510,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Remove duplicate 的本地化字符串。
|
||||
/// 查找类似 Remove duplicate Configurations 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuRemoveDuplicateServer {
|
||||
get {
|
||||
@@ -1528,7 +1528,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Remove selected 的本地化字符串。
|
||||
/// 查找类似 Remove selected Configurations (Delete) 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuRemoveServer {
|
||||
get {
|
||||
@@ -1564,7 +1564,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Remove selected 的本地化字符串。
|
||||
/// 查找类似 Remove selected (Delete) 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuRoutingAdvancedRemove {
|
||||
get {
|
||||
@@ -1573,7 +1573,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Set as active rule 的本地化字符串。
|
||||
/// 查找类似 Set as active rule (Enter) 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuRoutingAdvancedSetDefault {
|
||||
get {
|
||||
@@ -1645,7 +1645,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Remove Rule 的本地化字符串。
|
||||
/// 查找类似 Remove Rule (Delete) 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuRuleRemove {
|
||||
get {
|
||||
@@ -1654,7 +1654,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Select all 的本地化字符串。
|
||||
/// 查找类似 Select all (Ctrl+A) 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuSelectAll {
|
||||
get {
|
||||
@@ -1663,7 +1663,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Configuration item 1, Auto add from subscription group 的本地化字符串。
|
||||
/// 查找类似 Configuration List 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuServerList {
|
||||
get {
|
||||
@@ -1672,16 +1672,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Configuration Item 2, Select and add from self-built 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuServerList2 {
|
||||
get {
|
||||
return ResourceManager.GetString("menuServerList2", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Configuration 的本地化字符串。
|
||||
/// 查找类似 Configurations 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuServers {
|
||||
get {
|
||||
@@ -1690,7 +1681,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Set as active 的本地化字符串。
|
||||
/// 查找类似 Set as active Configuration (Enter) 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuSetDefaultServer {
|
||||
get {
|
||||
@@ -1708,7 +1699,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Share 的本地化字符串。
|
||||
/// 查找类似 Share Configuration (Ctrl+F) 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuShareServer {
|
||||
get {
|
||||
@@ -1735,7 +1726,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Test download speed 的本地化字符串。
|
||||
/// 查找类似 Test Configurations download speed (Ctrl+T) 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuSpeedServer {
|
||||
get {
|
||||
@@ -1879,7 +1870,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Test tcping 的本地化字符串。
|
||||
/// 查找类似 Test Configurations with tcping (Ctrl+O) 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string menuTcpingServer {
|
||||
get {
|
||||
@@ -1987,7 +1978,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Filter, press Enter to execute 的本地化字符串。
|
||||
/// 查找类似 Configuration filter, press Enter to execute 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string MsgServerTitle {
|
||||
get {
|
||||
@@ -2284,7 +2275,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Are you sure you want to remove? 的本地化字符串。
|
||||
/// 查找类似 Are you sure you want to remove the Configuration? 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string RemoveServer {
|
||||
get {
|
||||
@@ -2364,15 +2355,6 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Press ESC to terminate the test 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string SpeedtestingPressEscToExit {
|
||||
get {
|
||||
return ResourceManager.GetString("SpeedtestingPressEscToExit", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Skip test 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -2401,7 +2383,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Waiting... 的本地化字符串。
|
||||
/// 查找类似 Waiting for testing (press ESC to terminate)... 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string SpeedtestingWait {
|
||||
get {
|
||||
@@ -4114,7 +4096,7 @@ namespace ServiceLib.Resx {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 Tray right-click menu display limit 的本地化字符串。
|
||||
/// 查找类似 Tray right-click menu Configurations display limit 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string TbSettingsTrayMenuServersLimit {
|
||||
get {
|
||||
|
||||
@@ -472,10 +472,10 @@
|
||||
<value>زبان</value>
|
||||
</data>
|
||||
<data name="menuAddServerViaClipboard" xml:space="preserve">
|
||||
<value>وارد کردن URL انبوه از کلیپ بورد</value>
|
||||
<value>وارد کردن URL انبوه از کلیپ بورد (Ctrl+V)</value>
|
||||
</data>
|
||||
<data name="menuAddServerViaScan" xml:space="preserve">
|
||||
<value>اسکن کد QR روی صفحه</value>
|
||||
<value>اسکن کد QR روی صفحه (Ctrl+S)</value>
|
||||
</data>
|
||||
<data name="menuCopyServer" xml:space="preserve">
|
||||
<value>سرور انتخاب شده را شبیه سازی کنید</value>
|
||||
@@ -484,31 +484,31 @@
|
||||
<value>سرورهای تکراری را حذف کنید</value>
|
||||
</data>
|
||||
<data name="menuRemoveServer" xml:space="preserve">
|
||||
<value>حذف سرورهای انتخابی</value>
|
||||
<value>حذف سرورهای انتخابی (Delete)</value>
|
||||
</data>
|
||||
<data name="menuSetDefaultServer" xml:space="preserve">
|
||||
<value>به عنوان سرور فعال تنظیم کنید</value>
|
||||
<value>به عنوان سرور فعال تنظیم کنید (Enter)</value>
|
||||
</data>
|
||||
<data name="menuClearServerStatistics" xml:space="preserve">
|
||||
<value>تمام آمار خدمات را پاک کنید</value>
|
||||
</data>
|
||||
<data name="menuRealPingServer" xml:space="preserve">
|
||||
<value>آزمایش سرورها با تاخیر واقعی</value>
|
||||
<value>آزمایش سرورها با تاخیر واقعی (Ctrl+R)</value>
|
||||
</data>
|
||||
<data name="menuSortServerResult" xml:space="preserve">
|
||||
<value>مرتب سازی بر اساس نتیجه تست</value>
|
||||
</data>
|
||||
<data name="menuSpeedServer" xml:space="preserve">
|
||||
<value>تست سرعت دانلود سرورها</value>
|
||||
<value>تست سرعت دانلود سرورها (Ctrl+T)</value>
|
||||
</data>
|
||||
<data name="menuTcpingServer" xml:space="preserve">
|
||||
<value>تست سرورها با tcping</value>
|
||||
<value>تست سرورها با tcping (Ctrl+O)</value>
|
||||
</data>
|
||||
<data name="menuExport2ClientConfig" xml:space="preserve">
|
||||
<value>سرور انتخابی را برای پیکربندی کلاینت صادر کنید</value>
|
||||
</data>
|
||||
<data name="menuExport2ShareUrl" xml:space="preserve">
|
||||
<value>URL های اشتراک گذاری را به کلیپ بورد صادر کنید</value>
|
||||
<value>URL های اشتراک گذاری را به کلیپ بورد صادر کنید (Ctrl+C)</value>
|
||||
</data>
|
||||
<data name="menuAddCustomServer" xml:space="preserve">
|
||||
<value>یک سرور پیکربندی سفارشی اضافه شود</value>
|
||||
@@ -529,19 +529,19 @@
|
||||
<value>سرور [VMess] را اضافه کنید</value>
|
||||
</data>
|
||||
<data name="menuSelectAll" xml:space="preserve">
|
||||
<value>انتخاب همه</value>
|
||||
<value>انتخاب همه (Ctrl+A)</value>
|
||||
</data>
|
||||
<data name="menuMsgViewClear" xml:space="preserve">
|
||||
<value>همه را پاک کن</value>
|
||||
</data>
|
||||
<data name="menuMsgViewCopy" xml:space="preserve">
|
||||
<value>کپی</value>
|
||||
<value>کپی (Ctrl+C)</value>
|
||||
</data>
|
||||
<data name="menuMsgViewCopyAll" xml:space="preserve">
|
||||
<value>کپی همه</value>
|
||||
</data>
|
||||
<data name="menuMsgViewSelectAll" xml:space="preserve">
|
||||
<value>انتخاب همه</value>
|
||||
<value>انتخاب همه (Ctrl+A)</value>
|
||||
</data>
|
||||
<data name="menuSubAdd" xml:space="preserve">
|
||||
<value>اضافه کردن</value>
|
||||
@@ -796,13 +796,13 @@
|
||||
<value>به پایین حرکت شود(B)</value>
|
||||
</data>
|
||||
<data name="menuMoveDown" xml:space="preserve">
|
||||
<value>پایین</value>
|
||||
<value>پایین (D)</value>
|
||||
</data>
|
||||
<data name="menuMoveTop" xml:space="preserve">
|
||||
<value>حرکت به بالا</value>
|
||||
<value>حرکت به بالا (T)</value>
|
||||
</data>
|
||||
<data name="menuMoveUp" xml:space="preserve">
|
||||
<value>بالا</value>
|
||||
<value>بالا (U)</value>
|
||||
</data>
|
||||
<data name="MsgFilterTitle" xml:space="preserve">
|
||||
<value>فیلتر، از عبارات منظم پشتیبانی می کند</value>
|
||||
@@ -922,7 +922,7 @@
|
||||
<value>رد شدن از آزمون</value>
|
||||
</data>
|
||||
<data name="menuEditServer" xml:space="preserve">
|
||||
<value>ویرایش سرور</value>
|
||||
<value>ویرایش سرور (Ctrl+D)</value>
|
||||
</data>
|
||||
<data name="TbSettingsDoubleClick2Activate" xml:space="preserve">
|
||||
<value>دوبار کلیک کردن سرور باعث فعال شدن آن می شود</value>
|
||||
@@ -976,10 +976,7 @@
|
||||
<value>فعال سازی شتاب دهنده سخت افزاری (نیاز به راهاندازی مجدد)</value>
|
||||
</data>
|
||||
<data name="SpeedtestingWait" xml:space="preserve">
|
||||
<value>در انتظار آزمایش...</value>
|
||||
</data>
|
||||
<data name="SpeedtestingPressEscToExit" xml:space="preserve">
|
||||
<value>برای پایان دادن به ESC فشار دهید</value>
|
||||
<value>در انتظار آزمایش (برای پایان دادن به ESC فشار دهید)...</value>
|
||||
</data>
|
||||
<data name="TipDisplayLog" xml:space="preserve">
|
||||
<value>لطفاً در صورت قطع غیرعادی آن را خاموش کنید</value>
|
||||
@@ -1207,7 +1204,7 @@
|
||||
<value>تازه سازی پروکسی ها</value>
|
||||
</data>
|
||||
<data name="menuProxiesSelectActivity" xml:space="preserve">
|
||||
<value>انتخاب گره فعال</value>
|
||||
<value>انتخاب گره فعال (Enter)</value>
|
||||
</data>
|
||||
<data name="TbSettingsDomainStrategy4Out" xml:space="preserve">
|
||||
<value>استراتژی دامنه پیش فرض برای خروجی</value>
|
||||
@@ -1540,7 +1537,7 @@
|
||||
<value>Remove Child Configuration</value>
|
||||
</data>
|
||||
<data name="menuServerList" xml:space="preserve">
|
||||
<value>Configuration item 1, Auto add from subscription group</value>
|
||||
<value>Configuration List</value>
|
||||
</data>
|
||||
<data name="TbFallback" xml:space="preserve">
|
||||
<value>Fallback</value>
|
||||
@@ -1638,7 +1635,4 @@ The "Get Certificate" action may fail if a self-signed certificate is used or if
|
||||
<data name="TbSettingsMacOSShowInDock" xml:space="preserve">
|
||||
<value>macOS displays this in the Dock (requires restart)</value>
|
||||
</data>
|
||||
<data name="menuServerList2" xml:space="preserve">
|
||||
<value>Configuration Item 2, Select and add from self-built</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -472,10 +472,10 @@
|
||||
<value>Langue (redémarrage requis)</value>
|
||||
</data>
|
||||
<data name="menuAddServerViaClipboard" xml:space="preserve">
|
||||
<value>Importer liens depuis le presse-papiers</value>
|
||||
<value>Importer liens depuis le presse-papiers (Ctrl+V)</value>
|
||||
</data>
|
||||
<data name="menuAddServerViaScan" xml:space="preserve">
|
||||
<value>Scanner le QR code à l’écran</value>
|
||||
<value>Scanner le QR code à l’écran (Ctrl+S)</value>
|
||||
</data>
|
||||
<data name="menuCopyServer" xml:space="preserve">
|
||||
<value>Cloner la sélection</value>
|
||||
@@ -484,7 +484,7 @@
|
||||
<value>Supprimer les doublons</value>
|
||||
</data>
|
||||
<data name="menuRemoveServer" xml:space="preserve">
|
||||
<value>Supprimer la sélection (multi-sélection)</value>
|
||||
<value>Supprimer la sélection (multi-sélection) (Delete)</value>
|
||||
</data>
|
||||
<data name="menuSetDefaultServer" xml:space="preserve">
|
||||
<value>Définir comme actif (Entrée)</value>
|
||||
@@ -493,22 +493,22 @@
|
||||
<value>Effacer toutes les statistiques de service</value>
|
||||
</data>
|
||||
<data name="menuRealPingServer" xml:space="preserve">
|
||||
<value>Tester la latence de connexion réelle (multi-sélect)</value>
|
||||
<value>Tester la latence de connexion réelle (multi-sélect) (Ctrl+R)</value>
|
||||
</data>
|
||||
<data name="menuSortServerResult" xml:space="preserve">
|
||||
<value>Trier selon les résultats de test</value>
|
||||
</data>
|
||||
<data name="menuSpeedServer" xml:space="preserve">
|
||||
<value>Tester la vitesse (multi-sélection)</value>
|
||||
<value>Tester la vitesse (multi-sélection) (Ctrl+T)</value>
|
||||
</data>
|
||||
<data name="menuTcpingServer" xml:space="preserve">
|
||||
<value>Tester la latence Tcping (multi-sélection)</value>
|
||||
<value>Tester la latence Tcping (multi-sélection) (Ctrl+O)</value>
|
||||
</data>
|
||||
<data name="menuExport2ClientConfig" xml:space="preserve">
|
||||
<value>Exporter la configuration complète sélectionnée</value>
|
||||
</data>
|
||||
<data name="menuExport2ShareUrl" xml:space="preserve">
|
||||
<value>Exporter les liens de partage vers le presse-papiers (multi-sélection)</value>
|
||||
<value>Exporter les liens de partage vers le presse-papiers (multi-sélection) (Ctrl+C)</value>
|
||||
</data>
|
||||
<data name="menuAddCustomServer" xml:space="preserve">
|
||||
<value>Ajouter une configuration personnalisée</value>
|
||||
@@ -529,19 +529,19 @@
|
||||
<value>Ajouter [VMess]</value>
|
||||
</data>
|
||||
<data name="menuSelectAll" xml:space="preserve">
|
||||
<value>Tout sélectionner</value>
|
||||
<value>Tout sélectionner (Ctrl+A)</value>
|
||||
</data>
|
||||
<data name="menuMsgViewClear" xml:space="preserve">
|
||||
<value>Tout effacer</value>
|
||||
</data>
|
||||
<data name="menuMsgViewCopy" xml:space="preserve">
|
||||
<value>Copier</value>
|
||||
<value>Copier (Ctrl+C)</value>
|
||||
</data>
|
||||
<data name="menuMsgViewCopyAll" xml:space="preserve">
|
||||
<value>Tout copier</value>
|
||||
</data>
|
||||
<data name="menuMsgViewSelectAll" xml:space="preserve">
|
||||
<value>Tout sélect</value>
|
||||
<value>Tout sélect (Ctrl+A)</value>
|
||||
</data>
|
||||
<data name="menuSubAdd" xml:space="preserve">
|
||||
<value>Ajouter</value>
|
||||
@@ -781,7 +781,7 @@
|
||||
<value>Mode PAC</value>
|
||||
</data>
|
||||
<data name="menuShareServer" xml:space="preserve">
|
||||
<value>Partager</value>
|
||||
<value>Partager (Ctrl+F)</value>
|
||||
</data>
|
||||
<data name="menuRouting" xml:space="preserve">
|
||||
<value>Routage</value>
|
||||
@@ -793,16 +793,16 @@
|
||||
<value>Exécuter en tant qu’administrateur</value>
|
||||
</data>
|
||||
<data name="menuMoveBottom" xml:space="preserve">
|
||||
<value>Déplacer tout en bas</value>
|
||||
<value>Déplacer tout en bas (B)</value>
|
||||
</data>
|
||||
<data name="menuMoveDown" xml:space="preserve">
|
||||
<value>Descendre</value>
|
||||
<value>Descendre (D)</value>
|
||||
</data>
|
||||
<data name="menuMoveTop" xml:space="preserve">
|
||||
<value>Déplacer tout en haut</value>
|
||||
<value>Déplacer tout en haut (T)</value>
|
||||
</data>
|
||||
<data name="menuMoveUp" xml:space="preserve">
|
||||
<value>Monter</value>
|
||||
<value>Monter (U)</value>
|
||||
</data>
|
||||
<data name="MsgFilterTitle" xml:space="preserve">
|
||||
<value>Filtre (regex pris en charge)</value>
|
||||
@@ -817,7 +817,7 @@
|
||||
<value>Importer 1-clic du jeu de règles</value>
|
||||
</data>
|
||||
<data name="menuRoutingAdvancedRemove" xml:space="preserve">
|
||||
<value>Suppr. règles sélectionnées</value>
|
||||
<value>Suppr. règles sélectionnées (Delete)</value>
|
||||
</data>
|
||||
<data name="menuRoutingAdvancedSetDefault" xml:space="preserve">
|
||||
<value>Définir comme règles actives (Entrée)</value>
|
||||
@@ -853,7 +853,7 @@
|
||||
<value>Liste des règles</value>
|
||||
</data>
|
||||
<data name="menuRuleRemove" xml:space="preserve">
|
||||
<value>Supprimer les règles sélectionnées</value>
|
||||
<value>Supprimer les règles sélectionnées (Delete)</value>
|
||||
</data>
|
||||
<data name="menuRoutingRuleDetailsSetting" xml:space="preserve">
|
||||
<value>Paramètres détaillés des règles de routage</value>
|
||||
@@ -922,7 +922,7 @@
|
||||
<value>Ignorer le test</value>
|
||||
</data>
|
||||
<data name="menuEditServer" xml:space="preserve">
|
||||
<value>Éditer</value>
|
||||
<value>Éditer (Ctrl+D)</value>
|
||||
</data>
|
||||
<data name="TbSettingsDoubleClick2Activate" xml:space="preserve">
|
||||
<value>Double-cliquer sur l’interface principale pour activer</value>
|
||||
@@ -976,10 +976,7 @@
|
||||
<value>Activer l’accélération matérielle (redémarrage requis)</value>
|
||||
</data>
|
||||
<data name="SpeedtestingWait" xml:space="preserve">
|
||||
<value>En attente du test...</value>
|
||||
</data>
|
||||
<data name="SpeedtestingPressEscToExit" xml:space="preserve">
|
||||
<value>Appuyer sur Échap pour arrêter</value>
|
||||
<value>En attente du test (appuyer sur Échap pour arrêter)...</value>
|
||||
</data>
|
||||
<data name="TipDisplayLog" xml:space="preserve">
|
||||
<value>Désactiver cette option si coupure anormale</value>
|
||||
@@ -1537,7 +1534,7 @@
|
||||
<value>Supprimer une sous-configuration</value>
|
||||
</data>
|
||||
<data name="menuServerList" xml:space="preserve">
|
||||
<value>Configuration item 1, Auto add from subscription group</value>
|
||||
<value>Liste des configurations</value>
|
||||
</data>
|
||||
<data name="TbFallback" xml:space="preserve">
|
||||
<value>Basculement (failover)</value>
|
||||
@@ -1606,10 +1603,10 @@
|
||||
<value>Certificate Pinning</value>
|
||||
</data>
|
||||
<data name="TbCertPinningTips" xml:space="preserve">
|
||||
<value>Certificat serveur (format PEM, facultatif)
|
||||
Si le certificat est défini, il est fixé et l’option « Ignorer la vérification » est désactivée.
|
||||
<value>Server Certificate (PEM format, optional)
|
||||
When specified, the certificate will be pinned, and "Allow Insecure" will be disabled.
|
||||
|
||||
Si un certificat auto-signé est utilisé ou si le système contient une CA non fiable ou malveillante, l’action « Obtenir le certificat » peut échouer.</value>
|
||||
The "Get Certificate" action may fail if a self-signed certificate is used or if the system contains an untrusted or malicious CA.</value>
|
||||
</data>
|
||||
<data name="TbFetchCert" xml:space="preserve">
|
||||
<value>Obtenir le certificat</value>
|
||||
@@ -1633,9 +1630,6 @@ Si un certificat auto-signé est utilisé ou si le système contient une CA non
|
||||
<value>Chemin script proxy système personnalisé</value>
|
||||
</data>
|
||||
<data name="TbSettingsMacOSShowInDock" xml:space="preserve">
|
||||
<value>Afficher dans le Dock de macOS (redém. requis)</value>
|
||||
</data>
|
||||
<data name="menuServerList2" xml:space="preserve">
|
||||
<value>Configuration Item 2, Select and add from self-built</value>
|
||||
<value>macOS displays this in the Dock (requires restart)</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -472,10 +472,10 @@
|
||||
<value>Nyelv (Újraindítás)</value>
|
||||
</data>
|
||||
<data name="menuAddServerViaClipboard" xml:space="preserve">
|
||||
<value>Megosztási linkek importálása vágólapról</value>
|
||||
<value>Megosztási linkek importálása vágólapról (Ctrl+V)</value>
|
||||
</data>
|
||||
<data name="menuAddServerViaScan" xml:space="preserve">
|
||||
<value>QR kód beolvasása a képernyőről</value>
|
||||
<value>QR kód beolvasása a képernyőről (Ctrl+S)</value>
|
||||
</data>
|
||||
<data name="menuCopyServer" xml:space="preserve">
|
||||
<value>Kijelölt konfiguráció klónozása</value>
|
||||
@@ -484,31 +484,31 @@
|
||||
<value>Ismétlődő konfigurációk eltávolítása</value>
|
||||
</data>
|
||||
<data name="menuRemoveServer" xml:space="preserve">
|
||||
<value>Kijelölt konfigurációk eltávolítása</value>
|
||||
<value>Kijelölt konfigurációk eltávolítása (Delete)</value>
|
||||
</data>
|
||||
<data name="menuSetDefaultServer" xml:space="preserve">
|
||||
<value>Beállítás aktív konfigurációként</value>
|
||||
<value>Beállítás aktív konfigurációként (Enter)</value>
|
||||
</data>
|
||||
<data name="menuClearServerStatistics" xml:space="preserve">
|
||||
<value>Összes szolgáltatás statisztika törlése</value>
|
||||
</data>
|
||||
<data name="menuRealPingServer" xml:space="preserve">
|
||||
<value>Konfigurációk valós késleltetésének tesztelése</value>
|
||||
<value>Konfigurációk valós késleltetésének tesztelése (Ctrl+R)</value>
|
||||
</data>
|
||||
<data name="menuSortServerResult" xml:space="preserve">
|
||||
<value>Rendezés teszteredmény szerint</value>
|
||||
</data>
|
||||
<data name="menuSpeedServer" xml:space="preserve">
|
||||
<value>Konfigurációk letöltési sebességének tesztelése</value>
|
||||
<value>Konfigurációk letöltési sebességének tesztelése (Ctrl+T)</value>
|
||||
</data>
|
||||
<data name="menuTcpingServer" xml:space="preserve">
|
||||
<value>Konfigurációk tesztelése tcpinggel</value>
|
||||
<value>Konfigurációk tesztelése tcpinggel (Ctrl+O)</value>
|
||||
</data>
|
||||
<data name="menuExport2ClientConfig" xml:space="preserve">
|
||||
<value>Kijelölt konfiguráció exportálása teljes konfigurációként</value>
|
||||
</data>
|
||||
<data name="menuExport2ShareUrl" xml:space="preserve">
|
||||
<value>Megosztási link exportálása vágólapra</value>
|
||||
<value>Megosztási link exportálása vágólapra (Ctrl+C)</value>
|
||||
</data>
|
||||
<data name="menuAddCustomServer" xml:space="preserve">
|
||||
<value>Egyéni konfiguráció hozzáadása</value>
|
||||
@@ -529,19 +529,19 @@
|
||||
<value>[VMess] konfiguráció hozzáadása</value>
|
||||
</data>
|
||||
<data name="menuSelectAll" xml:space="preserve">
|
||||
<value>Összes kijelölése</value>
|
||||
<value>Összes kijelölése (Ctrl+A)</value>
|
||||
</data>
|
||||
<data name="menuMsgViewClear" xml:space="preserve">
|
||||
<value>Összes törlése</value>
|
||||
</data>
|
||||
<data name="menuMsgViewCopy" xml:space="preserve">
|
||||
<value>Másolás</value>
|
||||
<value>Másolás (Ctrl+C)</value>
|
||||
</data>
|
||||
<data name="menuMsgViewCopyAll" xml:space="preserve">
|
||||
<value>Összes másolása</value>
|
||||
</data>
|
||||
<data name="menuMsgViewSelectAll" xml:space="preserve">
|
||||
<value>Összes kijelölése</value>
|
||||
<value>Összes kijelölése (Ctrl+A)</value>
|
||||
</data>
|
||||
<data name="menuSubAdd" xml:space="preserve">
|
||||
<value>Hozzáadás</value>
|
||||
@@ -781,7 +781,7 @@
|
||||
<value>PAC mód</value>
|
||||
</data>
|
||||
<data name="menuShareServer" xml:space="preserve">
|
||||
<value>Konfiguráció megosztása</value>
|
||||
<value>Konfiguráció megosztása (Ctrl+F)</value>
|
||||
</data>
|
||||
<data name="menuRouting" xml:space="preserve">
|
||||
<value>Útválasztás</value>
|
||||
@@ -793,16 +793,16 @@
|
||||
<value>Futtatás rendszergazdaként</value>
|
||||
</data>
|
||||
<data name="menuMoveBottom" xml:space="preserve">
|
||||
<value>Mozgatás alulra</value>
|
||||
<value>Mozgatás alulra (B)</value>
|
||||
</data>
|
||||
<data name="menuMoveDown" xml:space="preserve">
|
||||
<value>Le</value>
|
||||
<value>Le (D)</value>
|
||||
</data>
|
||||
<data name="menuMoveTop" xml:space="preserve">
|
||||
<value>Mozgatás felülre</value>
|
||||
<value>Mozgatás felülre (T)</value>
|
||||
</data>
|
||||
<data name="menuMoveUp" xml:space="preserve">
|
||||
<value>Fel</value>
|
||||
<value>Fel (U)</value>
|
||||
</data>
|
||||
<data name="MsgFilterTitle" xml:space="preserve">
|
||||
<value>Szűrő, támogatja a reguláris kifejezéseket</value>
|
||||
@@ -817,10 +817,10 @@
|
||||
<value>Szabályok importálása</value>
|
||||
</data>
|
||||
<data name="menuRoutingAdvancedRemove" xml:space="preserve">
|
||||
<value>Kijelölt eltávolítása</value>
|
||||
<value>Kijelölt eltávolítása (Delete)</value>
|
||||
</data>
|
||||
<data name="menuRoutingAdvancedSetDefault" xml:space="preserve">
|
||||
<value>Beállítás aktív szabályként</value>
|
||||
<value>Beállítás aktív szabályként (Enter)</value>
|
||||
</data>
|
||||
<data name="TbdomainStrategy" xml:space="preserve">
|
||||
<value>Tartomány stratégia</value>
|
||||
@@ -853,7 +853,7 @@
|
||||
<value>Szabálylista</value>
|
||||
</data>
|
||||
<data name="menuRuleRemove" xml:space="preserve">
|
||||
<value>Szabály eltávolítása</value>
|
||||
<value>Szabály eltávolítása (Delete)</value>
|
||||
</data>
|
||||
<data name="menuRoutingRuleDetailsSetting" xml:space="preserve">
|
||||
<value>Útválasztási szabály részleteinek beállítása</value>
|
||||
@@ -922,7 +922,7 @@
|
||||
<value>Teszt kihagyása</value>
|
||||
</data>
|
||||
<data name="menuEditServer" xml:space="preserve">
|
||||
<value>Konfiguráció szerkesztése</value>
|
||||
<value>Konfiguráció szerkesztése (Ctrl+D)</value>
|
||||
</data>
|
||||
<data name="TbSettingsDoubleClick2Activate" xml:space="preserve">
|
||||
<value>Dupla kattintás a konfigurációra aktiválja</value>
|
||||
@@ -976,10 +976,7 @@
|
||||
<value>Hardveres gyorsítás engedélyezése (újraindítást igényel)</value>
|
||||
</data>
|
||||
<data name="SpeedtestingWait" xml:space="preserve">
|
||||
<value>Tesztelésre vár...</value>
|
||||
</data>
|
||||
<data name="SpeedtestingPressEscToExit" xml:space="preserve">
|
||||
<value>ESC megnyomásával megszakítható</value>
|
||||
<value>Tesztelésre vár (ESC megnyomásával megszakítható)...</value>
|
||||
</data>
|
||||
<data name="TipDisplayLog" xml:space="preserve">
|
||||
<value>Kérjük, kapcsolja ki rendellenes megszakadás esetén</value>
|
||||
@@ -1207,7 +1204,7 @@
|
||||
<value>Proxyk frissítése</value>
|
||||
</data>
|
||||
<data name="menuProxiesSelectActivity" xml:space="preserve">
|
||||
<value>Aktív csomópont kiválasztása</value>
|
||||
<value>Aktív csomópont kiválasztása (Enter)</value>
|
||||
</data>
|
||||
<data name="TbSettingsDomainStrategy4Out" xml:space="preserve">
|
||||
<value>Alapértelmezett tartomány stratégia kimenő forgalomhoz</value>
|
||||
@@ -1540,7 +1537,7 @@
|
||||
<value>Remove Child Configuration</value>
|
||||
</data>
|
||||
<data name="menuServerList" xml:space="preserve">
|
||||
<value>Configuration item 1, Auto add from subscription group</value>
|
||||
<value>Configuration List</value>
|
||||
</data>
|
||||
<data name="TbFallback" xml:space="preserve">
|
||||
<value>Fallback</value>
|
||||
@@ -1638,7 +1635,4 @@ The "Get Certificate" action may fail if a self-signed certificate is used or if
|
||||
<data name="TbSettingsMacOSShowInDock" xml:space="preserve">
|
||||
<value>macOS displays this in the Dock (requires restart)</value>
|
||||
</data>
|
||||
<data name="menuServerList2" xml:space="preserve">
|
||||
<value>Configuration Item 2, Select and add from self-built</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -271,7 +271,7 @@
|
||||
<value>Configurations deduplication completed. Old: {0}, New: {1}.</value>
|
||||
</data>
|
||||
<data name="RemoveServer" xml:space="preserve">
|
||||
<value>Are you sure you want to remove?</value>
|
||||
<value>Are you sure you want to remove the Configuration?</value>
|
||||
</data>
|
||||
<data name="SaveClientConfigurationIn" xml:space="preserve">
|
||||
<value>The client configuration file is saved at: {0}</value>
|
||||
@@ -397,7 +397,7 @@
|
||||
<value>Local</value>
|
||||
</data>
|
||||
<data name="MsgServerTitle" xml:space="preserve">
|
||||
<value>Filter, press Enter to execute</value>
|
||||
<value>Configuration filter, press Enter to execute</value>
|
||||
</data>
|
||||
<data name="menuCheckUpdate" xml:space="preserve">
|
||||
<value>Check Update</value>
|
||||
@@ -427,7 +427,7 @@
|
||||
<value>Routing Setting</value>
|
||||
</data>
|
||||
<data name="menuServers" xml:space="preserve">
|
||||
<value>Configuration</value>
|
||||
<value>Configurations</value>
|
||||
</data>
|
||||
<data name="menuSetting" xml:space="preserve">
|
||||
<value>Settings</value>
|
||||
@@ -472,76 +472,76 @@
|
||||
<value>Language (Restart)</value>
|
||||
</data>
|
||||
<data name="menuAddServerViaClipboard" xml:space="preserve">
|
||||
<value>Import Share Links from clipboard</value>
|
||||
<value>Import Share Links from clipboard (Ctrl+V)</value>
|
||||
</data>
|
||||
<data name="menuAddServerViaScan" xml:space="preserve">
|
||||
<value>Scan QR code on the screen</value>
|
||||
<value>Scan QR code on the screen (Ctrl+S)</value>
|
||||
</data>
|
||||
<data name="menuCopyServer" xml:space="preserve">
|
||||
<value>Clone selected</value>
|
||||
<value>Clone selected Configuration</value>
|
||||
</data>
|
||||
<data name="menuRemoveDuplicateServer" xml:space="preserve">
|
||||
<value>Remove duplicate</value>
|
||||
<value>Remove duplicate Configurations</value>
|
||||
</data>
|
||||
<data name="menuRemoveServer" xml:space="preserve">
|
||||
<value>Remove selected</value>
|
||||
<value>Remove selected Configurations (Delete)</value>
|
||||
</data>
|
||||
<data name="menuSetDefaultServer" xml:space="preserve">
|
||||
<value>Set as active</value>
|
||||
<value>Set as active Configuration (Enter)</value>
|
||||
</data>
|
||||
<data name="menuClearServerStatistics" xml:space="preserve">
|
||||
<value>Clear all service statistics</value>
|
||||
</data>
|
||||
<data name="menuRealPingServer" xml:space="preserve">
|
||||
<value>Test real delay</value>
|
||||
<value>Test Configurations real delay (Ctrl+R)</value>
|
||||
</data>
|
||||
<data name="menuSortServerResult" xml:space="preserve">
|
||||
<value>Sort by test result</value>
|
||||
</data>
|
||||
<data name="menuSpeedServer" xml:space="preserve">
|
||||
<value>Test download speed</value>
|
||||
<value>Test Configurations download speed (Ctrl+T)</value>
|
||||
</data>
|
||||
<data name="menuTcpingServer" xml:space="preserve">
|
||||
<value>Test tcping</value>
|
||||
<value>Test Configurations with tcping (Ctrl+O)</value>
|
||||
</data>
|
||||
<data name="menuExport2ClientConfig" xml:space="preserve">
|
||||
<value>Export selected for complete configuration</value>
|
||||
<value>Export selected Configuration for complete configuration</value>
|
||||
</data>
|
||||
<data name="menuExport2ShareUrl" xml:space="preserve">
|
||||
<value>Export Share Link to Clipboard</value>
|
||||
<value>Export Share Link to Clipboard (Ctrl+C)</value>
|
||||
</data>
|
||||
<data name="menuAddCustomServer" xml:space="preserve">
|
||||
<value>Add a custom configuration</value>
|
||||
<value>Add a custom configuration Configuration</value>
|
||||
</data>
|
||||
<data name="menuAddShadowsocksServer" xml:space="preserve">
|
||||
<value>Add [Shadowsocks] </value>
|
||||
<value>Add [Shadowsocks] Configuration</value>
|
||||
</data>
|
||||
<data name="menuAddSocksServer" xml:space="preserve">
|
||||
<value>Add [SOCKS] </value>
|
||||
<value>Add [SOCKS] Configuration</value>
|
||||
</data>
|
||||
<data name="menuAddTrojanServer" xml:space="preserve">
|
||||
<value>Add [Trojan] </value>
|
||||
<value>Add [Trojan] Configuration</value>
|
||||
</data>
|
||||
<data name="menuAddVlessServer" xml:space="preserve">
|
||||
<value>Add [VLESS] </value>
|
||||
<value>Add [VLESS] Configuration</value>
|
||||
</data>
|
||||
<data name="menuAddVmessServer" xml:space="preserve">
|
||||
<value>Add [VMess] </value>
|
||||
<value>Add [VMess] Configuration</value>
|
||||
</data>
|
||||
<data name="menuSelectAll" xml:space="preserve">
|
||||
<value>Select all</value>
|
||||
<value>Select all (Ctrl+A)</value>
|
||||
</data>
|
||||
<data name="menuMsgViewClear" xml:space="preserve">
|
||||
<value>Clear all</value>
|
||||
</data>
|
||||
<data name="menuMsgViewCopy" xml:space="preserve">
|
||||
<value>Copy</value>
|
||||
<value>Copy (Ctrl+C)</value>
|
||||
</data>
|
||||
<data name="menuMsgViewCopyAll" xml:space="preserve">
|
||||
<value>Copy all</value>
|
||||
</data>
|
||||
<data name="menuMsgViewSelectAll" xml:space="preserve">
|
||||
<value>Select all</value>
|
||||
<value>Select all (Ctrl+A)</value>
|
||||
</data>
|
||||
<data name="menuSubAdd" xml:space="preserve">
|
||||
<value>Add</value>
|
||||
@@ -748,7 +748,7 @@
|
||||
<value>System proxy settings</value>
|
||||
</data>
|
||||
<data name="TbSettingsTrayMenuServersLimit" xml:space="preserve">
|
||||
<value>Tray right-click menu display limit</value>
|
||||
<value>Tray right-click menu Configurations display limit</value>
|
||||
</data>
|
||||
<data name="TbSettingsUdpEnabled" xml:space="preserve">
|
||||
<value>Enable UDP</value>
|
||||
@@ -781,7 +781,7 @@
|
||||
<value>PAC mode</value>
|
||||
</data>
|
||||
<data name="menuShareServer" xml:space="preserve">
|
||||
<value>Share</value>
|
||||
<value>Share Configuration (Ctrl+F)</value>
|
||||
</data>
|
||||
<data name="menuRouting" xml:space="preserve">
|
||||
<value>Routing</value>
|
||||
@@ -793,16 +793,16 @@
|
||||
<value>Run as Admin</value>
|
||||
</data>
|
||||
<data name="menuMoveBottom" xml:space="preserve">
|
||||
<value>Move to bottom</value>
|
||||
<value>Move to bottom (B)</value>
|
||||
</data>
|
||||
<data name="menuMoveDown" xml:space="preserve">
|
||||
<value>Down</value>
|
||||
<value>Down (D)</value>
|
||||
</data>
|
||||
<data name="menuMoveTop" xml:space="preserve">
|
||||
<value>Move to top</value>
|
||||
<value>Move to top (T)</value>
|
||||
</data>
|
||||
<data name="menuMoveUp" xml:space="preserve">
|
||||
<value>Up</value>
|
||||
<value>Up (U)</value>
|
||||
</data>
|
||||
<data name="MsgFilterTitle" xml:space="preserve">
|
||||
<value>Filter, supports regular expressions</value>
|
||||
@@ -817,10 +817,10 @@
|
||||
<value>Import Rules</value>
|
||||
</data>
|
||||
<data name="menuRoutingAdvancedRemove" xml:space="preserve">
|
||||
<value>Remove selected</value>
|
||||
<value>Remove selected (Delete)</value>
|
||||
</data>
|
||||
<data name="menuRoutingAdvancedSetDefault" xml:space="preserve">
|
||||
<value>Set as active rule</value>
|
||||
<value>Set as active rule (Enter)</value>
|
||||
</data>
|
||||
<data name="TbdomainStrategy" xml:space="preserve">
|
||||
<value>Domain strategy</value>
|
||||
@@ -853,7 +853,7 @@
|
||||
<value>Rule List</value>
|
||||
</data>
|
||||
<data name="menuRuleRemove" xml:space="preserve">
|
||||
<value>Remove Rule</value>
|
||||
<value>Remove Rule (Delete)</value>
|
||||
</data>
|
||||
<data name="menuRoutingRuleDetailsSetting" xml:space="preserve">
|
||||
<value>Routing Rule Details Setting</value>
|
||||
@@ -922,7 +922,7 @@
|
||||
<value>Skip test</value>
|
||||
</data>
|
||||
<data name="menuEditServer" xml:space="preserve">
|
||||
<value>Edit </value>
|
||||
<value>Edit Configuration (Ctrl+D)</value>
|
||||
</data>
|
||||
<data name="TbSettingsDoubleClick2Activate" xml:space="preserve">
|
||||
<value>Double-clicking Configuration makes it active</value>
|
||||
@@ -976,10 +976,7 @@
|
||||
<value>Enable hardware acceleration (requires restart)</value>
|
||||
</data>
|
||||
<data name="SpeedtestingWait" xml:space="preserve">
|
||||
<value>Waiting...</value>
|
||||
</data>
|
||||
<data name="SpeedtestingPressEscToExit" xml:space="preserve">
|
||||
<value>Press ESC to terminate the test</value>
|
||||
<value>Waiting for testing (press ESC to terminate)...</value>
|
||||
</data>
|
||||
<data name="TipDisplayLog" xml:space="preserve">
|
||||
<value>Please turn off when there is an abnormal disconnection</value>
|
||||
@@ -1036,7 +1033,7 @@
|
||||
<value>Domain</value>
|
||||
</data>
|
||||
<data name="menuAddHysteria2Server" xml:space="preserve">
|
||||
<value>Add [Hysteria2] </value>
|
||||
<value>Add [Hysteria2] Configuration</value>
|
||||
</data>
|
||||
<data name="TbSettingsHysteriaBandwidth" xml:space="preserve">
|
||||
<value>Hysteria Max bandwidth (Up/Down)</value>
|
||||
@@ -1045,16 +1042,16 @@
|
||||
<value>Use System Hosts</value>
|
||||
</data>
|
||||
<data name="menuAddTuicServer" xml:space="preserve">
|
||||
<value>Add [TUIC] </value>
|
||||
<value>Add [TUIC] Configuration</value>
|
||||
</data>
|
||||
<data name="TbHeaderType8" xml:space="preserve">
|
||||
<value>Congestion control</value>
|
||||
</data>
|
||||
<data name="LvPrevProfile" xml:space="preserve">
|
||||
<value>Previous proxy remarks</value>
|
||||
<value>Previous proxy Configuration remarks</value>
|
||||
</data>
|
||||
<data name="LvNextProfile" xml:space="preserve">
|
||||
<value>Next proxy remarks</value>
|
||||
<value>Next proxy Configuration remarks</value>
|
||||
</data>
|
||||
<data name="LvPrevProfileTip" xml:space="preserve">
|
||||
<value>Please make sure the Configuration remarks exist and are unique</value>
|
||||
@@ -1078,7 +1075,7 @@
|
||||
<value>Enable IPv6 Address</value>
|
||||
</data>
|
||||
<data name="menuAddWireguardServer" xml:space="preserve">
|
||||
<value>Add [WireGuard] </value>
|
||||
<value>Add [WireGuard] Configuration</value>
|
||||
</data>
|
||||
<data name="TbPrivateKey" xml:space="preserve">
|
||||
<value>Private Key</value>
|
||||
@@ -1111,7 +1108,7 @@
|
||||
<value>*grpc Authority</value>
|
||||
</data>
|
||||
<data name="menuAddHttpServer" xml:space="preserve">
|
||||
<value>Add [HTTP]</value>
|
||||
<value>Add [HTTP] Configuration</value>
|
||||
</data>
|
||||
<data name="TbSettingsEnableFragmentTips" xml:space="preserve">
|
||||
<value>which conflicts with the group previous proxy</value>
|
||||
@@ -1207,7 +1204,7 @@
|
||||
<value>Refresh Proxies</value>
|
||||
</data>
|
||||
<data name="menuProxiesSelectActivity" xml:space="preserve">
|
||||
<value>Select active node</value>
|
||||
<value>Select active node (Enter)</value>
|
||||
</data>
|
||||
<data name="TbSettingsDomainStrategy4Out" xml:space="preserve">
|
||||
<value>Default domain strategy for outbound</value>
|
||||
@@ -1225,7 +1222,7 @@
|
||||
<value>Export Base64-encoded Share Links to Clipboard</value>
|
||||
</data>
|
||||
<data name="menuExport2ClientConfigClipboard" xml:space="preserve">
|
||||
<value>Export selected for complete configuration to clipboard</value>
|
||||
<value>Export selected Configuration for complete configuration to clipboard</value>
|
||||
</data>
|
||||
<data name="menuShowOrHideMainWindow" xml:space="preserve">
|
||||
<value>Show or hide the main window</value>
|
||||
@@ -1381,22 +1378,22 @@
|
||||
<value>Generate Policy Group from Multiple Profiles</value>
|
||||
</data>
|
||||
<data name="menuGenGroupMultipleServerXrayRandom" xml:space="preserve">
|
||||
<value>Random by Xray</value>
|
||||
<value>Multi-Configuration Random by Xray</value>
|
||||
</data>
|
||||
<data name="menuGenGroupMultipleServerXrayRoundRobin" xml:space="preserve">
|
||||
<value>RoundRobin by Xray</value>
|
||||
<value>Multi-Configuration RoundRobin by Xray</value>
|
||||
</data>
|
||||
<data name="menuGenGroupMultipleServerXrayLeastPing" xml:space="preserve">
|
||||
<value>LeastPing by Xray</value>
|
||||
<value>Multi-Configuration LeastPing by Xray</value>
|
||||
</data>
|
||||
<data name="menuGenGroupMultipleServerXrayLeastLoad" xml:space="preserve">
|
||||
<value>LeastLoad by Xray</value>
|
||||
<value>Multi-Configuration LeastLoad by Xray</value>
|
||||
</data>
|
||||
<data name="menuGenGroupMultipleServerSingBoxLeastPing" xml:space="preserve">
|
||||
<value>LeastPing by sing-box</value>
|
||||
<value>Multi-Configuration LeastPing by sing-box</value>
|
||||
</data>
|
||||
<data name="menuExportConfig" xml:space="preserve">
|
||||
<value>Export</value>
|
||||
<value>Export Configuration</value>
|
||||
</data>
|
||||
<data name="TbSettingsIPAPIUrl" xml:space="preserve">
|
||||
<value>Current connection info test URL</value>
|
||||
@@ -1411,7 +1408,7 @@
|
||||
<value>Mldsa65Verify</value>
|
||||
</data>
|
||||
<data name="menuAddAnytlsServer" xml:space="preserve">
|
||||
<value>Add [Anytls]</value>
|
||||
<value>Add [Anytls] Configuration</value>
|
||||
</data>
|
||||
<data name="TbRemoteDNS" xml:space="preserve">
|
||||
<value>Remote DNS</value>
|
||||
@@ -1528,28 +1525,28 @@
|
||||
<value>Policy Group Type</value>
|
||||
</data>
|
||||
<data name="menuAddPolicyGroupServer" xml:space="preserve">
|
||||
<value>Add Policy Group </value>
|
||||
<value>Add Policy Group Configuration</value>
|
||||
</data>
|
||||
<data name="menuAddProxyChainServer" xml:space="preserve">
|
||||
<value>Add Proxy Chain</value>
|
||||
<value>Add Proxy Chain Configuration</value>
|
||||
</data>
|
||||
<data name="menuAddChildServer" xml:space="preserve">
|
||||
<value>Add Child </value>
|
||||
<value>Add Child Configuration</value>
|
||||
</data>
|
||||
<data name="menuRemoveChildServer" xml:space="preserve">
|
||||
<value>Remove Child </value>
|
||||
<value>Remove Child Configuration</value>
|
||||
</data>
|
||||
<data name="menuServerList" xml:space="preserve">
|
||||
<value>Configuration item 1, Auto add from subscription group</value>
|
||||
<value>Configuration List</value>
|
||||
</data>
|
||||
<data name="TbFallback" xml:space="preserve">
|
||||
<value>Fallback</value>
|
||||
</data>
|
||||
<data name="menuGenGroupMultipleServerSingBoxFallback" xml:space="preserve">
|
||||
<value>Fallback by sing-box</value>
|
||||
<value>Multi-Configuration Fallback by sing-box</value>
|
||||
</data>
|
||||
<data name="menuGenGroupMultipleServerXrayFallback" xml:space="preserve">
|
||||
<value>Fallback by Xray</value>
|
||||
<value>Multi-Configuration Fallback by Xray</value>
|
||||
</data>
|
||||
<data name="CoreNotSupportNetwork" xml:space="preserve">
|
||||
<value>Core '{0}' does not support network type '{1}'.</value>
|
||||
@@ -1638,7 +1635,4 @@ The "Get Certificate" action may fail if a self-signed certificate is used or if
|
||||
<data name="TbSettingsMacOSShowInDock" xml:space="preserve">
|
||||
<value>macOS displays this in the Dock (requires restart)</value>
|
||||
</data>
|
||||
<data name="menuServerList2" xml:space="preserve">
|
||||
<value>Configuration Item 2, Select and add from self-built</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -472,10 +472,10 @@
|
||||
<value>Язык (требуется перезапуск)</value>
|
||||
</data>
|
||||
<data name="menuAddServerViaClipboard" xml:space="preserve">
|
||||
<value>Импорт массива URL из буфера обмена</value>
|
||||
<value>Импорт массива URL из буфера обмена (Ctrl+V)</value>
|
||||
</data>
|
||||
<data name="menuAddServerViaScan" xml:space="preserve">
|
||||
<value>Сканировать QR-код с экрана</value>
|
||||
<value>Сканировать QR-код с экрана (Ctrl+S)</value>
|
||||
</data>
|
||||
<data name="menuCopyServer" xml:space="preserve">
|
||||
<value>Клонировать выбранный сервер</value>
|
||||
@@ -484,31 +484,31 @@
|
||||
<value>Удалить дубликаты серверов</value>
|
||||
</data>
|
||||
<data name="menuRemoveServer" xml:space="preserve">
|
||||
<value>Удалить выбранные серверы</value>
|
||||
<value>Удалить выбранные серверы (Delete)</value>
|
||||
</data>
|
||||
<data name="menuSetDefaultServer" xml:space="preserve">
|
||||
<value>Установить как активный сервер</value>
|
||||
<value>Установить как активный сервер (Enter)</value>
|
||||
</data>
|
||||
<data name="menuClearServerStatistics" xml:space="preserve">
|
||||
<value>Очистить всю статистику</value>
|
||||
</data>
|
||||
<data name="menuRealPingServer" xml:space="preserve">
|
||||
<value>Тест на реальную задержку сервера</value>
|
||||
<value>Тест на реальную задержку сервера (Ctrl+R)</value>
|
||||
</data>
|
||||
<data name="menuSortServerResult" xml:space="preserve">
|
||||
<value>Сортировать по результату теста</value>
|
||||
</data>
|
||||
<data name="menuSpeedServer" xml:space="preserve">
|
||||
<value>Тест на скорость загрузки сервера</value>
|
||||
<value>Тест на скорость загрузки сервера (Ctrl+T)</value>
|
||||
</data>
|
||||
<data name="menuTcpingServer" xml:space="preserve">
|
||||
<value>Тест задержки с tcping</value>
|
||||
<value>Тест задержки с tcping (Ctrl+O)</value>
|
||||
</data>
|
||||
<data name="menuExport2ClientConfig" xml:space="preserve">
|
||||
<value>Экспортировать выбранный сервер для клиента</value>
|
||||
</data>
|
||||
<data name="menuExport2ShareUrl" xml:space="preserve">
|
||||
<value>Экспорт URL-адресов общего доступа в буфер обмена</value>
|
||||
<value>Экспорт URL-адресов общего доступа в буфер обмена (Ctrl+C)</value>
|
||||
</data>
|
||||
<data name="menuAddCustomServer" xml:space="preserve">
|
||||
<value>Добавить сервер пользовательской конфигурации</value>
|
||||
@@ -529,19 +529,19 @@
|
||||
<value>Добавить сервер [VMess]</value>
|
||||
</data>
|
||||
<data name="menuSelectAll" xml:space="preserve">
|
||||
<value>Выбрать все</value>
|
||||
<value>Выбрать все (Ctrl+A)</value>
|
||||
</data>
|
||||
<data name="menuMsgViewClear" xml:space="preserve">
|
||||
<value>Очистить все</value>
|
||||
</data>
|
||||
<data name="menuMsgViewCopy" xml:space="preserve">
|
||||
<value>Скопировать</value>
|
||||
<value>Скопировать (Ctrl+C)</value>
|
||||
</data>
|
||||
<data name="menuMsgViewCopyAll" xml:space="preserve">
|
||||
<value>Скопировать все</value>
|
||||
</data>
|
||||
<data name="menuMsgViewSelectAll" xml:space="preserve">
|
||||
<value>Выбрать все</value>
|
||||
<value>Выбрать все (Ctrl+A)</value>
|
||||
</data>
|
||||
<data name="menuSubAdd" xml:space="preserve">
|
||||
<value>Добавить</value>
|
||||
@@ -781,7 +781,7 @@
|
||||
<value>Режим PAC</value>
|
||||
</data>
|
||||
<data name="menuShareServer" xml:space="preserve">
|
||||
<value>Поделиться сервером</value>
|
||||
<value>Поделиться сервером (Ctrl+F)</value>
|
||||
</data>
|
||||
<data name="menuRouting" xml:space="preserve">
|
||||
<value>Маршрутизация</value>
|
||||
@@ -793,16 +793,16 @@
|
||||
<value>Администратор</value>
|
||||
</data>
|
||||
<data name="menuMoveBottom" xml:space="preserve">
|
||||
<value>Спуститься вниз</value>
|
||||
<value>Спуститься вниз (B)</value>
|
||||
</data>
|
||||
<data name="menuMoveDown" xml:space="preserve">
|
||||
<value>Вниз</value>
|
||||
<value>Вниз (D)</value>
|
||||
</data>
|
||||
<data name="menuMoveTop" xml:space="preserve">
|
||||
<value>Подняться наверх</value>
|
||||
<value>Подняться наверх (T)</value>
|
||||
</data>
|
||||
<data name="menuMoveUp" xml:space="preserve">
|
||||
<value>Вверх</value>
|
||||
<value>Вверх (U)</value>
|
||||
</data>
|
||||
<data name="MsgFilterTitle" xml:space="preserve">
|
||||
<value>Фильтр, поддерживает regex</value>
|
||||
@@ -853,7 +853,7 @@
|
||||
<value>Список правил</value>
|
||||
</data>
|
||||
<data name="menuRuleRemove" xml:space="preserve">
|
||||
<value>Удалить правила</value>
|
||||
<value>Удалить правила (Delete)</value>
|
||||
</data>
|
||||
<data name="menuRoutingRuleDetailsSetting" xml:space="preserve">
|
||||
<value>Детальные настройки правил маршрутизации</value>
|
||||
@@ -922,7 +922,7 @@
|
||||
<value>Пропустить тест</value>
|
||||
</data>
|
||||
<data name="menuEditServer" xml:space="preserve">
|
||||
<value>Редактировать сервер</value>
|
||||
<value>Редактировать сервер (Ctrl+D)</value>
|
||||
</data>
|
||||
<data name="TbSettingsDoubleClick2Activate" xml:space="preserve">
|
||||
<value>Двойной клик чтобы сделать сервер активным</value>
|
||||
@@ -976,10 +976,7 @@
|
||||
<value>Включить аппаратное ускорение (требуется перезагрузка)</value>
|
||||
</data>
|
||||
<data name="SpeedtestingWait" xml:space="preserve">
|
||||
<value>Ожидание тестирования…</value>
|
||||
</data>
|
||||
<data name="SpeedtestingPressEscToExit" xml:space="preserve">
|
||||
<value>нажмите ESC для отмены</value>
|
||||
<value>Ожидание тестирования (нажмите ESC для отмены)…</value>
|
||||
</data>
|
||||
<data name="TipDisplayLog" xml:space="preserve">
|
||||
<value>Отключите при аномальном разрыве соединения</value>
|
||||
@@ -1207,7 +1204,7 @@
|
||||
<value>Обновить прокси</value>
|
||||
</data>
|
||||
<data name="menuProxiesSelectActivity" xml:space="preserve">
|
||||
<value>Сделать узел активным</value>
|
||||
<value>Сделать узел активным (Enter)</value>
|
||||
</data>
|
||||
<data name="TbSettingsDomainStrategy4Out" xml:space="preserve">
|
||||
<value>Стратегия домена по умолчанию для исходящих</value>
|
||||
@@ -1540,7 +1537,7 @@
|
||||
<value>Remove Child Configuration</value>
|
||||
</data>
|
||||
<data name="menuServerList" xml:space="preserve">
|
||||
<value>Configuration item 1, Auto add from subscription group</value>
|
||||
<value>Configuration List</value>
|
||||
</data>
|
||||
<data name="TbFallback" xml:space="preserve">
|
||||
<value>Fallback</value>
|
||||
@@ -1638,7 +1635,4 @@ The "Get Certificate" action may fail if a self-signed certificate is used or if
|
||||
<data name="TbSettingsMacOSShowInDock" xml:space="preserve">
|
||||
<value>macOS displays this in the Dock (requires restart)</value>
|
||||
</data>
|
||||
<data name="menuServerList2" xml:space="preserve">
|
||||
<value>Configuration Item 2, Select and add from self-built</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -472,10 +472,10 @@
|
||||
<value>语言 (需重启)</value>
|
||||
</data>
|
||||
<data name="menuAddServerViaClipboard" xml:space="preserve">
|
||||
<value>从剪贴板导入分享链接</value>
|
||||
<value>从剪贴板导入分享链接 (Ctrl+V)</value>
|
||||
</data>
|
||||
<data name="menuAddServerViaScan" xml:space="preserve">
|
||||
<value>扫描屏幕上的二维码</value>
|
||||
<value>扫描屏幕上的二维码 (Ctrl+S)</value>
|
||||
</data>
|
||||
<data name="menuCopyServer" xml:space="preserve">
|
||||
<value>克隆所选</value>
|
||||
@@ -484,31 +484,31 @@
|
||||
<value>移除重复</value>
|
||||
</data>
|
||||
<data name="menuRemoveServer" xml:space="preserve">
|
||||
<value>移除所选 (多选)</value>
|
||||
<value>移除所选 (多选) (Delete)</value>
|
||||
</data>
|
||||
<data name="menuSetDefaultServer" xml:space="preserve">
|
||||
<value>设为活动</value>
|
||||
<value>设为活动 (Enter)</value>
|
||||
</data>
|
||||
<data name="menuClearServerStatistics" xml:space="preserve">
|
||||
<value>清除所有服务统计数据</value>
|
||||
</data>
|
||||
<data name="menuRealPingServer" xml:space="preserve">
|
||||
<value>测试真连接延迟 (多选)</value>
|
||||
<value>测试真连接延迟 (多选) (Ctrl+R)</value>
|
||||
</data>
|
||||
<data name="menuSortServerResult" xml:space="preserve">
|
||||
<value>按测试结果排序</value>
|
||||
</data>
|
||||
<data name="menuSpeedServer" xml:space="preserve">
|
||||
<value>测试速度 (多选)</value>
|
||||
<value>测试速度 (多选) (Ctrl+T)</value>
|
||||
</data>
|
||||
<data name="menuTcpingServer" xml:space="preserve">
|
||||
<value>测试延迟 Tcping (多选)</value>
|
||||
<value>测试延迟 Tcping (多选) (Ctrl+O)</value>
|
||||
</data>
|
||||
<data name="menuExport2ClientConfig" xml:space="preserve">
|
||||
<value>导出所选完整配置</value>
|
||||
</data>
|
||||
<data name="menuExport2ShareUrl" xml:space="preserve">
|
||||
<value>导出分享链接至剪贴板 (多选)</value>
|
||||
<value>导出分享链接至剪贴板 (多选) (Ctrl+C)</value>
|
||||
</data>
|
||||
<data name="menuAddCustomServer" xml:space="preserve">
|
||||
<value>添加自定义配置</value>
|
||||
@@ -529,19 +529,19 @@
|
||||
<value>添加 [VMess] </value>
|
||||
</data>
|
||||
<data name="menuSelectAll" xml:space="preserve">
|
||||
<value>全选</value>
|
||||
<value>全选 (Ctrl+A)</value>
|
||||
</data>
|
||||
<data name="menuMsgViewClear" xml:space="preserve">
|
||||
<value>清除所有</value>
|
||||
</data>
|
||||
<data name="menuMsgViewCopy" xml:space="preserve">
|
||||
<value>复制</value>
|
||||
<value>复制 (Ctrl+C)</value>
|
||||
</data>
|
||||
<data name="menuMsgViewCopyAll" xml:space="preserve">
|
||||
<value>复制所有</value>
|
||||
</data>
|
||||
<data name="menuMsgViewSelectAll" xml:space="preserve">
|
||||
<value>全选</value>
|
||||
<value>全选 (Ctrl+A)</value>
|
||||
</data>
|
||||
<data name="menuSubAdd" xml:space="preserve">
|
||||
<value>添加</value>
|
||||
@@ -781,7 +781,7 @@
|
||||
<value>Pac 模式</value>
|
||||
</data>
|
||||
<data name="menuShareServer" xml:space="preserve">
|
||||
<value>分享</value>
|
||||
<value>分享 (Ctrl+F)</value>
|
||||
</data>
|
||||
<data name="menuRouting" xml:space="preserve">
|
||||
<value>路由</value>
|
||||
@@ -793,16 +793,16 @@
|
||||
<value>以管理员身份运行</value>
|
||||
</data>
|
||||
<data name="menuMoveBottom" xml:space="preserve">
|
||||
<value>下移至底</value>
|
||||
<value>下移至底 (B)</value>
|
||||
</data>
|
||||
<data name="menuMoveDown" xml:space="preserve">
|
||||
<value>下移</value>
|
||||
<value>下移 (D)</value>
|
||||
</data>
|
||||
<data name="menuMoveTop" xml:space="preserve">
|
||||
<value>上移至顶</value>
|
||||
<value>上移至顶 (T)</value>
|
||||
</data>
|
||||
<data name="menuMoveUp" xml:space="preserve">
|
||||
<value>上移</value>
|
||||
<value>上移 (U)</value>
|
||||
</data>
|
||||
<data name="MsgFilterTitle" xml:space="preserve">
|
||||
<value>过滤器 (支持正则)</value>
|
||||
@@ -817,10 +817,10 @@
|
||||
<value>一键导入规则集</value>
|
||||
</data>
|
||||
<data name="menuRoutingAdvancedRemove" xml:space="preserve">
|
||||
<value>移除所选规则</value>
|
||||
<value>移除所选规则 (Delete)</value>
|
||||
</data>
|
||||
<data name="menuRoutingAdvancedSetDefault" xml:space="preserve">
|
||||
<value>设为活动规则</value>
|
||||
<value>设为活动规则 (Enter)</value>
|
||||
</data>
|
||||
<data name="TbdomainStrategy" xml:space="preserve">
|
||||
<value>域名解析策略</value>
|
||||
@@ -853,7 +853,7 @@
|
||||
<value>规则列表</value>
|
||||
</data>
|
||||
<data name="menuRuleRemove" xml:space="preserve">
|
||||
<value>移除所选规则</value>
|
||||
<value>移除所选规则 (Delete)</value>
|
||||
</data>
|
||||
<data name="menuRoutingRuleDetailsSetting" xml:space="preserve">
|
||||
<value>路由规则详情设置</value>
|
||||
@@ -922,7 +922,7 @@
|
||||
<value>跳过测试</value>
|
||||
</data>
|
||||
<data name="menuEditServer" xml:space="preserve">
|
||||
<value>编辑</value>
|
||||
<value>编辑 (Ctrl+D)</value>
|
||||
</data>
|
||||
<data name="TbSettingsDoubleClick2Activate" xml:space="preserve">
|
||||
<value>主界面双击设为活动</value>
|
||||
@@ -976,10 +976,7 @@
|
||||
<value>启用硬件加速 (需重启)</value>
|
||||
</data>
|
||||
<data name="SpeedtestingWait" xml:space="preserve">
|
||||
<value>等待测试...</value>
|
||||
</data>
|
||||
<data name="SpeedtestingPressEscToExit" xml:space="preserve">
|
||||
<value>按 ESC 可终止测试</value>
|
||||
<value>等待测试中 (按 ESC 终止)...</value>
|
||||
</data>
|
||||
<data name="TipDisplayLog" xml:space="preserve">
|
||||
<value>当有异常断流时请关闭</value>
|
||||
@@ -1204,7 +1201,7 @@
|
||||
<value>刷新</value>
|
||||
</data>
|
||||
<data name="menuProxiesSelectActivity" xml:space="preserve">
|
||||
<value>设为活动</value>
|
||||
<value>设为活动 (Enter)</value>
|
||||
</data>
|
||||
<data name="TbSettingsDomainStrategy4Out" xml:space="preserve">
|
||||
<value>Outbound 默认解析策略</value>
|
||||
@@ -1537,7 +1534,7 @@
|
||||
<value>删除子配置</value>
|
||||
</data>
|
||||
<data name="menuServerList" xml:space="preserve">
|
||||
<value>子配置项一,从订阅分组中自动添加</value>
|
||||
<value>子配置项</value>
|
||||
</data>
|
||||
<data name="TbFallback" xml:space="preserve">
|
||||
<value>故障转移</value>
|
||||
@@ -1635,7 +1632,4 @@
|
||||
<data name="TbSettingsMacOSShowInDock" xml:space="preserve">
|
||||
<value>macOS 在 Dock 栏中显示 (需重启)</value>
|
||||
</data>
|
||||
<data name="menuServerList2" xml:space="preserve">
|
||||
<value>子配置项二,从自建中选择添加</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -472,10 +472,10 @@
|
||||
<value>語言 (需重啟)</value>
|
||||
</data>
|
||||
<data name="menuAddServerViaClipboard" xml:space="preserve">
|
||||
<value>從剪貼簿導入分享連結</value>
|
||||
<value>從剪貼簿導入分享連結 (Ctrl+V)</value>
|
||||
</data>
|
||||
<data name="menuAddServerViaScan" xml:space="preserve">
|
||||
<value>掃描螢幕上的二維碼</value>
|
||||
<value>掃描螢幕上的二維碼 (Ctrl+S)</value>
|
||||
</data>
|
||||
<data name="menuCopyServer" xml:space="preserve">
|
||||
<value>複製所選</value>
|
||||
@@ -484,31 +484,31 @@
|
||||
<value>移除重複</value>
|
||||
</data>
|
||||
<data name="menuRemoveServer" xml:space="preserve">
|
||||
<value>移除所選 (多選)</value>
|
||||
<value>移除所選 (多選) (Delete)</value>
|
||||
</data>
|
||||
<data name="menuSetDefaultServer" xml:space="preserve">
|
||||
<value>設為活動</value>
|
||||
<value>設為活動 (Enter)</value>
|
||||
</data>
|
||||
<data name="menuClearServerStatistics" xml:space="preserve">
|
||||
<value>清除所有服務統計資料</value>
|
||||
</data>
|
||||
<data name="menuRealPingServer" xml:space="preserve">
|
||||
<value>測試真連線延遲 (多選)</value>
|
||||
<value>測試真連線延遲 (多選) (Ctrl+R)</value>
|
||||
</data>
|
||||
<data name="menuSortServerResult" xml:space="preserve">
|
||||
<value>按測試結果排序</value>
|
||||
</data>
|
||||
<data name="menuSpeedServer" xml:space="preserve">
|
||||
<value>測試速度 (多選)</value>
|
||||
<value>測試速度 (多選) (Ctrl+T)</value>
|
||||
</data>
|
||||
<data name="menuTcpingServer" xml:space="preserve">
|
||||
<value>測試延遲 Tcping (多選)</value>
|
||||
<value>測試延遲 Tcping (多選) (Ctrl+O)</value>
|
||||
</data>
|
||||
<data name="menuExport2ClientConfig" xml:space="preserve">
|
||||
<value>匯出所選完整設定</value>
|
||||
</data>
|
||||
<data name="menuExport2ShareUrl" xml:space="preserve">
|
||||
<value>匯出分享連結至剪貼簿 (多選)</value>
|
||||
<value>匯出分享連結至剪貼簿 (多選) (Ctrl+C)</value>
|
||||
</data>
|
||||
<data name="menuAddCustomServer" xml:space="preserve">
|
||||
<value>新增自訂節點</value>
|
||||
@@ -529,19 +529,19 @@
|
||||
<value>新增 [VMess] 節點</value>
|
||||
</data>
|
||||
<data name="menuSelectAll" xml:space="preserve">
|
||||
<value>全選</value>
|
||||
<value>全選 (Ctrl+A)</value>
|
||||
</data>
|
||||
<data name="menuMsgViewClear" xml:space="preserve">
|
||||
<value>清除所有</value>
|
||||
</data>
|
||||
<data name="menuMsgViewCopy" xml:space="preserve">
|
||||
<value>複製</value>
|
||||
<value>複製 (Ctrl+C)</value>
|
||||
</data>
|
||||
<data name="menuMsgViewCopyAll" xml:space="preserve">
|
||||
<value>複製所有</value>
|
||||
</data>
|
||||
<data name="menuMsgViewSelectAll" xml:space="preserve">
|
||||
<value>全選</value>
|
||||
<value>全選 (Ctrl+A)</value>
|
||||
</data>
|
||||
<data name="menuSubAdd" xml:space="preserve">
|
||||
<value>新增</value>
|
||||
@@ -781,7 +781,7 @@
|
||||
<value>PAC 模式</value>
|
||||
</data>
|
||||
<data name="menuShareServer" xml:space="preserve">
|
||||
<value>分享</value>
|
||||
<value>分享 (Ctrl+F)</value>
|
||||
</data>
|
||||
<data name="menuRouting" xml:space="preserve">
|
||||
<value>路由</value>
|
||||
@@ -793,16 +793,16 @@
|
||||
<value>以管理員身份執行</value>
|
||||
</data>
|
||||
<data name="menuMoveBottom" xml:space="preserve">
|
||||
<value>下移至底部</value>
|
||||
<value>下移至底部 (B)</value>
|
||||
</data>
|
||||
<data name="menuMoveDown" xml:space="preserve">
|
||||
<value>下移</value>
|
||||
<value>下移 (D)</value>
|
||||
</data>
|
||||
<data name="menuMoveTop" xml:space="preserve">
|
||||
<value>上移至頂部</value>
|
||||
<value>上移至頂部 (T)</value>
|
||||
</data>
|
||||
<data name="menuMoveUp" xml:space="preserve">
|
||||
<value>上移</value>
|
||||
<value>上移 (U)</value>
|
||||
</data>
|
||||
<data name="MsgFilterTitle" xml:space="preserve">
|
||||
<value>過濾 (允許正則)</value>
|
||||
@@ -817,10 +817,10 @@
|
||||
<value>一鍵匯入規則集</value>
|
||||
</data>
|
||||
<data name="menuRoutingAdvancedRemove" xml:space="preserve">
|
||||
<value>移除所選規則</value>
|
||||
<value>移除所選規則 (Delete)</value>
|
||||
</data>
|
||||
<data name="menuRoutingAdvancedSetDefault" xml:space="preserve">
|
||||
<value>設為活動規則</value>
|
||||
<value>設為活動規則 (Enter)</value>
|
||||
</data>
|
||||
<data name="TbdomainStrategy" xml:space="preserve">
|
||||
<value>域名解析策略</value>
|
||||
@@ -853,7 +853,7 @@
|
||||
<value>規則列表</value>
|
||||
</data>
|
||||
<data name="menuRuleRemove" xml:space="preserve">
|
||||
<value>移除所選規則</value>
|
||||
<value>移除所選規則 (Delete)</value>
|
||||
</data>
|
||||
<data name="menuRoutingRuleDetailsSetting" xml:space="preserve">
|
||||
<value>路由規則詳情設定</value>
|
||||
@@ -922,7 +922,7 @@
|
||||
<value>跳過測試</value>
|
||||
</data>
|
||||
<data name="menuEditServer" xml:space="preserve">
|
||||
<value>編輯</value>
|
||||
<value>編輯 (Ctrl+D)</value>
|
||||
</data>
|
||||
<data name="TbSettingsDoubleClick2Activate" xml:space="preserve">
|
||||
<value>主介面輕按兩下設為活動</value>
|
||||
@@ -976,10 +976,7 @@
|
||||
<value>啟用硬體加速 (需重啟)</value>
|
||||
</data>
|
||||
<data name="SpeedtestingWait" xml:space="preserve">
|
||||
<value>等待測試中...</value>
|
||||
</data>
|
||||
<data name="SpeedtestingPressEscToExit" xml:space="preserve">
|
||||
<value>按 ECS 以終止測試</value>
|
||||
<value>等待測試中(按 ESC 終止)...</value>
|
||||
</data>
|
||||
<data name="TipDisplayLog" xml:space="preserve">
|
||||
<value>當有異常斷流時請關閉</value>
|
||||
@@ -1204,7 +1201,7 @@
|
||||
<value>重新整理</value>
|
||||
</data>
|
||||
<data name="menuProxiesSelectActivity" xml:space="preserve">
|
||||
<value>設為活動節點</value>
|
||||
<value>設為活動節點 (Enter)</value>
|
||||
</data>
|
||||
<data name="TbSettingsDomainStrategy4Out" xml:space="preserve">
|
||||
<value>Outbound 預設解析策略</value>
|
||||
@@ -1537,7 +1534,7 @@
|
||||
<value>刪除子配置</value>
|
||||
</data>
|
||||
<data name="menuServerList" xml:space="preserve">
|
||||
<value>子配置項目一,從訂閱分組中自動新增</value>
|
||||
<value>子配置項</value>
|
||||
</data>
|
||||
<data name="TbFallback" xml:space="preserve">
|
||||
<value>容錯移轉</value>
|
||||
@@ -1603,28 +1600,28 @@
|
||||
<value>自動從訂閱分組新增過濾後的配置</value>
|
||||
</data>
|
||||
<data name="TbCertPinning" xml:space="preserve">
|
||||
<value>憑證綁定</value>
|
||||
<value>Certificate Pinning</value>
|
||||
</data>
|
||||
<data name="TbCertPinningTips" xml:space="preserve">
|
||||
<value>伺服器憑證(PEM 格式,可選)
|
||||
若已指定,憑證將會被綁定,並且「跳過憑證驗證」將被停用。
|
||||
<value>Server Certificate (PEM format, optional)
|
||||
When specified, the certificate will be pinned, and "Allow Insecure" will be disabled.
|
||||
|
||||
若使用自簽憑證,或系統中存在不受信任或惡意的 CA,「取得憑證」動作可能會失敗。</value>
|
||||
The "Get Certificate" action may fail if a self-signed certificate is used or if the system contains an untrusted or malicious CA.</value>
|
||||
</data>
|
||||
<data name="TbFetchCert" xml:space="preserve">
|
||||
<value>獲取憑證</value>
|
||||
<value>Fetch Certificate</value>
|
||||
</data>
|
||||
<data name="TbFetchCertChain" xml:space="preserve">
|
||||
<value>獲取憑證鏈</value>
|
||||
<value>Fetch Certificate Chain</value>
|
||||
</data>
|
||||
<data name="ServerNameMustBeValidDomain" xml:space="preserve">
|
||||
<value>請設定有效的網域名稱</value>
|
||||
<value>Please set a valid domain</value>
|
||||
</data>
|
||||
<data name="CertNotSet" xml:space="preserve">
|
||||
<value>尚未設定憑證</value>
|
||||
<value>Certificate not set</value>
|
||||
</data>
|
||||
<data name="CertSet" xml:space="preserve">
|
||||
<value>已設定憑證</value>
|
||||
<value>Certificate set</value>
|
||||
</data>
|
||||
<data name="TbSettingsCustomSystemProxyPacPath" xml:space="preserve">
|
||||
<value>自訂 PAC 檔案路徑</value>
|
||||
@@ -1635,7 +1632,4 @@
|
||||
<data name="TbSettingsMacOSShowInDock" xml:space="preserve">
|
||||
<value>macOS 在 Dock 欄顯示 (需重啟)</value>
|
||||
</data>
|
||||
<data name="menuServerList2" xml:space="preserve">
|
||||
<value>子配置項二,從自建中選擇新增</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -13,19 +13,20 @@
|
||||
"api.ip.sb"
|
||||
]
|
||||
},
|
||||
{
|
||||
"remarks": "Google cn",
|
||||
"outboundTag": "proxy",
|
||||
"domain": [
|
||||
"domain:googleapis.cn",
|
||||
"domain:gstatic.com"
|
||||
]
|
||||
},
|
||||
{
|
||||
"remarks": "阻断udp443",
|
||||
"outboundTag": "block",
|
||||
"port": "443",
|
||||
"network": "udp"
|
||||
},
|
||||
{
|
||||
"remarks": "代理Google",
|
||||
"outboundTag": "proxy",
|
||||
"domain": [
|
||||
"geosite:google"
|
||||
]
|
||||
},
|
||||
{
|
||||
"remarks": "绕过局域网IP",
|
||||
"outboundTag": "direct",
|
||||
|
||||
@@ -1,17 +1,18 @@
|
||||
[
|
||||
{
|
||||
"remarks": "Google cn",
|
||||
"outboundTag": "proxy",
|
||||
"domain": [
|
||||
"domain:googleapis.cn",
|
||||
"domain:gstatic.com"
|
||||
]
|
||||
},
|
||||
{
|
||||
"remarks": "阻断udp443",
|
||||
"outboundTag": "block",
|
||||
"port": "443",
|
||||
"network": "udp"
|
||||
},
|
||||
{
|
||||
"remarks": "代理Google",
|
||||
"outboundTag": "proxy",
|
||||
"domain": [
|
||||
"geosite:google"
|
||||
]
|
||||
},
|
||||
{
|
||||
"remarks": "绕过局域网IP",
|
||||
"outboundTag": "direct",
|
||||
|
||||
@@ -14,8 +14,9 @@
|
||||
],
|
||||
"rules": [
|
||||
{
|
||||
"rule_set": [
|
||||
"geosite-google"
|
||||
"domain_suffix": [
|
||||
"googleapis.cn",
|
||||
"gstatic.com"
|
||||
],
|
||||
"server": "remote",
|
||||
"strategy": "prefer_ipv4"
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
"address": "1.1.1.1",
|
||||
"skipFallback": true,
|
||||
"domains": [
|
||||
"geosite:google"
|
||||
"domain:googleapis.cn",
|
||||
"domain:gstatic.com"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -14,8 +14,9 @@
|
||||
],
|
||||
"rules": [
|
||||
{
|
||||
"rule_set": [
|
||||
"geosite-google"
|
||||
"domain_suffix": [
|
||||
"googleapis.cn",
|
||||
"gstatic.com"
|
||||
],
|
||||
"server": "remote",
|
||||
"strategy": "prefer_ipv4"
|
||||
|
||||
@@ -26,7 +26,6 @@ public partial class CoreConfigSingboxService
|
||||
}
|
||||
|
||||
await GenOutboundMux(node, outbound);
|
||||
await GenOutboundTransport(node, outbound);
|
||||
break;
|
||||
}
|
||||
case EConfigType.Shadowsocks:
|
||||
@@ -34,50 +33,6 @@ public partial class CoreConfigSingboxService
|
||||
outbound.method = AppManager.Instance.GetShadowsocksSecurities(node).Contains(node.Security) ? node.Security : Global.None;
|
||||
outbound.password = node.Id;
|
||||
|
||||
if (node.Network == nameof(ETransport.tcp) && node.HeaderType == Global.TcpHeaderHttp)
|
||||
{
|
||||
outbound.plugin = "obfs-local";
|
||||
outbound.plugin_opts = $"obfs=http;obfs-host={node.RequestHost};";
|
||||
}
|
||||
else
|
||||
{
|
||||
var pluginArgs = string.Empty;
|
||||
if (node.Network == nameof(ETransport.ws))
|
||||
{
|
||||
pluginArgs += "mode=websocket;";
|
||||
pluginArgs += $"host={node.RequestHost};";
|
||||
pluginArgs += $"path={node.Path};";
|
||||
}
|
||||
else if (node.Network == nameof(ETransport.quic))
|
||||
{
|
||||
pluginArgs += "mode=quic;";
|
||||
}
|
||||
if (node.StreamSecurity == Global.StreamSecurity)
|
||||
{
|
||||
pluginArgs += "tls;";
|
||||
var certs = CertPemManager.ParsePemChain(node.Cert);
|
||||
if (certs.Count > 0)
|
||||
{
|
||||
var cert = certs.First();
|
||||
const string beginMarker = "-----BEGIN CERTIFICATE-----\n";
|
||||
const string endMarker = "\n-----END CERTIFICATE-----";
|
||||
|
||||
var base64Content = cert.Replace(beginMarker, "").Replace(endMarker, "").Trim();
|
||||
|
||||
// https://github.com/shadowsocks/v2ray-plugin/blob/e9af1cdd2549d528deb20a4ab8d61c5fbe51f306/args.go#L172
|
||||
// Equal signs and commas [and backslashes] must be escaped with a backslash.
|
||||
base64Content = base64Content.Replace("=", "\\=");
|
||||
|
||||
pluginArgs += $"certRaw={base64Content};";
|
||||
}
|
||||
}
|
||||
if (pluginArgs.Length > 0)
|
||||
{
|
||||
outbound.plugin = "v2ray-plugin";
|
||||
outbound.plugin_opts = pluginArgs;
|
||||
}
|
||||
}
|
||||
|
||||
await GenOutboundMux(node, outbound);
|
||||
break;
|
||||
}
|
||||
@@ -116,8 +71,6 @@ public partial class CoreConfigSingboxService
|
||||
{
|
||||
outbound.flow = node.Flow;
|
||||
}
|
||||
|
||||
await GenOutboundTransport(node, outbound);
|
||||
break;
|
||||
}
|
||||
case EConfigType.Trojan:
|
||||
@@ -125,7 +78,6 @@ public partial class CoreConfigSingboxService
|
||||
outbound.password = node.Id;
|
||||
|
||||
await GenOutboundMux(node, outbound);
|
||||
await GenOutboundTransport(node, outbound);
|
||||
break;
|
||||
}
|
||||
case EConfigType.Hysteria2:
|
||||
@@ -175,6 +127,8 @@ public partial class CoreConfigSingboxService
|
||||
}
|
||||
|
||||
await GenOutboundTls(node, outbound);
|
||||
|
||||
await GenOutboundTransport(node, outbound);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -278,59 +232,54 @@ public partial class CoreConfigSingboxService
|
||||
{
|
||||
try
|
||||
{
|
||||
if (node.StreamSecurity is not (Global.StreamSecurityReality or Global.StreamSecurity))
|
||||
if (node.StreamSecurity is Global.StreamSecurityReality or Global.StreamSecurity)
|
||||
{
|
||||
return await Task.FromResult(0);
|
||||
}
|
||||
if (node.ConfigType is EConfigType.Shadowsocks or EConfigType.SOCKS or EConfigType.WireGuard)
|
||||
{
|
||||
return await Task.FromResult(0);
|
||||
}
|
||||
var server_name = string.Empty;
|
||||
if (node.Sni.IsNotEmpty())
|
||||
{
|
||||
server_name = node.Sni;
|
||||
}
|
||||
else if (node.RequestHost.IsNotEmpty())
|
||||
{
|
||||
server_name = Utils.String2List(node.RequestHost)?.First();
|
||||
}
|
||||
var tls = new Tls4Sbox()
|
||||
{
|
||||
enabled = true,
|
||||
record_fragment = _config.CoreBasicItem.EnableFragment ? true : null,
|
||||
server_name = server_name,
|
||||
insecure = Utils.ToBool(node.AllowInsecure.IsNullOrEmpty() ? _config.CoreBasicItem.DefAllowInsecure.ToString().ToLower() : node.AllowInsecure),
|
||||
alpn = node.GetAlpn(),
|
||||
};
|
||||
if (node.Fingerprint.IsNotEmpty())
|
||||
{
|
||||
tls.utls = new Utls4Sbox()
|
||||
var server_name = string.Empty;
|
||||
if (node.Sni.IsNotEmpty())
|
||||
{
|
||||
server_name = node.Sni;
|
||||
}
|
||||
else if (node.RequestHost.IsNotEmpty())
|
||||
{
|
||||
server_name = Utils.String2List(node.RequestHost)?.First();
|
||||
}
|
||||
var tls = new Tls4Sbox()
|
||||
{
|
||||
enabled = true,
|
||||
fingerprint = node.Fingerprint.IsNullOrEmpty() ? _config.CoreBasicItem.DefFingerprint : node.Fingerprint
|
||||
record_fragment = _config.CoreBasicItem.EnableFragment ? true : null,
|
||||
server_name = server_name,
|
||||
insecure = Utils.ToBool(node.AllowInsecure.IsNullOrEmpty() ? _config.CoreBasicItem.DefAllowInsecure.ToString().ToLower() : node.AllowInsecure),
|
||||
alpn = node.GetAlpn(),
|
||||
};
|
||||
}
|
||||
if (node.StreamSecurity == Global.StreamSecurity)
|
||||
{
|
||||
var certs = CertPemManager.ParsePemChain(node.Cert);
|
||||
if (certs.Count > 0)
|
||||
if (node.Fingerprint.IsNotEmpty())
|
||||
{
|
||||
tls.certificate = certs;
|
||||
tls.utls = new Utls4Sbox()
|
||||
{
|
||||
enabled = true,
|
||||
fingerprint = node.Fingerprint.IsNullOrEmpty() ? _config.CoreBasicItem.DefFingerprint : node.Fingerprint
|
||||
};
|
||||
}
|
||||
if (node.StreamSecurity == Global.StreamSecurity)
|
||||
{
|
||||
var certs = CertPemManager.ParsePemChain(node.Cert);
|
||||
if (certs.Count > 0)
|
||||
{
|
||||
tls.certificate = certs;
|
||||
tls.insecure = false;
|
||||
}
|
||||
}
|
||||
else if (node.StreamSecurity == Global.StreamSecurityReality)
|
||||
{
|
||||
tls.reality = new Reality4Sbox()
|
||||
{
|
||||
enabled = true,
|
||||
public_key = node.PublicKey,
|
||||
short_id = node.ShortId
|
||||
};
|
||||
tls.insecure = false;
|
||||
}
|
||||
outbound.tls = tls;
|
||||
}
|
||||
else if (node.StreamSecurity == Global.StreamSecurityReality)
|
||||
{
|
||||
tls.reality = new Reality4Sbox()
|
||||
{
|
||||
enabled = true,
|
||||
public_key = node.PublicKey,
|
||||
short_id = node.ShortId
|
||||
};
|
||||
tls.insecure = false;
|
||||
}
|
||||
outbound.tls = tls;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
@@ -356,43 +305,23 @@ public partial class CoreConfigSingboxService
|
||||
case nameof(ETransport.tcp): //http
|
||||
if (node.HeaderType == Global.TcpHeaderHttp)
|
||||
{
|
||||
transport.type = nameof(ETransport.http);
|
||||
transport.host = node.RequestHost.IsNullOrEmpty() ? null : Utils.String2List(node.RequestHost);
|
||||
transport.path = node.Path.IsNullOrEmpty() ? null : node.Path;
|
||||
if (node.ConfigType == EConfigType.Shadowsocks)
|
||||
{
|
||||
outbound.plugin = "obfs-local";
|
||||
outbound.plugin_opts = $"obfs=http;obfs-host={node.RequestHost};";
|
||||
}
|
||||
else
|
||||
{
|
||||
transport.type = nameof(ETransport.http);
|
||||
transport.host = node.RequestHost.IsNullOrEmpty() ? null : Utils.String2List(node.RequestHost);
|
||||
transport.path = node.Path.IsNullOrEmpty() ? null : node.Path;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case nameof(ETransport.ws):
|
||||
transport.type = nameof(ETransport.ws);
|
||||
var wsPath = node.Path;
|
||||
|
||||
// Parse eh and ed parameters from path using regex
|
||||
if (!wsPath.IsNullOrEmpty())
|
||||
{
|
||||
var edRegex = new Regex(@"[?&]ed=(\d+)");
|
||||
var edMatch = edRegex.Match(wsPath);
|
||||
if (edMatch.Success && int.TryParse(edMatch.Groups[1].Value, out var edValue))
|
||||
{
|
||||
transport.max_early_data = edValue;
|
||||
transport.early_data_header_name = "Sec-WebSocket-Protocol";
|
||||
|
||||
wsPath = edRegex.Replace(wsPath, "");
|
||||
wsPath = wsPath.Replace("?&", "?");
|
||||
if (wsPath.EndsWith('?'))
|
||||
{
|
||||
wsPath = wsPath.TrimEnd('?');
|
||||
}
|
||||
}
|
||||
|
||||
var ehRegex = new Regex(@"[?&]eh=([^&]+)");
|
||||
var ehMatch = ehRegex.Match(wsPath);
|
||||
if (ehMatch.Success)
|
||||
{
|
||||
transport.early_data_header_name = Uri.UnescapeDataString(ehMatch.Groups[1].Value);
|
||||
}
|
||||
}
|
||||
|
||||
transport.path = wsPath.IsNullOrEmpty() ? null : wsPath;
|
||||
transport.path = node.Path.IsNullOrEmpty() ? null : node.Path;
|
||||
if (node.RequestHost.IsNotEmpty())
|
||||
{
|
||||
transport.headers = new()
|
||||
|
||||
@@ -300,7 +300,7 @@ public partial class CoreConfigSingboxService
|
||||
|
||||
private bool ParseV2Domain(string domain, Rule4Sbox rule)
|
||||
{
|
||||
if (domain.StartsWith('#') || domain.StartsWith("ext:") || domain.StartsWith("ext-domain:"))
|
||||
if (domain.StartsWith("#") || domain.StartsWith("ext:") || domain.StartsWith("ext-domain:"))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -316,8 +316,10 @@ public partial class CoreConfigSingboxService
|
||||
}
|
||||
else if (domain.StartsWith("domain:"))
|
||||
{
|
||||
rule.domain ??= [];
|
||||
rule.domain_suffix ??= [];
|
||||
rule.domain_suffix?.Add(domain.Substring(7));
|
||||
rule.domain?.Add(domain.Substring(7));
|
||||
rule.domain_suffix?.Add("." + domain.Substring(7));
|
||||
}
|
||||
else if (domain.StartsWith("full:"))
|
||||
{
|
||||
|
||||
@@ -180,15 +180,10 @@ public partial class CoreConfigV2rayService
|
||||
}
|
||||
case EConfigType.WireGuard:
|
||||
{
|
||||
var address = node.Address;
|
||||
if (Utils.IsIpv6(address))
|
||||
{
|
||||
address = $"[{address}]";
|
||||
}
|
||||
var peer = new WireguardPeer4Ray
|
||||
{
|
||||
publicKey = node.PublicKey,
|
||||
endpoint = address + ":" + node.Port.ToString()
|
||||
endpoint = node.Address + ":" + node.Port.ToString()
|
||||
};
|
||||
var setting = new Outboundsettings4Ray
|
||||
{
|
||||
@@ -356,6 +351,7 @@ public partial class CoreConfigV2rayService
|
||||
if (host.IsNotEmpty())
|
||||
{
|
||||
wsSettings.host = host;
|
||||
wsSettings.headers.Host = host;
|
||||
}
|
||||
if (path.IsNotEmpty())
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace ServiceLib.Services;
|
||||
/// </summary>
|
||||
public class DownloadService
|
||||
{
|
||||
public event EventHandler<UpdateResult>? UpdateCompleted;
|
||||
public event EventHandler<RetResult>? UpdateCompleted;
|
||||
|
||||
public event ErrorEventHandler? Error;
|
||||
|
||||
@@ -40,10 +40,10 @@ public class DownloadService
|
||||
{
|
||||
try
|
||||
{
|
||||
UpdateCompleted?.Invoke(this, new UpdateResult(false, $"{ResUI.Downloading} {url}"));
|
||||
UpdateCompleted?.Invoke(this, new RetResult(false, $"{ResUI.Downloading} {url}"));
|
||||
|
||||
var progress = new Progress<double>();
|
||||
progress.ProgressChanged += (sender, value) => UpdateCompleted?.Invoke(this, new UpdateResult(value > 100, $"...{value}%"));
|
||||
progress.ProgressChanged += (sender, value) => UpdateCompleted?.Invoke(this, new RetResult(value > 100, $"...{value}%"));
|
||||
|
||||
var webProxy = await GetWebProxy(blProxy);
|
||||
await DownloaderHelper.Instance.DownloadFileAsync(webProxy,
|
||||
|
||||
@@ -19,7 +19,7 @@ public class SpeedtestService(Config config, Func<SpeedTestResult, Task> updateF
|
||||
|
||||
public void ExitLoop()
|
||||
{
|
||||
if (!_lstExitLoop.IsEmpty)
|
||||
if (_lstExitLoop.Count > 0)
|
||||
{
|
||||
_ = UpdateFunc("", ResUI.SpeedtestingStop);
|
||||
|
||||
@@ -27,11 +27,6 @@ public class SpeedtestService(Config config, Func<SpeedTestResult, Task> updateF
|
||||
}
|
||||
}
|
||||
|
||||
private static bool ShouldStopTest(string exitLoopKey)
|
||||
{
|
||||
return !_lstExitLoop.Any(p => p == exitLoopKey);
|
||||
}
|
||||
|
||||
private async Task RunAsync(ESpeedActionType actionType, List<ProfileItem> selecteds)
|
||||
{
|
||||
var exitLoopKey = Utils.GetGuid(false);
|
||||
@@ -108,11 +103,6 @@ public class SpeedtestService(Config config, Func<SpeedTestResult, Task> updateF
|
||||
}
|
||||
}
|
||||
|
||||
if (lstSelected.Count > 1 && (actionType == ESpeedActionType.Speedtest || actionType == ESpeedActionType.Mixedtest))
|
||||
{
|
||||
NoticeManager.Instance.Enqueue(ResUI.SpeedtestingPressEscToExit);
|
||||
}
|
||||
|
||||
return lstSelected;
|
||||
}
|
||||
|
||||
@@ -162,7 +152,7 @@ public class SpeedtestService(Config config, Func<SpeedTestResult, Task> updateF
|
||||
var pageSizeNext = pageSize / 2;
|
||||
if (lstFailed.Count > 0 && pageSizeNext > 0)
|
||||
{
|
||||
if (ShouldStopTest(exitLoopKey))
|
||||
if (_lstExitLoop.Any(p => p == exitLoopKey) == false)
|
||||
{
|
||||
await UpdateFunc("", ResUI.SpeedtestingSkip);
|
||||
return;
|
||||
@@ -200,12 +190,6 @@ public class SpeedtestService(Config config, Func<SpeedTestResult, Task> updateF
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ShouldStopTest(exitLoopKey))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
tasks.Add(Task.Run(async () =>
|
||||
{
|
||||
await DoRealPing(it);
|
||||
@@ -234,7 +218,7 @@ public class SpeedtestService(Config config, Func<SpeedTestResult, Task> updateF
|
||||
List<Task> tasks = new();
|
||||
foreach (var it in selecteds)
|
||||
{
|
||||
if (ShouldStopTest(exitLoopKey))
|
||||
if (_lstExitLoop.Any(p => p == exitLoopKey) == false)
|
||||
{
|
||||
await UpdateFunc(it.IndexId, "", ResUI.SpeedtestingSkip);
|
||||
continue;
|
||||
@@ -250,27 +234,21 @@ public class SpeedtestService(Config config, Func<SpeedTestResult, Task> updateF
|
||||
if (processService is null)
|
||||
{
|
||||
await UpdateFunc(it.IndexId, "", ResUI.FailedToRunCore);
|
||||
return;
|
||||
}
|
||||
|
||||
await Task.Delay(1000);
|
||||
|
||||
var delay = await DoRealPing(it);
|
||||
if (blSpeedTest)
|
||||
else
|
||||
{
|
||||
if (ShouldStopTest(exitLoopKey))
|
||||
await Task.Delay(1000);
|
||||
var delay = await DoRealPing(it);
|
||||
if (blSpeedTest)
|
||||
{
|
||||
await UpdateFunc(it.IndexId, "", ResUI.SpeedtestingSkip);
|
||||
return;
|
||||
}
|
||||
|
||||
if (delay > 0)
|
||||
{
|
||||
await DoSpeedTest(downloadHandle, it);
|
||||
}
|
||||
else
|
||||
{
|
||||
await UpdateFunc(it.IndexId, "", ResUI.SpeedtestingSkip);
|
||||
if (delay > 0)
|
||||
{
|
||||
await DoSpeedTest(downloadHandle, it);
|
||||
}
|
||||
else
|
||||
{
|
||||
await UpdateFunc(it.IndexId, "", ResUI.SpeedtestingSkip);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -323,28 +301,31 @@ public class SpeedtestService(Config config, Func<SpeedTestResult, Task> updateF
|
||||
{
|
||||
var responseTime = -1;
|
||||
|
||||
if (!IPAddress.TryParse(url, out var ipAddress))
|
||||
{
|
||||
var ipHostInfo = await Dns.GetHostEntryAsync(url);
|
||||
ipAddress = ipHostInfo.AddressList.First();
|
||||
}
|
||||
|
||||
IPEndPoint endPoint = new(ipAddress, port);
|
||||
using Socket clientSocket = new(endPoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
|
||||
|
||||
var timer = Stopwatch.StartNew();
|
||||
try
|
||||
{
|
||||
using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(5));
|
||||
await clientSocket.ConnectAsync(endPoint, cts.Token).ConfigureAwait(false);
|
||||
responseTime = (int)timer.ElapsedMilliseconds;
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (!IPAddress.TryParse(url, out var ipAddress))
|
||||
{
|
||||
var ipHostInfo = await Dns.GetHostEntryAsync(url);
|
||||
ipAddress = ipHostInfo.AddressList.First();
|
||||
}
|
||||
|
||||
IPEndPoint endPoint = new(ipAddress, port);
|
||||
using Socket clientSocket = new(endPoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
|
||||
|
||||
var timer = Stopwatch.StartNew();
|
||||
var result = clientSocket.BeginConnect(endPoint, null, null);
|
||||
if (!result.AsyncWaitHandle.WaitOne(TimeSpan.FromSeconds(5)))
|
||||
{
|
||||
throw new TimeoutException("connect timeout (5s): " + url);
|
||||
}
|
||||
timer.Stop();
|
||||
responseTime = (int)timer.Elapsed.TotalMilliseconds;
|
||||
|
||||
clientSocket.EndConnect(result);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logging.SaveLog(_tag, ex);
|
||||
}
|
||||
return responseTime;
|
||||
}
|
||||
|
||||
@@ -17,17 +17,17 @@ public class UpdateService(Config config, Func<bool, string, Task> updateFunc)
|
||||
{
|
||||
if (args.Success)
|
||||
{
|
||||
_ = UpdateFunc(false, ResUI.MsgDownloadV2rayCoreSuccessfully);
|
||||
_ = UpdateFunc(true, Utils.UrlEncode(fileName));
|
||||
UpdateFunc(false, ResUI.MsgDownloadV2rayCoreSuccessfully);
|
||||
UpdateFunc(true, Utils.UrlEncode(fileName));
|
||||
}
|
||||
else
|
||||
{
|
||||
_ = UpdateFunc(false, args.Msg);
|
||||
UpdateFunc(false, args.Msg);
|
||||
}
|
||||
};
|
||||
downloadHandle.Error += (sender2, args) =>
|
||||
{
|
||||
_ = UpdateFunc(false, args.GetException().Message);
|
||||
UpdateFunc(false, args.GetException().Message);
|
||||
};
|
||||
|
||||
await UpdateFunc(false, string.Format(ResUI.MsgStartUpdating, ECoreType.v2rayN));
|
||||
@@ -37,7 +37,7 @@ public class UpdateService(Config config, Func<bool, string, Task> updateFunc)
|
||||
await UpdateFunc(false, string.Format(ResUI.MsgParsingSuccessfully, ECoreType.v2rayN));
|
||||
await UpdateFunc(false, result.Msg);
|
||||
|
||||
url = result.Url.ToString();
|
||||
url = result.Data?.ToString();
|
||||
fileName = Utils.GetTempPath(Utils.GetGuid());
|
||||
await downloadHandle.DownloadFileAsync(url, fileName, true, _timeout);
|
||||
}
|
||||
@@ -57,26 +57,26 @@ public class UpdateService(Config config, Func<bool, string, Task> updateFunc)
|
||||
{
|
||||
if (args.Success)
|
||||
{
|
||||
_ = UpdateFunc(false, ResUI.MsgDownloadV2rayCoreSuccessfully);
|
||||
_ = UpdateFunc(false, ResUI.MsgUnpacking);
|
||||
UpdateFunc(false, ResUI.MsgDownloadV2rayCoreSuccessfully);
|
||||
UpdateFunc(false, ResUI.MsgUnpacking);
|
||||
|
||||
try
|
||||
{
|
||||
_ = UpdateFunc(true, fileName);
|
||||
UpdateFunc(true, fileName);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_ = UpdateFunc(false, ex.Message);
|
||||
UpdateFunc(false, ex.Message);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_ = UpdateFunc(false, args.Msg);
|
||||
UpdateFunc(false, args.Msg);
|
||||
}
|
||||
};
|
||||
downloadHandle.Error += (sender2, args) =>
|
||||
{
|
||||
_ = UpdateFunc(false, args.GetException().Message);
|
||||
UpdateFunc(false, args.GetException().Message);
|
||||
};
|
||||
|
||||
await UpdateFunc(false, string.Format(ResUI.MsgStartUpdating, type));
|
||||
@@ -86,7 +86,7 @@ public class UpdateService(Config config, Func<bool, string, Task> updateFunc)
|
||||
await UpdateFunc(false, string.Format(ResUI.MsgParsingSuccessfully, type));
|
||||
await UpdateFunc(false, result.Msg);
|
||||
|
||||
url = result.Url.ToString();
|
||||
url = result.Data?.ToString();
|
||||
var ext = url.Contains(".tar.gz") ? ".tar.gz" : Path.GetExtension(url);
|
||||
fileName = Utils.GetTempPath(Utils.GetGuid() + ext);
|
||||
await downloadHandle.DownloadFileAsync(url, fileName, true, _timeout);
|
||||
@@ -110,26 +110,26 @@ public class UpdateService(Config config, Func<bool, string, Task> updateFunc)
|
||||
|
||||
#region CheckUpdate private
|
||||
|
||||
private async Task<UpdateResult> CheckUpdateAsync(DownloadService downloadHandle, ECoreType type, bool preRelease)
|
||||
private async Task<RetResult> CheckUpdateAsync(DownloadService downloadHandle, ECoreType type, bool preRelease)
|
||||
{
|
||||
try
|
||||
{
|
||||
var result = await GetRemoteVersion(downloadHandle, type, preRelease);
|
||||
if (!result.Success || result.Version is null)
|
||||
if (!result.Success || result.Data is null)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
return await ParseDownloadUrl(type, result);
|
||||
return await ParseDownloadUrl(type, (SemanticVersion)result.Data);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logging.SaveLog(_tag, ex);
|
||||
await UpdateFunc(false, ex.Message);
|
||||
return new UpdateResult(false, ex.Message);
|
||||
return new RetResult(false, ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
private async Task<UpdateResult> GetRemoteVersion(DownloadService downloadHandle, ECoreType type, bool preRelease)
|
||||
private async Task<RetResult> GetRemoteVersion(DownloadService downloadHandle, ECoreType type, bool preRelease)
|
||||
{
|
||||
var coreInfo = CoreInfoManager.Instance.GetCoreInfo(type);
|
||||
var tagName = string.Empty;
|
||||
@@ -139,7 +139,7 @@ public class UpdateService(Config config, Func<bool, string, Task> updateFunc)
|
||||
var result = await downloadHandle.TryDownloadString(url, true, Global.AppName);
|
||||
if (result.IsNullOrEmpty())
|
||||
{
|
||||
return new UpdateResult(false, "");
|
||||
return new RetResult(false, "");
|
||||
}
|
||||
|
||||
var gitHubReleases = JsonUtils.Deserialize<List<GitHubRelease>>(result);
|
||||
@@ -153,12 +153,12 @@ public class UpdateService(Config config, Func<bool, string, Task> updateFunc)
|
||||
var lastUrl = await downloadHandle.UrlRedirectAsync(url, true);
|
||||
if (lastUrl == null)
|
||||
{
|
||||
return new UpdateResult(false, "");
|
||||
return new RetResult(false, "");
|
||||
}
|
||||
|
||||
tagName = lastUrl?.Split("/tag/").LastOrDefault();
|
||||
}
|
||||
return new UpdateResult(true, new SemanticVersion(tagName));
|
||||
return new RetResult(true, "", new SemanticVersion(tagName));
|
||||
}
|
||||
|
||||
private async Task<SemanticVersion> GetCoreVersion(ECoreType type)
|
||||
@@ -213,11 +213,10 @@ public class UpdateService(Config config, Func<bool, string, Task> updateFunc)
|
||||
}
|
||||
}
|
||||
|
||||
private async Task<UpdateResult> ParseDownloadUrl(ECoreType type, UpdateResult result)
|
||||
private async Task<RetResult> ParseDownloadUrl(ECoreType type, SemanticVersion version)
|
||||
{
|
||||
try
|
||||
{
|
||||
var version = result.Version ?? new SemanticVersion(0, 0, 0);
|
||||
var coreInfo = CoreInfoManager.Instance.GetCoreInfo(type);
|
||||
var coreUrl = await GetUrlFromCore(coreInfo) ?? string.Empty;
|
||||
SemanticVersion curVersion;
|
||||
@@ -261,17 +260,16 @@ public class UpdateService(Config config, Func<bool, string, Task> updateFunc)
|
||||
|
||||
if (curVersion >= version && version != new SemanticVersion(0, 0, 0))
|
||||
{
|
||||
return new UpdateResult(false, message);
|
||||
return new RetResult(false, message);
|
||||
}
|
||||
|
||||
result.Url = url;
|
||||
return result;
|
||||
return new RetResult(true, "", url);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logging.SaveLog(_tag, ex);
|
||||
await UpdateFunc(false, ex.Message);
|
||||
return new UpdateResult(false, ex.Message);
|
||||
return new RetResult(false, ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -398,7 +396,6 @@ public class UpdateService(Config config, Func<bool, string, Task> updateFunc)
|
||||
}
|
||||
|
||||
//append dns items TODO
|
||||
geoSiteFiles.Add("google");
|
||||
geoSiteFiles.Add("cn");
|
||||
geoSiteFiles.Add("geolocation-cn");
|
||||
geoSiteFiles.Add("category-ads-all");
|
||||
@@ -441,7 +438,7 @@ public class UpdateService(Config config, Func<bool, string, Task> updateFunc)
|
||||
{
|
||||
if (args.Success)
|
||||
{
|
||||
_ = UpdateFunc(false, string.Format(ResUI.MsgDownloadGeoFileSuccessfully, fileName));
|
||||
UpdateFunc(false, string.Format(ResUI.MsgDownloadGeoFileSuccessfully, fileName));
|
||||
|
||||
try
|
||||
{
|
||||
@@ -455,17 +452,17 @@ public class UpdateService(Config config, Func<bool, string, Task> updateFunc)
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_ = UpdateFunc(false, ex.Message);
|
||||
UpdateFunc(false, ex.Message);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_ = UpdateFunc(false, args.Msg);
|
||||
UpdateFunc(false, args.Msg);
|
||||
}
|
||||
};
|
||||
downloadHandle.Error += (sender2, args) =>
|
||||
{
|
||||
_ = UpdateFunc(false, args.GetException().Message);
|
||||
UpdateFunc(false, args.GetException().Message);
|
||||
};
|
||||
|
||||
await downloadHandle.DownloadFileAsync(url, tmpFileName, true, _timeout);
|
||||
|
||||
@@ -77,7 +77,6 @@ public class ProfilesViewModel : MyReactiveObject
|
||||
|
||||
public ReactiveCommand<Unit, Unit> AddSubCmd { get; }
|
||||
public ReactiveCommand<Unit, Unit> EditSubCmd { get; }
|
||||
public ReactiveCommand<Unit, Unit> DeleteSubCmd { get; }
|
||||
|
||||
#endregion Menu
|
||||
|
||||
@@ -236,10 +235,6 @@ public class ProfilesViewModel : MyReactiveObject
|
||||
{
|
||||
await EditSubAsync(false);
|
||||
});
|
||||
DeleteSubCmd = ReactiveCommand.CreateFromTask(async () =>
|
||||
{
|
||||
await DeleteSubAsync();
|
||||
});
|
||||
|
||||
#endregion WhenAnyValue && ReactiveCommand
|
||||
|
||||
@@ -558,11 +553,6 @@ public class ProfilesViewModel : MyReactiveObject
|
||||
|
||||
private async Task RemoveDuplicateServer()
|
||||
{
|
||||
if (await _updateView?.Invoke(EViewAction.ShowYesNo, null) == false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var tuple = await ConfigHandler.DedupServerList(_config, _config.SubIndexId);
|
||||
if (tuple.Item1 > 0 || tuple.Item2 > 0)
|
||||
{
|
||||
@@ -889,23 +879,5 @@ public class ProfilesViewModel : MyReactiveObject
|
||||
}
|
||||
}
|
||||
|
||||
private async Task DeleteSubAsync()
|
||||
{
|
||||
var item = await AppManager.Instance.GetSubItem(_config.SubIndexId);
|
||||
if (item is null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (await _updateView?.Invoke(EViewAction.ShowYesNo, null) == false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
await ConfigHandler.DeleteSubItem(_config, item.Id);
|
||||
|
||||
await RefreshSubscriptions();
|
||||
await SubSelectedChangedAsync(true);
|
||||
}
|
||||
|
||||
#endregion Subscription
|
||||
}
|
||||
|
||||
@@ -4,22 +4,11 @@ public static class AppBuilderExtension
|
||||
{
|
||||
public static AppBuilder WithFontByDefault(this AppBuilder appBuilder)
|
||||
{
|
||||
var fallbacks = new List<FontFallback>();
|
||||
|
||||
var notoSansSc = new FontFamily(Path.Combine(Global.AvaAssets, "Fonts#Noto Sans SC"));
|
||||
fallbacks.Add(new FontFallback { FontFamily = notoSansSc });
|
||||
|
||||
if (OperatingSystem.IsLinux())
|
||||
var uri = Path.Combine(Global.AvaAssets, "Fonts#Noto Sans SC");
|
||||
return appBuilder.With(new FontManagerOptions()
|
||||
{
|
||||
fallbacks.Add(new FontFallback
|
||||
{
|
||||
FontFamily = new FontFamily("Noto Color Emoji")
|
||||
});
|
||||
}
|
||||
|
||||
return appBuilder.With(new FontManagerOptions
|
||||
{
|
||||
FontFallbacks = fallbacks.ToArray()
|
||||
//DefaultFamilyName = uri,
|
||||
FontFallbacks = new[] { new FontFallback { FontFamily = new FontFamily(uri) } }
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,8 @@
|
||||
</StackPanel>
|
||||
|
||||
<Grid
|
||||
ColumnDefinitions="300,Auto,Auto"
|
||||
Grid.Row="0"
|
||||
ColumnDefinitions="180,Auto,Auto"
|
||||
DockPanel.Dock="Top"
|
||||
RowDefinitions="Auto,Auto,Auto,Auto">
|
||||
<TextBlock
|
||||
@@ -74,7 +75,7 @@
|
||||
Grid.Row="3"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="3"
|
||||
ColumnDefinitions="300,Auto,Auto">
|
||||
ColumnDefinitions="180,Auto,Auto">
|
||||
<TextBlock
|
||||
Grid.Column="0"
|
||||
Margin="{StaticResource Margin4}"
|
||||
@@ -88,11 +89,11 @@
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<TabControl HorizontalContentAlignment="Stretch" DockPanel.Dock="Top">
|
||||
<TabControl DockPanel.Dock="Top">
|
||||
<TabItem HorizontalAlignment="Left" Header="{x:Static resx:ResUI.menuServerList}">
|
||||
<Grid
|
||||
Margin="{StaticResource Margin8}"
|
||||
ColumnDefinitions="300,Auto,Auto"
|
||||
ColumnDefinitions="180,Auto,Auto"
|
||||
RowDefinitions="Auto,Auto,Auto">
|
||||
|
||||
<TextBlock
|
||||
@@ -130,8 +131,10 @@
|
||||
VerticalAlignment="Center" />
|
||||
</Grid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
|
||||
<TabItem HorizontalAlignment="Left" Header="{x:Static resx:ResUI.menuServerList2}">
|
||||
<TabControl>
|
||||
<TabItem HorizontalAlignment="Left" Header="{x:Static resx:ResUI.menuServerList}">
|
||||
<DataGrid
|
||||
x:Name="lstChild"
|
||||
Grid.Row="1"
|
||||
@@ -149,31 +152,13 @@
|
||||
<DataGrid.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem x:Name="menuAddChildServer" Header="{x:Static resx:ResUI.menuAddChildServer}" />
|
||||
<MenuItem
|
||||
x:Name="menuRemoveChildServer"
|
||||
Header="{x:Static resx:ResUI.menuRemoveChildServer}"
|
||||
InputGesture="Back" />
|
||||
<MenuItem
|
||||
x:Name="menuSelectAllChild"
|
||||
Header="{x:Static resx:ResUI.menuSelectAll}"
|
||||
InputGesture="Ctrl+A" />
|
||||
<MenuItem x:Name="menuRemoveChildServer" Header="{x:Static resx:ResUI.menuRemoveChildServer}" />
|
||||
<MenuItem x:Name="menuSelectAllChild" Header="{x:Static resx:ResUI.menuSelectAll}" />
|
||||
<Separator />
|
||||
<MenuItem
|
||||
x:Name="menuMoveTop"
|
||||
Header="{x:Static resx:ResUI.menuMoveTop}"
|
||||
InputGesture="T" />
|
||||
<MenuItem
|
||||
x:Name="menuMoveUp"
|
||||
Header="{x:Static resx:ResUI.menuMoveUp}"
|
||||
InputGesture="U" />
|
||||
<MenuItem
|
||||
x:Name="menuMoveDown"
|
||||
Header="{x:Static resx:ResUI.menuMoveDown}"
|
||||
InputGesture="D" />
|
||||
<MenuItem
|
||||
x:Name="menuMoveBottom"
|
||||
Header="{x:Static resx:ResUI.menuMoveBottom}"
|
||||
InputGesture="B" />
|
||||
<MenuItem x:Name="menuMoveTop" Header="{x:Static resx:ResUI.menuMoveTop}" />
|
||||
<MenuItem x:Name="menuMoveUp" Header="{x:Static resx:ResUI.menuMoveUp}" />
|
||||
<MenuItem x:Name="menuMoveDown" Header="{x:Static resx:ResUI.menuMoveDown}" />
|
||||
<MenuItem x:Name="menuMoveBottom" Header="{x:Static resx:ResUI.menuMoveBottom}" />
|
||||
</ContextMenu>
|
||||
</DataGrid.ContextMenu>
|
||||
<DataGrid.Columns>
|
||||
|
||||
@@ -132,7 +132,6 @@ public partial class AddGroupServerWindow : WindowBase<AddGroupServerViewModel>
|
||||
break;
|
||||
|
||||
case Key.Delete:
|
||||
case Key.Back:
|
||||
ViewModel?.ChildRemoveAsync();
|
||||
e.Handled = true;
|
||||
break;
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
<Grid
|
||||
Grid.Row="0"
|
||||
ColumnDefinitions="300,Auto,Auto"
|
||||
ColumnDefinitions="180,Auto,Auto"
|
||||
RowDefinitions="Auto,Auto,Auto,Auto">
|
||||
|
||||
<TextBlock
|
||||
@@ -50,7 +50,7 @@
|
||||
Orientation="Horizontal">
|
||||
<ComboBox
|
||||
x:Name="cmbCoreType"
|
||||
Width="200"
|
||||
Width="100"
|
||||
Margin="{StaticResource Margin4}"
|
||||
ToolTip.Tip="{x:Static resx:ResUI.TbCoreType}" />
|
||||
</StackPanel>
|
||||
@@ -101,7 +101,7 @@
|
||||
<Grid
|
||||
x:Name="gridVMess"
|
||||
Grid.Row="2"
|
||||
ColumnDefinitions="300,Auto,Auto"
|
||||
ColumnDefinitions="180,Auto,Auto"
|
||||
IsVisible="False"
|
||||
RowDefinitions="Auto,Auto,Auto,Auto,Auto">
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
<Grid
|
||||
x:Name="gridSs"
|
||||
Grid.Row="2"
|
||||
ColumnDefinitions="300,Auto"
|
||||
ColumnDefinitions="180,Auto"
|
||||
IsVisible="False"
|
||||
RowDefinitions="Auto,Auto,Auto,Auto,Auto">
|
||||
|
||||
@@ -213,7 +213,7 @@
|
||||
<Grid
|
||||
x:Name="gridSocks"
|
||||
Grid.Row="2"
|
||||
ColumnDefinitions="300,Auto"
|
||||
ColumnDefinitions="180,Auto"
|
||||
IsVisible="False"
|
||||
RowDefinitions="Auto,Auto,Auto,Auto">
|
||||
|
||||
@@ -246,7 +246,7 @@
|
||||
<Grid
|
||||
x:Name="gridVLESS"
|
||||
Grid.Row="2"
|
||||
ColumnDefinitions="300,Auto,Auto"
|
||||
ColumnDefinitions="180,Auto,Auto"
|
||||
IsVisible="False"
|
||||
RowDefinitions="Auto,Auto,Auto,Auto,Auto">
|
||||
|
||||
@@ -312,7 +312,7 @@
|
||||
<Grid
|
||||
x:Name="gridTrojan"
|
||||
Grid.Row="2"
|
||||
ColumnDefinitions="300,Auto"
|
||||
ColumnDefinitions="180,Auto"
|
||||
IsVisible="False"
|
||||
RowDefinitions="Auto,Auto,Auto,Auto,Auto">
|
||||
|
||||
@@ -358,7 +358,7 @@
|
||||
<Grid
|
||||
x:Name="gridHysteria2"
|
||||
Grid.Row="2"
|
||||
ColumnDefinitions="300,Auto,Auto"
|
||||
ColumnDefinitions="180,Auto,Auto"
|
||||
IsVisible="False"
|
||||
RowDefinitions="Auto,Auto,Auto,Auto">
|
||||
|
||||
@@ -411,7 +411,7 @@
|
||||
<Grid
|
||||
x:Name="gridTuic"
|
||||
Grid.Row="2"
|
||||
ColumnDefinitions="300,Auto"
|
||||
ColumnDefinitions="180,Auto"
|
||||
IsVisible="False"
|
||||
RowDefinitions="Auto,Auto,Auto,Auto">
|
||||
|
||||
@@ -457,7 +457,7 @@
|
||||
<Grid
|
||||
x:Name="gridWireguard"
|
||||
Grid.Row="2"
|
||||
ColumnDefinitions="300,Auto"
|
||||
ColumnDefinitions="180,Auto"
|
||||
IsVisible="False"
|
||||
RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto">
|
||||
|
||||
@@ -534,7 +534,7 @@
|
||||
<Grid
|
||||
x:Name="gridAnytls"
|
||||
Grid.Row="2"
|
||||
ColumnDefinitions="300,Auto"
|
||||
ColumnDefinitions="180,Auto"
|
||||
IsVisible="False"
|
||||
RowDefinitions="Auto,Auto,Auto">
|
||||
|
||||
@@ -560,7 +560,7 @@
|
||||
<Grid
|
||||
x:Name="gridTransport"
|
||||
Grid.Row="4"
|
||||
ColumnDefinitions="300,Auto,Auto"
|
||||
ColumnDefinitions="180,Auto,Auto"
|
||||
RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto">
|
||||
|
||||
<TextBlock
|
||||
@@ -692,7 +692,7 @@
|
||||
<Grid
|
||||
x:Name="gridTls"
|
||||
Grid.Row="6"
|
||||
ColumnDefinitions="300,Auto"
|
||||
ColumnDefinitions="180,Auto"
|
||||
RowDefinitions="Auto,Auto,Auto,Auto,Auto">
|
||||
|
||||
<TextBlock
|
||||
@@ -711,7 +711,7 @@
|
||||
<Grid
|
||||
x:Name="gridTlsMore"
|
||||
Grid.Row="7"
|
||||
ColumnDefinitions="300,Auto"
|
||||
ColumnDefinitions="180,Auto"
|
||||
IsVisible="False"
|
||||
RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto">
|
||||
|
||||
@@ -831,7 +831,7 @@
|
||||
<Grid
|
||||
x:Name="gridRealityMore"
|
||||
Grid.Row="7"
|
||||
ColumnDefinitions="300,Auto"
|
||||
ColumnDefinitions="180,Auto"
|
||||
IsVisible="False"
|
||||
RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto">
|
||||
|
||||
|
||||
@@ -110,10 +110,7 @@
|
||||
<ItemsControl.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem x:Name="menuProxiesDelaytestPart" Header="{x:Static resx:ResUI.menuProxiesDelaytestPart}" />
|
||||
<MenuItem
|
||||
x:Name="menuProxiesSelectActivity"
|
||||
Header="{x:Static resx:ResUI.menuProxiesSelectActivity}"
|
||||
InputGesture="Enter" />
|
||||
<MenuItem x:Name="menuProxiesSelectActivity" Header="{x:Static resx:ResUI.menuProxiesSelectActivity}" />
|
||||
</ContextMenu>
|
||||
</ItemsControl.ContextMenu>
|
||||
<ItemsControl.ItemsPanel>
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
xmlns:view="using:v2rayN.Desktop.Views"
|
||||
xmlns:vms="clr-namespace:ServiceLib.ViewModels;assembly=ServiceLib"
|
||||
Title="v2rayN"
|
||||
Width="1200"
|
||||
Height="800"
|
||||
Width="1000"
|
||||
Height="600"
|
||||
MinWidth="900"
|
||||
x:DataType="vms:MainWindowViewModel"
|
||||
Icon="/Assets/NotifyIcon1.ico"
|
||||
@@ -24,16 +24,15 @@
|
||||
<DockPanel>
|
||||
<DockPanel Margin="{StaticResource Margin8}" DockPanel.Dock="Top">
|
||||
<ContentControl x:Name="conTheme" DockPanel.Dock="Right" />
|
||||
<Menu Margin="{StaticResource Margin4}">
|
||||
<MenuItem Header="{x:Static resx:ResUI.menuServers}">
|
||||
<MenuItem
|
||||
x:Name="menuAddServerViaClipboard"
|
||||
Header="{x:Static resx:ResUI.menuAddServerViaClipboard}"
|
||||
InputGesture="Ctrl+V" />
|
||||
<MenuItem
|
||||
x:Name="menuAddServerViaScan"
|
||||
Header="{x:Static resx:ResUI.menuAddServerViaScan}"
|
||||
InputGesture="Ctrl+S" />
|
||||
<Menu Margin="0,1">
|
||||
<MenuItem Padding="{StaticResource MarginLr8}">
|
||||
<MenuItem.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{x:Static resx:ResUI.menuServers}" />
|
||||
</StackPanel>
|
||||
</MenuItem.Header>
|
||||
<MenuItem x:Name="menuAddServerViaClipboard" Header="{x:Static resx:ResUI.menuAddServerViaClipboard}" />
|
||||
<MenuItem x:Name="menuAddServerViaScan" Header="{x:Static resx:ResUI.menuAddServerViaScan}" />
|
||||
<MenuItem x:Name="menuAddServerViaImage" Header="{x:Static resx:ResUI.menuAddServerViaImage}" />
|
||||
<MenuItem x:Name="menuAddCustomServer" Header="{x:Static resx:ResUI.menuAddCustomServer}" />
|
||||
<MenuItem x:Name="menuAddPolicyGroupServer" Header="{x:Static resx:ResUI.menuAddPolicyGroupServer}" />
|
||||
@@ -52,7 +51,12 @@
|
||||
<MenuItem x:Name="menuAddAnytlsServer" Header="{x:Static resx:ResUI.menuAddAnytlsServer}" />
|
||||
</MenuItem>
|
||||
|
||||
<MenuItem Header="{x:Static resx:ResUI.menuSubscription}">
|
||||
<MenuItem Padding="{StaticResource MarginLr8}">
|
||||
<MenuItem.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{x:Static resx:ResUI.menuSubscription}" />
|
||||
</StackPanel>
|
||||
</MenuItem.Header>
|
||||
<MenuItem x:Name="menuSubSetting" Header="{x:Static resx:ResUI.menuSubSetting}" />
|
||||
<Separator />
|
||||
<MenuItem x:Name="menuSubUpdate" Header="{x:Static resx:ResUI.menuSubUpdate}" />
|
||||
@@ -61,24 +65,20 @@
|
||||
<MenuItem x:Name="menuSubGroupUpdateViaProxy" Header="{x:Static resx:ResUI.menuSubGroupUpdateViaProxy}" />
|
||||
</MenuItem>
|
||||
|
||||
<MenuItem Header="{x:Static resx:ResUI.menuSetting}">
|
||||
<MenuItem Padding="{StaticResource MarginLr8}">
|
||||
<MenuItem.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{x:Static resx:ResUI.menuSetting}" />
|
||||
</StackPanel>
|
||||
</MenuItem.Header>
|
||||
<MenuItem x:Name="menuOptionSetting" Header="{x:Static resx:ResUI.menuOptionSetting}" />
|
||||
<MenuItem x:Name="menuRoutingSetting" Header="{x:Static resx:ResUI.menuRoutingSetting}" />
|
||||
<MenuItem x:Name="menuDNSSetting" Header="{x:Static resx:ResUI.menuDNSSetting}" />
|
||||
<MenuItem x:Name="menuFullConfigTemplate" Header="{x:Static resx:ResUI.menuFullConfigTemplate}" />
|
||||
<MenuItem
|
||||
x:Name="menuGlobalHotkeySetting"
|
||||
Header="{x:Static resx:ResUI.menuGlobalHotkeySetting}"
|
||||
IsVisible="{Binding BlIsWindows}" />
|
||||
<MenuItem x:Name="menuGlobalHotkeySetting" Header="{x:Static resx:ResUI.menuGlobalHotkeySetting}" IsVisible="{Binding BlIsWindows}" />
|
||||
<Separator />
|
||||
<MenuItem
|
||||
x:Name="menuRebootAsAdmin"
|
||||
Header="{x:Static resx:ResUI.menuRebootAsAdmin}"
|
||||
IsVisible="{Binding BlIsWindows}" />
|
||||
<MenuItem
|
||||
x:Name="menuSettingsSetUWP"
|
||||
Header="{x:Static resx:ResUI.TbSettingsSetUWP}"
|
||||
IsVisible="{Binding BlIsWindows}" />
|
||||
<MenuItem x:Name="menuRebootAsAdmin" Header="{x:Static resx:ResUI.menuRebootAsAdmin}" IsVisible="{Binding BlIsWindows}" />
|
||||
<MenuItem x:Name="menuSettingsSetUWP" Header="{x:Static resx:ResUI.TbSettingsSetUWP}" IsVisible="{Binding BlIsWindows}" />
|
||||
<MenuItem x:Name="menuClearServerStatistics" Header="{x:Static resx:ResUI.menuClearServerStatistics}" />
|
||||
<Separator />
|
||||
<MenuItem Header="{x:Static resx:ResUI.menuRegionalPresets}">
|
||||
@@ -90,16 +90,15 @@
|
||||
<MenuItem x:Name="menuOpenTheFileLocation" Header="{x:Static resx:ResUI.menuOpenTheFileLocation}" />
|
||||
</MenuItem>
|
||||
|
||||
<MenuItem x:Name="menuHelp" Header="{x:Static resx:ResUI.menuHelp}">
|
||||
<MenuItem x:Name="menuCheckUpdate" Header="{x:Static resx:ResUI.menuCheckUpdate}" />
|
||||
<Separator />
|
||||
</MenuItem>
|
||||
<MenuItem x:Name="menuReload" Padding="{StaticResource MarginLr8}" Header="{x:Static resx:ResUI.menuReload}" />
|
||||
|
||||
<MenuItem x:Name="menuReload" Header="{x:Static resx:ResUI.menuReload}" />
|
||||
<MenuItem x:Name="menuCheckUpdate" Header="{x:Static resx:ResUI.menuCheckUpdate}" />
|
||||
|
||||
<MenuItem x:Name="menuPromotion" Header="{x:Static resx:ResUI.menuPromotion}" />
|
||||
<MenuItem x:Name="menuHelp" Padding="{StaticResource MarginLr8}" Header="{x:Static resx:ResUI.menuHelp}" />
|
||||
|
||||
<MenuItem x:Name="menuClose" Header="{x:Static resx:ResUI.menuExit}" />
|
||||
<MenuItem x:Name="menuPromotion" Padding="{StaticResource MarginLr8}" Header="{x:Static resx:ResUI.menuPromotion}" />
|
||||
|
||||
<MenuItem x:Name="menuClose" Padding="{StaticResource MarginLr8}" Header="{x:Static resx:ResUI.menuExit}" />
|
||||
</Menu>
|
||||
</DockPanel>
|
||||
|
||||
|
||||
@@ -72,20 +72,18 @@
|
||||
VerticalScrollBarVisibility="Auto"
|
||||
WordWrap="True">
|
||||
<avaloniaEdit:TextEditor.Options>
|
||||
<avaloniaEdit:TextEditorOptions AllowScrollBelowDocument="False" />
|
||||
<avaloniaEdit:TextEditorOptions AllowScrollBelowDocument="False"/>
|
||||
</avaloniaEdit:TextEditor.Options>
|
||||
<avaloniaEdit:TextEditor.ContextFlyout>
|
||||
<MenuFlyout>
|
||||
<MenuItem
|
||||
x:Name="menuMsgViewSelectAll"
|
||||
Click="menuMsgViewSelectAll_Click"
|
||||
InputGesture="Ctrl+A"
|
||||
Header="{x:Static resx:ResUI.menuMsgViewSelectAll}" />
|
||||
<MenuItem
|
||||
x:Name="menuMsgViewCopy"
|
||||
Click="menuMsgViewCopy_Click"
|
||||
Header="{x:Static resx:ResUI.menuMsgViewCopy}"
|
||||
InputGesture="Ctrl+C" />
|
||||
Header="{x:Static resx:ResUI.menuMsgViewCopy}" />
|
||||
<MenuItem
|
||||
x:Name="menuMsgViewCopyAll"
|
||||
Click="menuMsgViewCopyAll_Click"
|
||||
|
||||
@@ -592,8 +592,7 @@
|
||||
Grid.Row="20"
|
||||
Grid.Column="1"
|
||||
Width="300"
|
||||
Margin="{StaticResource Margin4}"
|
||||
IsEditable="True" />
|
||||
Margin="{StaticResource Margin4}" />
|
||||
|
||||
<TextBlock
|
||||
Grid.Row="21"
|
||||
|
||||
@@ -101,7 +101,7 @@ public partial class OptionSettingWindow : WindowBase<OptionSettingViewModel>
|
||||
this.Bind(ViewModel, vm => vm.GeoFileSourceUrl, v => v.cmbGetFilesSourceUrl.SelectedValue).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.SrsFileSourceUrl, v => v.cmbSrsFilesSourceUrl.SelectedValue).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.RoutingRulesSourceUrl, v => v.cmbRoutingRulesSourceUrl.SelectedValue).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.IPAPIUrl, v => v.cmbIPAPIUrl.Text).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.IPAPIUrl, v => v.cmbIPAPIUrl.SelectedValue).DisposeWith(disposables);
|
||||
|
||||
this.Bind(ViewModel, vm => vm.notProxyLocalAddress, v => v.tognotProxyLocalAddress.IsChecked).DisposeWith(disposables);
|
||||
this.Bind(ViewModel, vm => vm.systemProxyAdvancedProtocol, v => v.cmbsystemProxyAdvancedProtocol.SelectedValue).DisposeWith(disposables);
|
||||
|
||||
@@ -28,14 +28,6 @@
|
||||
<WrapPanel />
|
||||
</ItemsPanelTemplate>
|
||||
</ListBox.ItemsPanel>
|
||||
|
||||
<ListBox.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem x:Name="menuSubEdit" Header="{x:Static resx:ResUI.menuSubEdit}" />
|
||||
<MenuItem x:Name="menuSubAdd" Header="{x:Static resx:ResUI.menuSubAdd}" />
|
||||
<MenuItem x:Name="menuSubDelete" Header="{x:Static resx:ResUI.menuSubDelete}" />
|
||||
</ContextMenu>
|
||||
</ListBox.ContextMenu>
|
||||
</ListBox>
|
||||
|
||||
<Button
|
||||
@@ -111,34 +103,16 @@
|
||||
</DataGrid.KeyBindings>
|
||||
<DataGrid.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem
|
||||
x:Name="menuSetDefaultServer"
|
||||
Header="{x:Static resx:ResUI.menuSetDefaultServer}"
|
||||
InputGesture="Enter" />
|
||||
<MenuItem
|
||||
x:Name="menuEditServer"
|
||||
Header="{x:Static resx:ResUI.menuEditServer}"
|
||||
InputGesture="Ctrl+D" />
|
||||
<MenuItem x:Name="menuSetDefaultServer" Header="{x:Static resx:ResUI.menuSetDefaultServer}" />
|
||||
<MenuItem x:Name="menuEditServer" Header="{x:Static resx:ResUI.menuEditServer}" />
|
||||
<MenuItem x:Name="menuCopyServer" Header="{x:Static resx:ResUI.menuCopyServer}" />
|
||||
<MenuItem
|
||||
x:Name="menuRemoveServer"
|
||||
Header="{x:Static resx:ResUI.menuRemoveServer}"
|
||||
InputGesture="Back" />
|
||||
<MenuItem x:Name="menuRemoveServer" Header="{x:Static resx:ResUI.menuRemoveServer}" />
|
||||
<MenuItem x:Name="menuRemoveDuplicateServer" Header="{x:Static resx:ResUI.menuRemoveDuplicateServer}" />
|
||||
<MenuItem x:Name="menuRemoveInvalidServerResult" Header="{x:Static resx:ResUI.menuRemoveInvalidServerResult}" />
|
||||
<Separator />
|
||||
<MenuItem
|
||||
x:Name="menuTcpingServer"
|
||||
Header="{x:Static resx:ResUI.menuTcpingServer}"
|
||||
InputGesture="Ctrl+O" />
|
||||
<MenuItem
|
||||
x:Name="menuRealPingServer"
|
||||
Header="{x:Static resx:ResUI.menuRealPingServer}"
|
||||
InputGesture="Ctrl+R" />
|
||||
<MenuItem
|
||||
x:Name="menuSpeedServer"
|
||||
Header="{x:Static resx:ResUI.menuSpeedServer}"
|
||||
InputGesture="Ctrl+T" />
|
||||
<MenuItem x:Name="menuTcpingServer" Header="{x:Static resx:ResUI.menuTcpingServer}" />
|
||||
<MenuItem x:Name="menuRealPingServer" Header="{x:Static resx:ResUI.menuRealPingServer}" />
|
||||
<MenuItem x:Name="menuSpeedServer" Header="{x:Static resx:ResUI.menuSpeedServer}" />
|
||||
<MenuItem x:Name="menuSortServerResult" Header="{x:Static resx:ResUI.menuSortServerResult}" />
|
||||
<Separator />
|
||||
<MenuItem x:Name="menuMoveToGroup" Header="{x:Static resx:ResUI.menuMoveToGroup}">
|
||||
@@ -156,40 +130,19 @@
|
||||
</MenuItem>
|
||||
</MenuItem>
|
||||
<MenuItem Header="{x:Static resx:ResUI.menuMoveTo}">
|
||||
<MenuItem
|
||||
x:Name="menuMoveTop"
|
||||
Header="{x:Static resx:ResUI.menuMoveTop}"
|
||||
InputGesture="T" />
|
||||
<MenuItem
|
||||
x:Name="menuMoveUp"
|
||||
Header="{x:Static resx:ResUI.menuMoveUp}"
|
||||
InputGesture="U" />
|
||||
<MenuItem
|
||||
x:Name="menuMoveDown"
|
||||
Header="{x:Static resx:ResUI.menuMoveDown}"
|
||||
InputGesture="D" />
|
||||
<MenuItem
|
||||
x:Name="menuMoveBottom"
|
||||
Header="{x:Static resx:ResUI.menuMoveBottom}"
|
||||
InputGesture="B" />
|
||||
<MenuItem x:Name="menuMoveTop" Header="{x:Static resx:ResUI.menuMoveTop}" />
|
||||
<MenuItem x:Name="menuMoveUp" Header="{x:Static resx:ResUI.menuMoveUp}" />
|
||||
<MenuItem x:Name="menuMoveDown" Header="{x:Static resx:ResUI.menuMoveDown}" />
|
||||
<MenuItem x:Name="menuMoveBottom" Header="{x:Static resx:ResUI.menuMoveBottom}" />
|
||||
</MenuItem>
|
||||
<MenuItem
|
||||
x:Name="menuSelectAll"
|
||||
Header="{x:Static resx:ResUI.menuSelectAll}"
|
||||
InputGesture="Ctrl+A" />
|
||||
<MenuItem x:Name="menuSelectAll" Header="{x:Static resx:ResUI.menuSelectAll}" />
|
||||
<Separator />
|
||||
<MenuItem
|
||||
x:Name="menuShareServer"
|
||||
Header="{x:Static resx:ResUI.menuShareServer}"
|
||||
InputGesture="Ctrl+F" />
|
||||
<MenuItem x:Name="menuShareServer" Header="{x:Static resx:ResUI.menuShareServer}" />
|
||||
<MenuItem Header="{x:Static resx:ResUI.menuExportConfig}">
|
||||
<MenuItem x:Name="menuExport2ClientConfig" Header="{x:Static resx:ResUI.menuExport2ClientConfig}" />
|
||||
<MenuItem x:Name="menuExport2ClientConfigClipboard" Header="{x:Static resx:ResUI.menuExport2ClientConfigClipboard}" />
|
||||
<Separator />
|
||||
<MenuItem
|
||||
x:Name="menuExport2ShareUrl"
|
||||
Header="{x:Static resx:ResUI.menuExport2ShareUrl}"
|
||||
InputGesture="Ctrl+C" />
|
||||
<MenuItem x:Name="menuExport2ShareUrl" Header="{x:Static resx:ResUI.menuExport2ShareUrl}" />
|
||||
<MenuItem x:Name="menuExport2ShareUrlBase64" Header="{x:Static resx:ResUI.menuExport2ShareUrlBase64}" />
|
||||
</MenuItem>
|
||||
<Separator />
|
||||
|
||||
@@ -49,9 +49,6 @@ public partial class ProfilesView : ReactiveUserControl<ProfilesViewModel>
|
||||
this.Bind(ViewModel, vm => vm.ServerFilter, v => v.txtServerFilter.Text).DisposeWith(disposables);
|
||||
this.BindCommand(ViewModel, vm => vm.AddSubCmd, v => v.btnAddSub).DisposeWith(disposables);
|
||||
this.BindCommand(ViewModel, vm => vm.EditSubCmd, v => v.btnEditSub).DisposeWith(disposables);
|
||||
this.BindCommand(ViewModel, vm => vm.EditSubCmd, v => v.menuSubEdit).DisposeWith(disposables);
|
||||
this.BindCommand(ViewModel, vm => vm.AddSubCmd, v => v.menuSubAdd).DisposeWith(disposables);
|
||||
this.BindCommand(ViewModel, vm => vm.DeleteSubCmd, v => v.menuSubDelete).DisposeWith(disposables);
|
||||
|
||||
//servers delete
|
||||
this.BindCommand(ViewModel, vm => vm.EditServerCmd, v => v.menuEditServer).DisposeWith(disposables);
|
||||
@@ -316,37 +313,33 @@ public partial class ProfilesView : ReactiveUserControl<ProfilesViewModel>
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (e.Key)
|
||||
if (e.Key is Key.Enter or Key.Return)
|
||||
{
|
||||
case Key.Enter:
|
||||
//case Key.Return:
|
||||
ViewModel?.SetDefaultServer();
|
||||
break;
|
||||
|
||||
case Key.Delete:
|
||||
case Key.Back:
|
||||
ViewModel?.RemoveServerAsync();
|
||||
break;
|
||||
|
||||
case Key.T:
|
||||
ViewModel?.MoveServer(EMove.Top);
|
||||
break;
|
||||
|
||||
case Key.U:
|
||||
ViewModel?.MoveServer(EMove.Up);
|
||||
break;
|
||||
|
||||
case Key.D:
|
||||
ViewModel?.MoveServer(EMove.Down);
|
||||
break;
|
||||
|
||||
case Key.B:
|
||||
ViewModel?.MoveServer(EMove.Bottom);
|
||||
break;
|
||||
|
||||
case Key.Escape:
|
||||
ViewModel?.ServerSpeedtestStop();
|
||||
break;
|
||||
ViewModel?.SetDefaultServer();
|
||||
}
|
||||
else if (e.Key == Key.Delete)
|
||||
{
|
||||
ViewModel?.RemoveServerAsync();
|
||||
}
|
||||
else if (e.Key == Key.T)
|
||||
{
|
||||
ViewModel?.MoveServer(EMove.Top);
|
||||
}
|
||||
else if (e.Key == Key.U)
|
||||
{
|
||||
ViewModel?.MoveServer(EMove.Up);
|
||||
}
|
||||
else if (e.Key == Key.D)
|
||||
{
|
||||
ViewModel?.MoveServer(EMove.Down);
|
||||
}
|
||||
else if (e.Key == Key.B)
|
||||
{
|
||||
ViewModel?.MoveServer(EMove.Bottom);
|
||||
}
|
||||
else if (e.Key == Key.Escape)
|
||||
{
|
||||
ViewModel?.ServerSpeedtestStop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,12 +14,17 @@
|
||||
WindowStartupLocation="CenterScreen"
|
||||
mc:Ignorable="d">
|
||||
<DockPanel>
|
||||
<Menu Margin="{StaticResource Margin4}" DockPanel.Dock="Top">
|
||||
<MenuItem x:Name="menuRuleAdd" Header="{x:Static resx:ResUI.menuRuleAdd}" />
|
||||
<MenuItem x:Name="menuImportRulesFromFile" Header="{x:Static resx:ResUI.menuImportRulesFromFile}" />
|
||||
<MenuItem x:Name="menuImportRulesFromClipboard" Header="{x:Static resx:ResUI.menuImportRulesFromClipboard}" />
|
||||
<MenuItem x:Name="menuImportRulesFromUrl" Header="{x:Static resx:ResUI.menuImportRulesFromUrl}" />
|
||||
</Menu>
|
||||
<StackPanel
|
||||
Margin="{StaticResource Margin4}"
|
||||
DockPanel.Dock="Top"
|
||||
Orientation="Horizontal">
|
||||
<Menu>
|
||||
<MenuItem x:Name="menuRuleAdd" Header="{x:Static resx:ResUI.menuRuleAdd}" />
|
||||
<MenuItem x:Name="menuImportRulesFromFile" Header="{x:Static resx:ResUI.menuImportRulesFromFile}" />
|
||||
<MenuItem x:Name="menuImportRulesFromClipboard" Header="{x:Static resx:ResUI.menuImportRulesFromClipboard}" />
|
||||
<MenuItem x:Name="menuImportRulesFromUrl" Header="{x:Static resx:ResUI.menuImportRulesFromUrl}" />
|
||||
</Menu>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel
|
||||
Margin="{StaticResource Margin4}"
|
||||
@@ -184,32 +189,14 @@
|
||||
<DataGrid.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem x:Name="menuRuleAdd2" Header="{x:Static resx:ResUI.menuRuleAdd}" />
|
||||
<MenuItem
|
||||
x:Name="menuRuleRemove"
|
||||
Header="{x:Static resx:ResUI.menuRuleRemove}"
|
||||
InputGesture="Back" />
|
||||
<MenuItem
|
||||
x:Name="menuRuleSelectAll"
|
||||
Header="{x:Static resx:ResUI.menuSelectAll}"
|
||||
InputGesture="Ctrl+A" />
|
||||
<MenuItem x:Name="menuRuleRemove" Header="{x:Static resx:ResUI.menuRuleRemove}" />
|
||||
<MenuItem x:Name="menuRuleSelectAll" Header="{x:Static resx:ResUI.menuSelectAll}" />
|
||||
<MenuItem x:Name="menuRuleExportSelected" Header="{x:Static resx:ResUI.menuRuleExportSelected}" />
|
||||
<Separator />
|
||||
<MenuItem
|
||||
x:Name="menuMoveTop"
|
||||
Header="{x:Static resx:ResUI.menuMoveTop}"
|
||||
InputGesture="T" />
|
||||
<MenuItem
|
||||
x:Name="menuMoveUp"
|
||||
Header="{x:Static resx:ResUI.menuMoveUp}"
|
||||
InputGesture="U" />
|
||||
<MenuItem
|
||||
x:Name="menuMoveDown"
|
||||
Header="{x:Static resx:ResUI.menuMoveDown}"
|
||||
InputGesture="D" />
|
||||
<MenuItem
|
||||
x:Name="menuMoveBottom"
|
||||
Header="{x:Static resx:ResUI.menuMoveBottom}"
|
||||
InputGesture="B" />
|
||||
<MenuItem x:Name="menuMoveTop" Header="{x:Static resx:ResUI.menuMoveTop}" />
|
||||
<MenuItem x:Name="menuMoveUp" Header="{x:Static resx:ResUI.menuMoveUp}" />
|
||||
<MenuItem x:Name="menuMoveDown" Header="{x:Static resx:ResUI.menuMoveDown}" />
|
||||
<MenuItem x:Name="menuMoveBottom" Header="{x:Static resx:ResUI.menuMoveBottom}" />
|
||||
</ContextMenu>
|
||||
</DataGrid.ContextMenu>
|
||||
<DataGrid.Columns>
|
||||
|
||||
@@ -140,28 +140,25 @@ public partial class RoutingRuleSettingWindow : WindowBase<RoutingRuleSettingVie
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (e.Key)
|
||||
if (e.Key == Key.T)
|
||||
{
|
||||
case Key.T:
|
||||
ViewModel?.MoveRule(EMove.Top);
|
||||
break;
|
||||
|
||||
case Key.U:
|
||||
ViewModel?.MoveRule(EMove.Up);
|
||||
break;
|
||||
|
||||
case Key.D:
|
||||
ViewModel?.MoveRule(EMove.Down);
|
||||
break;
|
||||
|
||||
case Key.B:
|
||||
ViewModel?.MoveRule(EMove.Bottom);
|
||||
break;
|
||||
|
||||
case Key.Delete:
|
||||
case Key.Back:
|
||||
ViewModel?.RuleRemoveAsync();
|
||||
break;
|
||||
ViewModel?.MoveRule(EMove.Top);
|
||||
}
|
||||
else if (e.Key == Key.U)
|
||||
{
|
||||
ViewModel?.MoveRule(EMove.Up);
|
||||
}
|
||||
else if (e.Key == Key.D)
|
||||
{
|
||||
ViewModel?.MoveRule(EMove.Down);
|
||||
}
|
||||
else if (e.Key == Key.B)
|
||||
{
|
||||
ViewModel?.MoveRule(EMove.Bottom);
|
||||
}
|
||||
else if (e.Key == Key.Delete)
|
||||
{
|
||||
ViewModel?.RuleRemoveAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,10 +15,16 @@
|
||||
mc:Ignorable="d">
|
||||
|
||||
<DockPanel>
|
||||
<Menu Margin="{StaticResource Margin4}" DockPanel.Dock="Top">
|
||||
<MenuItem x:Name="menuRoutingAdvancedAdd2" Header="{x:Static resx:ResUI.menuRoutingAdvancedAdd}" />
|
||||
<MenuItem x:Name="menuRoutingAdvancedImportRules2" Header="{x:Static resx:ResUI.menuRoutingAdvancedImportRules}" />
|
||||
</Menu>
|
||||
<StackPanel
|
||||
Margin="{StaticResource Margin4}"
|
||||
DockPanel.Dock="Top"
|
||||
Orientation="Horizontal"
|
||||
Spacing="4">
|
||||
<Menu>
|
||||
<MenuItem x:Name="menuRoutingAdvancedAdd2" Header="{x:Static resx:ResUI.menuRoutingAdvancedAdd}" />
|
||||
<MenuItem x:Name="menuRoutingAdvancedImportRules2" Header="{x:Static resx:ResUI.menuRoutingAdvancedImportRules}" />
|
||||
</Menu>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel
|
||||
Margin="{StaticResource Margin4}"
|
||||
@@ -99,18 +105,9 @@
|
||||
<DataGrid.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem x:Name="menuRoutingAdvancedAdd" Header="{x:Static resx:ResUI.menuRoutingAdvancedAdd}" />
|
||||
<MenuItem
|
||||
x:Name="menuRoutingAdvancedRemove"
|
||||
Header="{x:Static resx:ResUI.menuRoutingAdvancedRemove}"
|
||||
InputGesture="Back" />
|
||||
<MenuItem
|
||||
x:Name="menuRoutingAdvancedSelectAll"
|
||||
Header="{x:Static resx:ResUI.menuSelectAll}"
|
||||
InputGesture="Ctrl+A" />
|
||||
<MenuItem
|
||||
x:Name="menuRoutingAdvancedSetDefault"
|
||||
Header="{x:Static resx:ResUI.menuRoutingAdvancedSetDefault}"
|
||||
InputGesture="Enter" />
|
||||
<MenuItem x:Name="menuRoutingAdvancedRemove" Header="{x:Static resx:ResUI.menuRoutingAdvancedRemove}" />
|
||||
<MenuItem x:Name="menuRoutingAdvancedSelectAll" Header="{x:Static resx:ResUI.menuSelectAll}" />
|
||||
<MenuItem x:Name="menuRoutingAdvancedSetDefault" Header="{x:Static resx:ResUI.menuRoutingAdvancedSetDefault}" />
|
||||
<Separator />
|
||||
<MenuItem x:Name="menuRoutingAdvancedImportRules" Header="{x:Static resx:ResUI.menuRoutingAdvancedImportRules}" />
|
||||
</ContextMenu>
|
||||
|
||||
@@ -73,27 +73,18 @@ public partial class RoutingSettingWindow : WindowBase<RoutingSettingViewModel>
|
||||
{
|
||||
if (e.KeyModifiers is KeyModifiers.Control or KeyModifiers.Meta)
|
||||
{
|
||||
switch (e.Key)
|
||||
if (e.Key == Key.A)
|
||||
{
|
||||
case Key.A:
|
||||
lstRoutings.SelectAll();
|
||||
break;
|
||||
lstRoutings.SelectAll();
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (e.Key is Key.Enter or Key.Return)
|
||||
{
|
||||
switch (e.Key)
|
||||
{
|
||||
case Key.Enter:
|
||||
//case Key.Return:
|
||||
ViewModel?.RoutingAdvancedSetDefault();
|
||||
break;
|
||||
|
||||
case Key.Delete:
|
||||
case Key.Back:
|
||||
ViewModel?.RoutingAdvancedRemoveAsync();
|
||||
break;
|
||||
}
|
||||
ViewModel?.RoutingAdvancedSetDefault();
|
||||
}
|
||||
else if (e.Key == Key.Delete)
|
||||
{
|
||||
ViewModel?.RoutingAdvancedRemoveAsync();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,13 +20,18 @@
|
||||
DisableOpeningAnimation="True"
|
||||
Identifier="dialogHostSub">
|
||||
<DockPanel Margin="{StaticResource Margin8}">
|
||||
<Menu Margin="{StaticResource Margin4}" DockPanel.Dock="Top">
|
||||
<MenuItem x:Name="menuSubAdd" Header="{x:Static resx:ResUI.menuSubAdd}" />
|
||||
<MenuItem x:Name="menuSubDelete" Header="{x:Static resx:ResUI.menuSubDelete}" />
|
||||
<MenuItem x:Name="menuSubEdit" Header="{x:Static resx:ResUI.menuSubEdit}" />
|
||||
<MenuItem x:Name="menuSubShare" Header="{x:Static resx:ResUI.menuSubShare}" />
|
||||
<MenuItem x:Name="menuClose" Header="{x:Static resx:ResUI.menuClose}" />
|
||||
</Menu>
|
||||
<StackPanel
|
||||
Margin="{StaticResource Margin4}"
|
||||
DockPanel.Dock="Top"
|
||||
Orientation="Horizontal">
|
||||
<Menu>
|
||||
<MenuItem x:Name="menuSubAdd" Header="{x:Static resx:ResUI.menuSubAdd}" />
|
||||
<MenuItem x:Name="menuSubDelete" Header="{x:Static resx:ResUI.menuSubDelete}" />
|
||||
<MenuItem x:Name="menuSubEdit" Header="{x:Static resx:ResUI.menuSubEdit}" />
|
||||
<MenuItem x:Name="menuSubShare" Header="{x:Static resx:ResUI.menuSubShare}" />
|
||||
<MenuItem x:Name="menuClose" Header="{x:Static resx:ResUI.menuClose}" />
|
||||
</Menu>
|
||||
</StackPanel>
|
||||
|
||||
<DataGrid
|
||||
x:Name="lstSubscription"
|
||||
@@ -69,4 +74,4 @@
|
||||
</DataGrid>
|
||||
</DockPanel>
|
||||
</dialogHost:DialogHost>
|
||||
</Window>
|
||||
</Window>
|
||||
@@ -13,7 +13,7 @@ public partial class ThemeSettingView : ReactiveUserControl<ThemeSettingViewMode
|
||||
ViewModel = new ThemeSettingViewModel();
|
||||
|
||||
cmbCurrentTheme.ItemsSource = Utils.GetEnumNames<ETheme>();
|
||||
cmbCurrentFontSize.ItemsSource = Enumerable.Range(Global.MinFontSize, Global.MinFontSizeCount).ToList();
|
||||
cmbCurrentFontSize.ItemsSource = Enumerable.Range(Global.MinFontSize, 11).ToList();
|
||||
cmbCurrentLanguage.ItemsSource = Global.Languages;
|
||||
|
||||
this.WhenActivated(disposables =>
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="300" />
|
||||
<ColumnDefinition Width="180" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
@@ -111,7 +111,7 @@
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="300" />
|
||||
<ColumnDefinition Width="180" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
@@ -134,10 +134,7 @@
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<TabControl
|
||||
Margin="{StaticResource Margin8}"
|
||||
HorizontalContentAlignment="Left"
|
||||
DockPanel.Dock="Top">
|
||||
<TabControl DockPanel.Dock="Top">
|
||||
<TabItem HorizontalAlignment="Left" Header="{x:Static resx:ResUI.menuServerList}">
|
||||
<Grid Margin="{StaticResource Margin8}">
|
||||
<Grid.RowDefinitions>
|
||||
@@ -146,7 +143,7 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="300" />
|
||||
<ColumnDefinition Width="180" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
@@ -191,8 +188,10 @@
|
||||
Style="{StaticResource DefTextBox}" />
|
||||
</Grid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
|
||||
<TabItem HorizontalAlignment="Left" Header="{x:Static resx:ResUI.menuServerList2}">
|
||||
<TabControl>
|
||||
<TabItem HorizontalAlignment="Left" Header="{x:Static resx:ResUI.menuServerList}">
|
||||
<DataGrid
|
||||
x:Name="lstChild"
|
||||
AutoGenerateColumns="False"
|
||||
@@ -219,29 +218,24 @@
|
||||
<MenuItem
|
||||
x:Name="menuSelectAllChild"
|
||||
Height="{StaticResource MenuItemHeight}"
|
||||
Header="{x:Static resx:ResUI.menuSelectAll}"
|
||||
InputGestureText="Ctrl+A" />
|
||||
Header="{x:Static resx:ResUI.menuSelectAll}" />
|
||||
<Separator />
|
||||
<MenuItem
|
||||
x:Name="menuMoveTop"
|
||||
Height="{StaticResource MenuItemHeight}"
|
||||
Header="{x:Static resx:ResUI.menuMoveTop}"
|
||||
InputGestureText="T" />
|
||||
Header="{x:Static resx:ResUI.menuMoveTop}" />
|
||||
<MenuItem
|
||||
x:Name="menuMoveUp"
|
||||
Height="{StaticResource MenuItemHeight}"
|
||||
Header="{x:Static resx:ResUI.menuMoveUp}"
|
||||
InputGestureText="U" />
|
||||
Header="{x:Static resx:ResUI.menuMoveUp}" />
|
||||
<MenuItem
|
||||
x:Name="menuMoveDown"
|
||||
Height="{StaticResource MenuItemHeight}"
|
||||
Header="{x:Static resx:ResUI.menuMoveDown}"
|
||||
InputGestureText="D" />
|
||||
Header="{x:Static resx:ResUI.menuMoveDown}" />
|
||||
<MenuItem
|
||||
x:Name="menuMoveBottom"
|
||||
Height="{StaticResource MenuItemHeight}"
|
||||
Header="{x:Static resx:ResUI.menuMoveBottom}"
|
||||
InputGestureText="B" />
|
||||
Header="{x:Static resx:ResUI.menuMoveBottom}" />
|
||||
</ContextMenu>
|
||||
</DataGrid.ContextMenu>
|
||||
<DataGrid.Columns>
|
||||
|
||||
@@ -91,28 +91,25 @@ public partial class AddGroupServerWindow
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (e.Key)
|
||||
if (e.Key == Key.T)
|
||||
{
|
||||
case Key.T:
|
||||
ViewModel?.MoveServer(EMove.Top);
|
||||
break;
|
||||
|
||||
case Key.U:
|
||||
ViewModel?.MoveServer(EMove.Up);
|
||||
break;
|
||||
|
||||
case Key.D:
|
||||
ViewModel?.MoveServer(EMove.Down);
|
||||
break;
|
||||
|
||||
case Key.B:
|
||||
ViewModel?.MoveServer(EMove.Bottom);
|
||||
break;
|
||||
|
||||
case Key.Delete:
|
||||
case Key.Back:
|
||||
ViewModel?.ChildRemoveAsync();
|
||||
break;
|
||||
ViewModel?.MoveServer(EMove.Top);
|
||||
}
|
||||
else if (e.Key == Key.U)
|
||||
{
|
||||
ViewModel?.MoveServer(EMove.Up);
|
||||
}
|
||||
else if (e.Key == Key.D)
|
||||
{
|
||||
ViewModel?.MoveServer(EMove.Down);
|
||||
}
|
||||
else if (e.Key == Key.B)
|
||||
{
|
||||
ViewModel?.MoveServer(EMove.Bottom);
|
||||
}
|
||||
else if (e.Key == Key.Delete)
|
||||
{
|
||||
ViewModel?.ChildRemoveAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="300" />
|
||||
<ColumnDefinition Width="180" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
@@ -87,7 +87,7 @@
|
||||
Orientation="Horizontal">
|
||||
<ComboBox
|
||||
x:Name="cmbCoreType"
|
||||
Width="200"
|
||||
Width="100"
|
||||
Margin="{StaticResource Margin4}"
|
||||
materialDesign:HintAssist.Hint="{x:Static resx:ResUI.TbCoreType}"
|
||||
Style="{StaticResource DefComboBox}" />
|
||||
@@ -157,7 +157,7 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="300" />
|
||||
<ColumnDefinition Width="180" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
@@ -241,7 +241,7 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="300" />
|
||||
<ColumnDefinition Width="180" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
@@ -300,7 +300,7 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="300" />
|
||||
<ColumnDefinition Width="180" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
@@ -346,7 +346,7 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="300" />
|
||||
<ColumnDefinition Width="180" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
@@ -430,7 +430,7 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="300" />
|
||||
<ColumnDefinition Width="180" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
@@ -489,7 +489,7 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="300" />
|
||||
<ColumnDefinition Width="180" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
@@ -559,7 +559,7 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="300" />
|
||||
<ColumnDefinition Width="180" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
@@ -621,7 +621,7 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="300" />
|
||||
<ColumnDefinition Width="180" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
@@ -715,7 +715,7 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="300" />
|
||||
<ColumnDefinition Width="180" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
@@ -753,7 +753,7 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="300" />
|
||||
<ColumnDefinition Width="180" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
@@ -899,7 +899,7 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="300" />
|
||||
<ColumnDefinition Width="180" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
@@ -931,7 +931,7 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="300" />
|
||||
<ColumnDefinition Width="180" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
@@ -1067,7 +1067,7 @@
|
||||
<RowDefinition Height="Auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="300" />
|
||||
<ColumnDefinition Width="180" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<reactiveui:ReactiveUserControl
|
||||
<reactiveui:ReactiveUserControl
|
||||
x:Class="v2rayN.Views.BackupAndRestoreView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
@@ -23,6 +23,15 @@
|
||||
</UserControl.Resources>
|
||||
<DockPanel Margin="{StaticResource Margin8}">
|
||||
<DockPanel Margin="{StaticResource Margin8}" DockPanel.Dock="Bottom">
|
||||
<Button
|
||||
Width="100"
|
||||
Margin="{StaticResource Margin8}"
|
||||
Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}"
|
||||
Content="{x:Static resx:ResUI.menuClose}"
|
||||
DockPanel.Dock="Right"
|
||||
IsCancel="True"
|
||||
Style="{StaticResource DefButton}" />
|
||||
|
||||
<TextBlock
|
||||
x:Name="txtMsg"
|
||||
Margin="{StaticResource Margin8}"
|
||||
@@ -243,4 +252,4 @@
|
||||
</materialDesign:Card>
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
</reactiveui:ReactiveUserControl>
|
||||
</reactiveui:ReactiveUserControl>
|
||||
@@ -1,4 +1,4 @@
|
||||
<reactiveui:ReactiveUserControl
|
||||
<reactiveui:ReactiveUserControl
|
||||
x:Class="v2rayN.Views.CheckUpdateView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
@@ -39,6 +39,15 @@
|
||||
Content="{x:Static resx:ResUI.menuCheckUpdate}"
|
||||
IsDefault="True"
|
||||
Style="{StaticResource DefButton}" />
|
||||
|
||||
<Button
|
||||
Width="100"
|
||||
Margin="{StaticResource Margin8}"
|
||||
HorizontalAlignment="Right"
|
||||
Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}"
|
||||
Content="{x:Static resx:ResUI.menuClose}"
|
||||
IsCancel="True"
|
||||
Style="{StaticResource DefButton}" />
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel>
|
||||
@@ -90,4 +99,4 @@
|
||||
</ListView>
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
</reactiveui:ReactiveUserControl>
|
||||
</reactiveui:ReactiveUserControl>
|
||||
@@ -142,10 +142,7 @@
|
||||
<ListView.ContextMenu>
|
||||
<ContextMenu Style="{StaticResource DefContextMenu}">
|
||||
<MenuItem x:Name="menuProxiesDelaytestPart" Header="{x:Static resx:ResUI.menuProxiesDelaytestPart}" />
|
||||
<MenuItem
|
||||
x:Name="menuProxiesSelectActivity"
|
||||
Header="{x:Static resx:ResUI.menuProxiesSelectActivity}"
|
||||
InputGestureText="Enter" />
|
||||
<MenuItem x:Name="menuProxiesSelectActivity" Header="{x:Static resx:ResUI.menuProxiesSelectActivity}" />
|
||||
</ContextMenu>
|
||||
</ListView.ContextMenu>
|
||||
<ListView.ItemsPanel>
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
xmlns:view="clr-namespace:v2rayN.Views"
|
||||
xmlns:vms="clr-namespace:ServiceLib.ViewModels;assembly=ServiceLib"
|
||||
Title="v2rayN"
|
||||
Width="1200"
|
||||
Height="800"
|
||||
Width="900"
|
||||
Height="700"
|
||||
MinWidth="900"
|
||||
x:TypeArguments="vms:MainWindowViewModel"
|
||||
Icon="/Resources/v2rayN.ico"
|
||||
@@ -32,7 +32,6 @@
|
||||
|
||||
<materialDesign:DialogHost
|
||||
materialDesign:TransitionAssist.DisableTransitions="True"
|
||||
CloseOnClickAway="True"
|
||||
Identifier="RootDialog"
|
||||
SnackbarMessageQueue="{Binding ElementName=MainSnackbar, Path=MessageQueue}"
|
||||
Style="{StaticResource MaterialDesignEmbeddedDialogHost}">
|
||||
@@ -59,13 +58,11 @@
|
||||
<MenuItem
|
||||
x:Name="menuAddServerViaClipboard"
|
||||
Height="{StaticResource MenuItemHeight}"
|
||||
Header="{x:Static resx:ResUI.menuAddServerViaClipboard}"
|
||||
InputGestureText="Ctrl+V" />
|
||||
Header="{x:Static resx:ResUI.menuAddServerViaClipboard}" />
|
||||
<MenuItem
|
||||
x:Name="menuAddServerViaScan"
|
||||
Height="{StaticResource MenuItemHeight}"
|
||||
Header="{x:Static resx:ResUI.menuAddServerViaScan}"
|
||||
InputGestureText="Ctrl+S" />
|
||||
Header="{x:Static resx:ResUI.menuAddServerViaScan}" />
|
||||
<MenuItem
|
||||
x:Name="menuAddServerViaImage"
|
||||
Height="{StaticResource MenuItemHeight}"
|
||||
@@ -232,25 +229,6 @@
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
<Separator />
|
||||
<Menu Margin="0,1" Style="{StaticResource ToolbarMenu}">
|
||||
<MenuItem
|
||||
x:Name="menuHelp"
|
||||
Padding="{StaticResource MarginLeftRight8}"
|
||||
AutomationProperties.Name="{x:Static resx:ResUI.menuHelp}">
|
||||
<MenuItem.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<materialDesign:PackIcon
|
||||
Margin="{StaticResource MarginRight8}"
|
||||
VerticalAlignment="Center"
|
||||
Kind="HelpCircleOutline" />
|
||||
<TextBlock Text="{x:Static resx:ResUI.menuHelp}" />
|
||||
</StackPanel>
|
||||
</MenuItem.Header>
|
||||
<MenuItem x:Name="menuCheckUpdate" Header="{x:Static resx:ResUI.menuCheckUpdate}" />
|
||||
<Separator Margin="-40,5" />
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
<Separator />
|
||||
<Menu Margin="0,1" Style="{StaticResource ToolbarMenu}">
|
||||
<MenuItem
|
||||
x:Name="menuReload"
|
||||
@@ -268,6 +246,40 @@
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
<Separator />
|
||||
<Menu Margin="0,1" Style="{StaticResource ToolbarMenu}">
|
||||
<MenuItem
|
||||
Name="menuCheckUpdate"
|
||||
Padding="{StaticResource MarginLeftRight8}"
|
||||
AutomationProperties.Name="{x:Static resx:ResUI.menuCheckUpdate}">
|
||||
<MenuItem.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<materialDesign:PackIcon
|
||||
Margin="{StaticResource MarginRight8}"
|
||||
VerticalAlignment="Center"
|
||||
Kind="Update" />
|
||||
<TextBlock Text="{x:Static resx:ResUI.menuCheckUpdate}" />
|
||||
</StackPanel>
|
||||
</MenuItem.Header>
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
<Separator />
|
||||
<Menu Margin="0,1" Style="{StaticResource ToolbarMenu}">
|
||||
<MenuItem
|
||||
x:Name="menuHelp"
|
||||
Padding="{StaticResource MarginLeftRight8}"
|
||||
AutomationProperties.Name="{x:Static resx:ResUI.menuHelp}">
|
||||
<MenuItem.Header>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<materialDesign:PackIcon
|
||||
Margin="{StaticResource MarginRight8}"
|
||||
VerticalAlignment="Center"
|
||||
Kind="HelpCircleOutline" />
|
||||
<TextBlock Text="{x:Static resx:ResUI.menuHelp}" />
|
||||
</StackPanel>
|
||||
</MenuItem.Header>
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
<Separator />
|
||||
<Menu Margin="0,1" Style="{StaticResource ToolbarMenu}">
|
||||
<MenuItem
|
||||
x:Name="menuPromotion"
|
||||
|
||||
@@ -91,13 +91,11 @@
|
||||
<MenuItem
|
||||
x:Name="menuMsgViewSelectAll"
|
||||
Height="{StaticResource MenuItemHeight}"
|
||||
Header="{x:Static resx:ResUI.menuMsgViewSelectAll}"
|
||||
InputGestureText="Ctrl+A" />
|
||||
Header="{x:Static resx:ResUI.menuMsgViewSelectAll}" />
|
||||
<MenuItem
|
||||
x:Name="menuMsgViewCopy"
|
||||
Height="{StaticResource MenuItemHeight}"
|
||||
Header="{x:Static resx:ResUI.menuMsgViewCopy}"
|
||||
InputGestureText="Ctrl+C" />
|
||||
Header="{x:Static resx:ResUI.menuMsgViewCopy}" />
|
||||
<MenuItem
|
||||
x:Name="menuMsgViewCopyAll"
|
||||
Height="{StaticResource MenuItemHeight}"
|
||||
|
||||
@@ -123,13 +123,11 @@
|
||||
<MenuItem
|
||||
x:Name="menuSetDefaultServer"
|
||||
Height="{StaticResource MenuItemHeight}"
|
||||
Header="{x:Static resx:ResUI.menuSetDefaultServer}"
|
||||
InputGestureText="Enter" />
|
||||
Header="{x:Static resx:ResUI.menuSetDefaultServer}" />
|
||||
<MenuItem
|
||||
x:Name="menuEditServer"
|
||||
Height="{StaticResource MenuItemHeight}"
|
||||
Header="{x:Static resx:ResUI.menuEditServer}"
|
||||
InputGestureText="Ctrl+D" />
|
||||
Header="{x:Static resx:ResUI.menuEditServer}" />
|
||||
<MenuItem
|
||||
x:Name="menuCopyServer"
|
||||
Height="{StaticResource MenuItemHeight}"
|
||||
@@ -137,8 +135,7 @@
|
||||
<MenuItem
|
||||
x:Name="menuRemoveServer"
|
||||
Height="{StaticResource MenuItemHeight}"
|
||||
Header="{x:Static resx:ResUI.menuRemoveServer}"
|
||||
InputGestureText="Back" />
|
||||
Header="{x:Static resx:ResUI.menuRemoveServer}" />
|
||||
<MenuItem
|
||||
x:Name="menuRemoveDuplicateServer"
|
||||
Height="{StaticResource MenuItemHeight}"
|
||||
@@ -151,18 +148,15 @@
|
||||
<MenuItem
|
||||
x:Name="menuTcpingServer"
|
||||
Height="{StaticResource MenuItemHeight}"
|
||||
Header="{x:Static resx:ResUI.menuTcpingServer}"
|
||||
InputGestureText="Ctrl+O" />
|
||||
Header="{x:Static resx:ResUI.menuTcpingServer}" />
|
||||
<MenuItem
|
||||
x:Name="menuRealPingServer"
|
||||
Height="{StaticResource MenuItemHeight}"
|
||||
Header="{x:Static resx:ResUI.menuRealPingServer}"
|
||||
InputGestureText="Ctrl+R" />
|
||||
Header="{x:Static resx:ResUI.menuRealPingServer}" />
|
||||
<MenuItem
|
||||
x:Name="menuSpeedServer"
|
||||
Height="{StaticResource MenuItemHeight}"
|
||||
Header="{x:Static resx:ResUI.menuSpeedServer}"
|
||||
InputGestureText="Ctrl+T" />
|
||||
Header="{x:Static resx:ResUI.menuSpeedServer}" />
|
||||
<MenuItem
|
||||
x:Name="menuSortServerResult"
|
||||
Height="{StaticResource MenuItemHeight}"
|
||||
@@ -190,35 +184,29 @@
|
||||
<MenuItem
|
||||
x:Name="menuMoveTop"
|
||||
Height="{StaticResource MenuItemHeight}"
|
||||
Header="{x:Static resx:ResUI.menuMoveTop}"
|
||||
InputGestureText="T" />
|
||||
Header="{x:Static resx:ResUI.menuMoveTop}" />
|
||||
<MenuItem
|
||||
x:Name="menuMoveUp"
|
||||
Height="{StaticResource MenuItemHeight}"
|
||||
Header="{x:Static resx:ResUI.menuMoveUp}"
|
||||
InputGestureText="U" />
|
||||
Header="{x:Static resx:ResUI.menuMoveUp}" />
|
||||
<MenuItem
|
||||
x:Name="menuMoveDown"
|
||||
Height="{StaticResource MenuItemHeight}"
|
||||
Header="{x:Static resx:ResUI.menuMoveDown}"
|
||||
InputGestureText="D" />
|
||||
Header="{x:Static resx:ResUI.menuMoveDown}" />
|
||||
<MenuItem
|
||||
x:Name="menuMoveBottom"
|
||||
Height="{StaticResource MenuItemHeight}"
|
||||
Header="{x:Static resx:ResUI.menuMoveBottom}"
|
||||
InputGestureText="B" />
|
||||
Header="{x:Static resx:ResUI.menuMoveBottom}" />
|
||||
</MenuItem>
|
||||
<MenuItem
|
||||
x:Name="menuSelectAll"
|
||||
Height="{StaticResource MenuItemHeight}"
|
||||
Header="{x:Static resx:ResUI.menuSelectAll}"
|
||||
InputGestureText="Ctrl+A" />
|
||||
Header="{x:Static resx:ResUI.menuSelectAll}" />
|
||||
<Separator />
|
||||
<MenuItem
|
||||
x:Name="menuShareServer"
|
||||
Height="{StaticResource MenuItemHeight}"
|
||||
Header="{x:Static resx:ResUI.menuShareServer}"
|
||||
InputGestureText="Ctrl+F" />
|
||||
Header="{x:Static resx:ResUI.menuShareServer}" />
|
||||
<MenuItem Header="{x:Static resx:ResUI.menuExportConfig}">
|
||||
<MenuItem
|
||||
x:Name="menuExport2ClientConfig"
|
||||
@@ -232,8 +220,7 @@
|
||||
<MenuItem
|
||||
x:Name="menuExport2ShareUrl"
|
||||
Height="{StaticResource MenuItemHeight}"
|
||||
Header="{x:Static resx:ResUI.menuExport2ShareUrl}"
|
||||
InputGestureText="Ctrl+C" />
|
||||
Header="{x:Static resx:ResUI.menuExport2ShareUrl}" />
|
||||
<MenuItem
|
||||
x:Name="menuExport2ShareUrlBase64"
|
||||
Height="{StaticResource MenuItemHeight}"
|
||||
|
||||
@@ -292,37 +292,33 @@ public partial class ProfilesView
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (e.Key)
|
||||
if (e.Key is Key.Enter or Key.Return)
|
||||
{
|
||||
case Key.Enter:
|
||||
//case Key.Return:
|
||||
ViewModel?.SetDefaultServer();
|
||||
break;
|
||||
|
||||
case Key.Delete:
|
||||
case Key.Back:
|
||||
ViewModel?.RemoveServerAsync();
|
||||
break;
|
||||
|
||||
case Key.T:
|
||||
ViewModel?.MoveServer(EMove.Top);
|
||||
break;
|
||||
|
||||
case Key.U:
|
||||
ViewModel?.MoveServer(EMove.Up);
|
||||
break;
|
||||
|
||||
case Key.D:
|
||||
ViewModel?.MoveServer(EMove.Down);
|
||||
break;
|
||||
|
||||
case Key.B:
|
||||
ViewModel?.MoveServer(EMove.Bottom);
|
||||
break;
|
||||
|
||||
case Key.Escape:
|
||||
ViewModel?.ServerSpeedtestStop();
|
||||
break;
|
||||
ViewModel?.SetDefaultServer();
|
||||
}
|
||||
else if (e.Key == Key.Delete)
|
||||
{
|
||||
ViewModel?.RemoveServerAsync();
|
||||
}
|
||||
else if (e.Key == Key.T)
|
||||
{
|
||||
ViewModel?.MoveServer(EMove.Top);
|
||||
}
|
||||
else if (e.Key == Key.U)
|
||||
{
|
||||
ViewModel?.MoveServer(EMove.Up);
|
||||
}
|
||||
else if (e.Key == Key.D)
|
||||
{
|
||||
ViewModel?.MoveServer(EMove.Down);
|
||||
}
|
||||
else if (e.Key == Key.B)
|
||||
{
|
||||
ViewModel?.MoveServer(EMove.Bottom);
|
||||
}
|
||||
else if (e.Key == Key.Escape)
|
||||
{
|
||||
ViewModel?.ServerSpeedtestStop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,18 @@
|
||||
<sys:Double x:Key="QrcodeWidth">400</sys:Double>
|
||||
</UserControl.Resources>
|
||||
|
||||
<StackPanel Margin="{StaticResource Margin8}">
|
||||
<DockPanel Margin="{StaticResource Margin8}">
|
||||
<StackPanel Margin="{StaticResource Margin8}" DockPanel.Dock="Bottom">
|
||||
<Button
|
||||
Width="100"
|
||||
HorizontalAlignment="Right"
|
||||
Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}"
|
||||
Content="{x:Static resx:ResUI.menuClose}"
|
||||
IsCancel="True"
|
||||
IsDefault="True"
|
||||
Style="{StaticResource DefButton}" />
|
||||
</StackPanel>
|
||||
|
||||
<Grid Margin="{StaticResource Margin8}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
@@ -40,5 +51,5 @@
|
||||
TextWrapping="Wrap"
|
||||
VerticalScrollBarVisibility="Auto" />
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
</UserControl>
|
||||
|
||||
@@ -263,13 +263,11 @@
|
||||
<MenuItem
|
||||
x:Name="menuRuleRemove"
|
||||
Height="{StaticResource MenuItemHeight}"
|
||||
Header="{x:Static resx:ResUI.menuRuleRemove}"
|
||||
InputGestureText="Back" />
|
||||
Header="{x:Static resx:ResUI.menuRuleRemove}" />
|
||||
<MenuItem
|
||||
x:Name="menuRuleSelectAll"
|
||||
Height="{StaticResource MenuItemHeight}"
|
||||
Header="{x:Static resx:ResUI.menuSelectAll}"
|
||||
InputGestureText="Ctrl+A" />
|
||||
Header="{x:Static resx:ResUI.menuSelectAll}" />
|
||||
<MenuItem
|
||||
x:Name="menuRuleExportSelected"
|
||||
Height="{StaticResource MenuItemHeight}"
|
||||
@@ -278,23 +276,19 @@
|
||||
<MenuItem
|
||||
x:Name="menuMoveTop"
|
||||
Height="{StaticResource MenuItemHeight}"
|
||||
Header="{x:Static resx:ResUI.menuMoveTop}"
|
||||
InputGestureText="T" />
|
||||
Header="{x:Static resx:ResUI.menuMoveTop}" />
|
||||
<MenuItem
|
||||
x:Name="menuMoveUp"
|
||||
Height="{StaticResource MenuItemHeight}"
|
||||
Header="{x:Static resx:ResUI.menuMoveUp}"
|
||||
InputGestureText="U" />
|
||||
Header="{x:Static resx:ResUI.menuMoveUp}" />
|
||||
<MenuItem
|
||||
x:Name="menuMoveDown"
|
||||
Height="{StaticResource MenuItemHeight}"
|
||||
Header="{x:Static resx:ResUI.menuMoveDown}"
|
||||
InputGestureText="D" />
|
||||
Header="{x:Static resx:ResUI.menuMoveDown}" />
|
||||
<MenuItem
|
||||
x:Name="menuMoveBottom"
|
||||
Height="{StaticResource MenuItemHeight}"
|
||||
Header="{x:Static resx:ResUI.menuMoveBottom}"
|
||||
InputGestureText="B" />
|
||||
Header="{x:Static resx:ResUI.menuMoveBottom}" />
|
||||
</ContextMenu>
|
||||
</DataGrid.ContextMenu>
|
||||
<DataGrid.Columns>
|
||||
|
||||
@@ -140,28 +140,25 @@ public partial class RoutingRuleSettingWindow
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (e.Key)
|
||||
if (e.Key == Key.T)
|
||||
{
|
||||
case Key.T:
|
||||
ViewModel?.MoveRule(EMove.Top);
|
||||
break;
|
||||
|
||||
case Key.U:
|
||||
ViewModel?.MoveRule(EMove.Up);
|
||||
break;
|
||||
|
||||
case Key.D:
|
||||
ViewModel?.MoveRule(EMove.Down);
|
||||
break;
|
||||
|
||||
case Key.B:
|
||||
ViewModel?.MoveRule(EMove.Bottom);
|
||||
break;
|
||||
|
||||
case Key.Delete:
|
||||
case Key.Back:
|
||||
ViewModel?.RuleRemoveAsync();
|
||||
break;
|
||||
ViewModel?.MoveRule(EMove.Top);
|
||||
}
|
||||
else if (e.Key == Key.U)
|
||||
{
|
||||
ViewModel?.MoveRule(EMove.Up);
|
||||
}
|
||||
else if (e.Key == Key.D)
|
||||
{
|
||||
ViewModel?.MoveRule(EMove.Down);
|
||||
}
|
||||
else if (e.Key == Key.B)
|
||||
{
|
||||
ViewModel?.MoveRule(EMove.Bottom);
|
||||
}
|
||||
else if (e.Key == Key.Delete)
|
||||
{
|
||||
ViewModel?.RuleRemoveAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -144,18 +144,15 @@
|
||||
<MenuItem
|
||||
x:Name="menuRoutingAdvancedRemove"
|
||||
Height="{StaticResource MenuItemHeight}"
|
||||
Header="{x:Static resx:ResUI.menuRoutingAdvancedRemove}"
|
||||
InputGestureText="Back" />
|
||||
Header="{x:Static resx:ResUI.menuRoutingAdvancedRemove}" />
|
||||
<MenuItem
|
||||
x:Name="menuRoutingAdvancedSelectAll"
|
||||
Height="{StaticResource MenuItemHeight}"
|
||||
Header="{x:Static resx:ResUI.menuSelectAll}"
|
||||
InputGestureText="Ctrl+A" />
|
||||
Header="{x:Static resx:ResUI.menuSelectAll}" />
|
||||
<MenuItem
|
||||
x:Name="menuRoutingAdvancedSetDefault"
|
||||
Height="{StaticResource MenuItemHeight}"
|
||||
Header="{x:Static resx:ResUI.menuRoutingAdvancedSetDefault}"
|
||||
InputGestureText="Enter" />
|
||||
Header="{x:Static resx:ResUI.menuRoutingAdvancedSetDefault}" />
|
||||
<Separator />
|
||||
<MenuItem
|
||||
x:Name="menuRoutingAdvancedImportRules"
|
||||
|
||||
@@ -78,27 +78,18 @@ public partial class RoutingSettingWindow
|
||||
{
|
||||
if (Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl))
|
||||
{
|
||||
switch (e.Key)
|
||||
if (e.Key == Key.A)
|
||||
{
|
||||
case Key.A:
|
||||
lstRoutings.SelectAll();
|
||||
break;
|
||||
lstRoutings.SelectAll();
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (e.Key is Key.Enter or Key.Return)
|
||||
{
|
||||
switch (e.Key)
|
||||
{
|
||||
case Key.Enter:
|
||||
//case Key.Return:
|
||||
ViewModel?.RoutingAdvancedSetDefault();
|
||||
break;
|
||||
|
||||
case Key.Delete:
|
||||
case Key.Back:
|
||||
ViewModel?.RoutingAdvancedRemoveAsync();
|
||||
break;
|
||||
}
|
||||
ViewModel?.RoutingAdvancedSetDefault();
|
||||
}
|
||||
else if (e.Key == Key.Delete)
|
||||
{
|
||||
ViewModel?.RoutingAdvancedRemoveAsync();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
mc:Ignorable="d">
|
||||
<materialDesign:DialogHost
|
||||
materialDesign:TransitionAssist.DisableTransitions="True"
|
||||
CloseOnClickAway="True"
|
||||
Identifier="SubDialog"
|
||||
Style="{StaticResource MaterialDesignEmbeddedDialogHost}">
|
||||
<DockPanel>
|
||||
|
||||
@@ -13,7 +13,7 @@ public partial class ThemeSettingView
|
||||
ViewModel = new ThemeSettingViewModel();
|
||||
|
||||
cmbCurrentTheme.ItemsSource = Utils.GetEnumNames<ETheme>().Take(3).ToList();
|
||||
cmbCurrentFontSize.ItemsSource = Enumerable.Range(Global.MinFontSize, Global.MinFontSizeCount).ToList();
|
||||
cmbCurrentFontSize.ItemsSource = Enumerable.Range(Global.MinFontSize, 11).ToList();
|
||||
cmbCurrentLanguage.ItemsSource = Global.Languages;
|
||||
|
||||
this.WhenActivated(disposables =>
|
||||
|
||||
Reference in New Issue
Block a user