Compare commits
113 Commits
61ab0ea225
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
| a7df3a44a2 | |||
| 7956349c0a | |||
| 8ccfc6d272 | |||
| f526122f33 | |||
| b86d645acf | |||
| ef1f3bfb50 | |||
| 33917e774d | |||
| 78c20f9ae9 | |||
| 610eb4f20d | |||
| 8cc88be5f6 | |||
| 50f4237c74 | |||
| deac0adabd | |||
| 4f9d405c9f | |||
| 88091e84c0 | |||
| fafad1ff97 | |||
| fbcf5f7e61 | |||
| b21d189ca1 | |||
| 701acd561a | |||
| 3b419d1e24 | |||
| e3b9fea5b2 | |||
| 54dd4cbd35 | |||
| 77b721df4b | |||
| 8937024241 | |||
| 29c6e40940 | |||
| f75b109025 | |||
| eb4db67fa1 | |||
| 62d3157665 | |||
| 577327c40a | |||
| fed0b0e422 | |||
| ad5d0c9b7a | |||
| 9873f670fa | |||
| 8b8d29dd00 | |||
| 477d4086b2 | |||
| 7fc2a60e18 | |||
| 41e6ed433a | |||
| 8b055d9ee1 | |||
| 0808e2db10 | |||
| dcc9ad43fe | |||
| b47e0e984e | |||
| 51ed02de1a | |||
| e0b1cec87d | |||
| a9db68c29b | |||
| db7a776d2b | |||
| bfa3ec48d6 | |||
| ca74f9289e | |||
| f9ea310031 | |||
| 5d849c3b98 | |||
| b7be97f6c1 | |||
| 7212fd3132 | |||
| 067a715afe | |||
| ce969a6ad4 | |||
| cea406f660 | |||
| a09245cb3e | |||
| bbc1c03cca | |||
| b3935f8516 | |||
| 14b95b07b4 | |||
| 0e1c043e34 | |||
| cc5a732fa5 | |||
| 0e9d1bc157 | |||
| 6dfad4544d | |||
| 2eaa15cc8f | |||
| 5c1449155e | |||
| cc8744a188 | |||
| f72ffa6443 | |||
| 5e84fea7d0 | |||
| dce32e706b | |||
| 7e19e2cdb8 | |||
| 0e062a275a | |||
| 4cc3f98b0f | |||
| a6527d822b | |||
| aac7d84602 | |||
| f738ba9245 | |||
| 89e02cc707 | |||
| d1e45f0254 | |||
| dbf6175ad9 | |||
| 251564a5de | |||
| ef8bba71d5 | |||
| 961c655a92 | |||
| 4389770821 | |||
| 7c9b23edbd | |||
| 90fd476c45 | |||
| 7cd360e61e | |||
| 6e189671c7 | |||
| 4fbdb331d4 | |||
| 6131a80b2c | |||
| 33f45aa4a5 | |||
| 4dbcaff187 | |||
| 9e05a17fc4 | |||
| 1a9f0d79ac | |||
| c7b77c1ad8 | |||
| 7cd022093b | |||
| 7a223d614b | |||
| 0ec2f72a93 | |||
| 1a1c692ae0 | |||
| dee7f0a591 | |||
| b8d0417d0f | |||
| f1e8e7f530 | |||
| 75c7d31da1 | |||
| 17b3f6b92d | |||
| cf297caf09 | |||
| 2b80fcba0d | |||
| 4c5763647d | |||
| b3ee1cc6dc | |||
| b7a78aa76a | |||
| 18ec3e36fc | |||
| 8b982d1ba8 | |||
| f71575ee91 | |||
| 3f838d224c | |||
| 9ef53abad5 | |||
| f379a8ee8f | |||
| 54b0cc44ff | |||
| 765b45c0fc | |||
| 1e7175edf5 |
@@ -0,0 +1,434 @@
|
|||||||
|
name: Build Windows
|
||||||
|
run-name: 构建Win流程
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- dev
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
- dev
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# 先编译 libcore
|
||||||
|
build-libcore:
|
||||||
|
name: 编译 libcore (Windows)
|
||||||
|
runs-on: client-server
|
||||||
|
container:
|
||||||
|
image: node:20
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
# 只有node支持版本号别名
|
||||||
|
node: ['20.15.1']
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: 📥 Checkout 代码
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: 🔧 设置 Go 环境
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
with:
|
||||||
|
go-version: '1.23'
|
||||||
|
cache: true
|
||||||
|
cache-dependency-path: libcore/go.sum
|
||||||
|
|
||||||
|
- name: 🔧 安装 MinGW
|
||||||
|
run: |
|
||||||
|
# 在 GitHub 托管 runner(有 sudo)与 act/自托管容器(无 sudo)均可运行
|
||||||
|
if command -v sudo >/dev/null 2>&1; then
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y mingw-w64
|
||||||
|
else
|
||||||
|
echo "sudo 不存在,按 root 用户直接执行 apt-get"
|
||||||
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
|
apt-get update || apt update
|
||||||
|
apt-get install -y mingw-w64 || apt install -y mingw-w64
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: 📦 编译 libcore.dll
|
||||||
|
working-directory: libcore
|
||||||
|
run: |
|
||||||
|
echo "🚀 开始编译 Windows libcore..."
|
||||||
|
make windows-amd64
|
||||||
|
|
||||||
|
if [ -f "bin/libcore.dll" ] && [ -f "bin/HiddifyCli.exe" ]; then
|
||||||
|
echo "✅ Windows libcore 编译成功"
|
||||||
|
ls -lh bin/
|
||||||
|
else
|
||||||
|
echo "❌ Windows libcore 编译失败"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: 📤 上传 Windows libcore
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: libcore-windows
|
||||||
|
path: |
|
||||||
|
libcore/bin/libcore.dll
|
||||||
|
libcore/bin/HiddifyCli.exe
|
||||||
|
libcore/bin/webui/**
|
||||||
|
retention-days: 7
|
||||||
|
|
||||||
|
|
||||||
|
# 构建 Windows 应用
|
||||||
|
build:
|
||||||
|
runs-on: windows-latest
|
||||||
|
needs: build-libcore
|
||||||
|
steps:
|
||||||
|
- name: 🔧 Add Git to PATH (Windows)
|
||||||
|
if: ${{ runner.os == 'Windows' }}
|
||||||
|
shell: powershell
|
||||||
|
run: |
|
||||||
|
$paths = @(
|
||||||
|
'C:\Program Files\Git\cmd',
|
||||||
|
'C:\Program Files\Git\bin',
|
||||||
|
'C:\Program Files (x86)\Git\cmd',
|
||||||
|
'C:\Program Files (x86)\Git\bin'
|
||||||
|
)
|
||||||
|
foreach ($p in $paths) {
|
||||||
|
if (Test-Path $p) {
|
||||||
|
Add-Content -Path $env:GITHUB_PATH -Value $p
|
||||||
|
$env:PATH = "$p;$env:PATH"
|
||||||
|
Write-Host ("Added to PATH: {0}" -f $p)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$candidates = @(
|
||||||
|
'C:\Program Files\Git\cmd\git.exe',
|
||||||
|
'C:\Program Files\Git\bin\git.exe',
|
||||||
|
'C:\Program Files (x86)\Git\cmd\git.exe',
|
||||||
|
'C:\Program Files (x86)\Git\bin\git.exe'
|
||||||
|
)
|
||||||
|
$found = $false
|
||||||
|
foreach ($g in $candidates) {
|
||||||
|
if (Test-Path $g) {
|
||||||
|
& $g --version
|
||||||
|
$found = $true
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (-not $found) {
|
||||||
|
Write-Host "Git executable not found in common locations; continuing."
|
||||||
|
}
|
||||||
|
|
||||||
|
- name: 📥 Checkout 代码
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: 📥 下载 libcore
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: libcore-windows
|
||||||
|
path: .
|
||||||
|
|
||||||
|
- name: 🔧 复制 libcore 文件到正确位置并重命名
|
||||||
|
shell: cmd
|
||||||
|
run: call copy_libcore.bat
|
||||||
|
|
||||||
|
- name: 🔍 Verify jq Installation (ACT)
|
||||||
|
shell: powershell
|
||||||
|
run: |
|
||||||
|
# Check if jq is available
|
||||||
|
$jqFound = $false
|
||||||
|
try {
|
||||||
|
$version = jq --version 2>&1
|
||||||
|
if ($version -match 'jq-[\d\.]+') {
|
||||||
|
Write-Host "jq is already installed: $version"
|
||||||
|
$jqFound = $true
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
Write-Host "jq not installed or not in PATH"
|
||||||
|
}
|
||||||
|
if (-not $jqFound) {
|
||||||
|
Write-Host "Preparing to install jq..."
|
||||||
|
# Check if Chocolatey is available
|
||||||
|
$chocoFound = $false
|
||||||
|
try {
|
||||||
|
choco --version 2>&1 | Out-Null
|
||||||
|
$chocoFound = $true
|
||||||
|
} catch {}
|
||||||
|
if (-not $chocoFound) {
|
||||||
|
Write-Host "Installing Chocolatey..."
|
||||||
|
Set-ExecutionPolicy Bypass -Scope Process -Force
|
||||||
|
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
|
||||||
|
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
|
||||||
|
# Refresh PATH
|
||||||
|
$env:PATH = [System.Environment]::GetEnvironmentVariable('PATH', 'Machine') + ';' + [System.Environment]::GetEnvironmentVariable('PATH', 'User')
|
||||||
|
Write-Host "Chocolatey installed successfully"
|
||||||
|
}
|
||||||
|
Write-Host "Installing jq using Chocolatey..."
|
||||||
|
choco install jq -y
|
||||||
|
if ($LASTEXITCODE -eq 0) {
|
||||||
|
Write-Host "jq installed successfully"
|
||||||
|
# Verify again
|
||||||
|
$version = jq --version 2>&1
|
||||||
|
Write-Host "jq version: $version"
|
||||||
|
} else {
|
||||||
|
Write-Host "jq installation failed, exit code: $LASTEXITCODE"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- name: Add jq to PATH
|
||||||
|
shell: powershell
|
||||||
|
run: |
|
||||||
|
$jqPath = "C:\ProgramData\chocolatey\bin"
|
||||||
|
if (Test-Path $jqPath) {
|
||||||
|
Add-Content -Path $env:GITHUB_PATH -Value $jqPath
|
||||||
|
$env:PATH = "$jqPath;$env:PATH"
|
||||||
|
Write-Host "Added jq path to GITHUB_PATH and current PATH"
|
||||||
|
} else {
|
||||||
|
Write-Host "jq installation path not found"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
- name: Add Flutter to PATH
|
||||||
|
shell: powershell
|
||||||
|
run: |
|
||||||
|
# Add Flutter to PATH for current session and GitHub Actions
|
||||||
|
$flutterPath = "C:\flutter\bin"
|
||||||
|
if (Test-Path $flutterPath) {
|
||||||
|
Write-Host "Adding Flutter to PATH: $flutterPath"
|
||||||
|
$env:PATH = "$flutterPath;$env:PATH"
|
||||||
|
Add-Content -Path $env:GITHUB_PATH -Value $flutterPath
|
||||||
|
|
||||||
|
# Verify Flutter is accessible
|
||||||
|
$flutterVersion = flutter --version 2>&1
|
||||||
|
if ($LASTEXITCODE -eq 0) {
|
||||||
|
Write-Host "Flutter verified: $flutterVersion"
|
||||||
|
} else {
|
||||||
|
Write-Host "Flutter not found at $flutterPath"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Write-Host "ERROR: Flutter not found at C:\flutter\bin"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
- name: Enable Windows desktop
|
||||||
|
shell: powershell
|
||||||
|
run: |
|
||||||
|
$env:PATH = "C:\flutter\bin;$env:PATH"
|
||||||
|
flutter config --enable-windows-desktop
|
||||||
|
|
||||||
|
- name: Get dependencies
|
||||||
|
shell: powershell
|
||||||
|
run: |
|
||||||
|
$env:PATH = "C:\flutter\bin;$env:PATH"
|
||||||
|
flutter pub get
|
||||||
|
|
||||||
|
- name: Generate code
|
||||||
|
shell: powershell
|
||||||
|
run: |
|
||||||
|
$env:PATH = "C:\flutter\bin;$env:PATH"
|
||||||
|
dart run build_runner build --delete-conflicting-outputs
|
||||||
|
|
||||||
|
- name: Install NuGet
|
||||||
|
shell: powershell
|
||||||
|
run: |
|
||||||
|
Write-Host "Installing NuGet..."
|
||||||
|
|
||||||
|
# Check if NuGet is already available
|
||||||
|
$nugetPath = Get-Command nuget -ErrorAction SilentlyContinue
|
||||||
|
if ($nugetPath) {
|
||||||
|
Write-Host "NuGet already installed: $($nugetPath.Source)"
|
||||||
|
$nugetVersion = nuget help | Select-String -Pattern "NuGet Version" | Select-Object -First 1
|
||||||
|
Write-Host "NuGet version: $nugetVersion"
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
# Use Chocolatey to install NuGet (proven to work)
|
||||||
|
Write-Host "Installing NuGet via Chocolatey..."
|
||||||
|
choco install nuget.commandline -y
|
||||||
|
|
||||||
|
# Update PATH to include Chocolatey
|
||||||
|
$env:PATH = "C:\ProgramData\chocolatey\bin;$env:PATH"
|
||||||
|
Add-Content -Path $env:GITHUB_PATH -Value "C:\ProgramData\chocolatey\bin"
|
||||||
|
|
||||||
|
# Verify installation
|
||||||
|
if (Get-Command nuget -ErrorAction SilentlyContinue) {
|
||||||
|
Write-Host "NuGet installed successfully via Chocolatey"
|
||||||
|
$nugetVersion = nuget help | Select-String -Pattern "NuGet Version" | Select-Object -First 1
|
||||||
|
Write-Host "NuGet version: $nugetVersion"
|
||||||
|
} else {
|
||||||
|
Write-Host "WARNING: NuGet installation may have failed, but continuing..."
|
||||||
|
}
|
||||||
|
|
||||||
|
- name: Fix long paths
|
||||||
|
shell: powershell
|
||||||
|
run: |
|
||||||
|
Write-Host "Enabling long path support..."
|
||||||
|
|
||||||
|
# Enable long paths in Windows
|
||||||
|
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -Type DWORD -Force
|
||||||
|
|
||||||
|
# Also set for current user
|
||||||
|
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\AppModel\StateRepository\Cache\Package\Data\" -Name "LongPathsEnabled" -Value 1 -Type DWORD -Force -ErrorAction SilentlyContinue
|
||||||
|
|
||||||
|
Write-Host "Long path support enabled"
|
||||||
|
|
||||||
|
- name: Clean build cache
|
||||||
|
shell: powershell
|
||||||
|
run: |
|
||||||
|
$env:PATH = "C:\flutter\bin;$env:PATH"
|
||||||
|
Write-Host "Cleaning build cache..."
|
||||||
|
flutter clean
|
||||||
|
|
||||||
|
Write-Host "Removing old build directories..."
|
||||||
|
if (Test-Path "build") {
|
||||||
|
Remove-Item -Path "build" -Recurse -Force
|
||||||
|
}
|
||||||
|
if (Test-Path "windows") {
|
||||||
|
Remove-Item -Path "windows" -Recurse -Force
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "Recreating Windows project..."
|
||||||
|
flutter create --platforms=windows .
|
||||||
|
|
||||||
|
- name: Build Windows Debug
|
||||||
|
shell: powershell
|
||||||
|
run: |
|
||||||
|
$env:PATH = "C:\flutter\bin;C:\ProgramData\chocolatey\bin;$env:PATH"
|
||||||
|
flutter build windows
|
||||||
|
|
||||||
|
- name: Build Windows Release
|
||||||
|
shell: powershell
|
||||||
|
run: |
|
||||||
|
$env:PATH = "C:\flutter\bin;C:\ProgramData\chocolatey\bin;$env:PATH"
|
||||||
|
flutter build windows --release
|
||||||
|
|
||||||
|
- name: Upload Debug build artifacts
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: windows-debug-build
|
||||||
|
path: build/windows/x64/runner/Debug/
|
||||||
|
|
||||||
|
- name: Upload Release build artifacts
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: windows-release-build
|
||||||
|
path: build/windows/x64/runner/Release/
|
||||||
|
|
||||||
|
- name: Install Build Tools
|
||||||
|
shell: powershell
|
||||||
|
run: |
|
||||||
|
choco install 7zip -y
|
||||||
|
choco install enigma-virtual-box -y
|
||||||
|
|
||||||
|
- name: Package Single EXE
|
||||||
|
shell: powershell
|
||||||
|
run: |
|
||||||
|
Write-Host "=== 开始打包单文件 EXE ==="
|
||||||
|
|
||||||
|
$buildPath = "build\windows\x64\runner\Release"
|
||||||
|
$outputPath = "dist"
|
||||||
|
$enigmaPath = "C:\Program Files\Enigma Virtual Box\enigmavb.exe"
|
||||||
|
|
||||||
|
# 创建输出目录
|
||||||
|
if (-not (Test-Path $outputPath)) {
|
||||||
|
New-Item -ItemType Directory -Path $outputPath -Force | Out-Null
|
||||||
|
}
|
||||||
|
|
||||||
|
# 获取主程序
|
||||||
|
$exeFile = Get-ChildItem -Path $buildPath -Filter "*.exe" | Select-Object -First 1
|
||||||
|
if (-not $exeFile) {
|
||||||
|
Write-Host "❌ 未找到可执行文件"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
$inputExe = $exeFile.FullName
|
||||||
|
$outputExe = "$outputPath\$($exeFile.BaseName)_Single.exe"
|
||||||
|
|
||||||
|
Write-Host "主程序: $inputExe"
|
||||||
|
Write-Host "输出: $outputExe"
|
||||||
|
|
||||||
|
# 尝试使用 Enigma Virtual Box
|
||||||
|
if (Test-Path $enigmaPath) {
|
||||||
|
Write-Host "使用 Enigma Virtual Box 打包..."
|
||||||
|
|
||||||
|
# 创建配置文件
|
||||||
|
$configContent = "[Config]`nInputFile=$inputExe`nOutputFile=$outputExe`nFiles=%DEFAULT FOLDER%`nVirtualizationMode=Never Write To Disk`nCompression=Yes`nShareVirtualSystem=Yes`n`n[Files]`nFolder=$buildPath\*"
|
||||||
|
|
||||||
|
$configFile = "$outputPath\package_config.evb"
|
||||||
|
Set-Content -Path $configFile -Value $configContent
|
||||||
|
|
||||||
|
# 执行打包
|
||||||
|
$process = Start-Process -FilePath $enigmaPath -ArgumentList "/sf", $inputExe, "/lf", $outputExe, "/folder", $buildPath, "/compress" -Wait -PassThru -NoNewWindow
|
||||||
|
|
||||||
|
if ($process.ExitCode -eq 0) {
|
||||||
|
Write-Host "✅ 单文件打包成功!"
|
||||||
|
|
||||||
|
# 显示压缩信息
|
||||||
|
$originalSize = (Get-Item $inputExe).Length / 1MB
|
||||||
|
$packedSize = (Get-Item $outputExe).Length / 1MB
|
||||||
|
Write-Host "原始大小: $([math]::Round($originalSize, 2)) MB"
|
||||||
|
Write-Host "打包大小: $([math]::Round($packedSize, 2)) MB"
|
||||||
|
} else {
|
||||||
|
Write-Host "⚠️ Enigma 打包失败,使用备选方案"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Write-Host "⚠️ Enigma 未找到,使用 7-Zip 自解压方案"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
- name: Package with 7-Zip Alternative
|
||||||
|
if: failure()
|
||||||
|
shell: powershell
|
||||||
|
run: |
|
||||||
|
Write-Host "使用 7-Zip 自解压方案..."
|
||||||
|
|
||||||
|
$buildPath = "build\windows\x64\runner\Release"
|
||||||
|
$outputPath = "dist"
|
||||||
|
|
||||||
|
# 检查 7-Zip
|
||||||
|
$7zipPath = "C:\Program Files\7-Zip\7z.exe"
|
||||||
|
|
||||||
|
# 获取主程序名称
|
||||||
|
$exeFile = Get-ChildItem -Path $buildPath -Filter "*.exe" | Select-Object -First 1
|
||||||
|
$outputSfx = "$outputPath\$($exeFile.BaseName)_Package.exe"
|
||||||
|
|
||||||
|
Write-Host "创建自解压包..."
|
||||||
|
|
||||||
|
# 创建配置文件
|
||||||
|
$configContent = @"
|
||||||
|
;!@Install@!UTF-8!
|
||||||
|
Title="HostExecutor Windows Package"
|
||||||
|
BeginPrompt="正在解压 HostExecutor..."
|
||||||
|
ExtractDialogText="请稍候,正在解压文件..."
|
||||||
|
ExtractPathText="解压路径:"
|
||||||
|
ExtractTitle="解压中"
|
||||||
|
FinishMessage="解压完成!"
|
||||||
|
GUIFlags="8"
|
||||||
|
;!@InstallEnd@!
|
||||||
|
"@
|
||||||
|
|
||||||
|
$configFile = "$outputPath\config.txt"
|
||||||
|
Set-Content -Path $configFile -Value $configContent -Encoding UTF8
|
||||||
|
|
||||||
|
# 创建压缩包
|
||||||
|
& $7zipPath a -sfx7z.sfx -r "$outputSfx" "$buildPath\*" -scsUTF-8 -y
|
||||||
|
Copy-Item "$configFile" -Destination "$outputSfx" -Force
|
||||||
|
|
||||||
|
if (Test-Path $outputSfx) {
|
||||||
|
Write-Host "✅ 7-Zip 自解压包创建成功!"
|
||||||
|
Write-Host "输出文件: $outputSfx"
|
||||||
|
|
||||||
|
$size = (Get-Item $outputSfx).Length / 1MB
|
||||||
|
Write-Host "文件大小: $([math]::Round($size, 2)) MB"
|
||||||
|
} else {
|
||||||
|
Write-Host "❌ 7-Zip 打包失败"
|
||||||
|
}
|
||||||
|
|
||||||
|
- name: Upload Single EXE Package
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: windows-single-exe
|
||||||
|
path: dist/*.exe
|
||||||
|
if: always()
|
||||||
@@ -1,311 +0,0 @@
|
|||||||
# 📖 GitHub Actions 构建完全指南
|
|
||||||
|
|
||||||
## 🎯 功能概述
|
|
||||||
|
|
||||||
本 workflow 支持:
|
|
||||||
|
|
||||||
✅ **自动编译 libcore.aar** - sing-box 核心库
|
|
||||||
✅ **Release 构建** - 默认生成正式版 APK
|
|
||||||
✅ **可配置 API 域名** - 支持自定义后端域名
|
|
||||||
✅ **可配置 OSS 地址** - 支持自定义配置文件 CDN
|
|
||||||
✅ **分架构打包** - 生成 arm64-v8a / armeabi-v7a / x86_64 版本
|
|
||||||
✅ **自动创建 Release** - 推送标签自动发布
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🚀 使用方法
|
|
||||||
|
|
||||||
### 方法一:手动触发(推荐,支持自定义配置)
|
|
||||||
|
|
||||||
1. **打开 Actions 页面**
|
|
||||||
- 进入 GitHub 仓库
|
|
||||||
- 点击顶部 **Actions** 标签
|
|
||||||
|
|
||||||
2. **选择 Workflow**
|
|
||||||
- 左侧选择 **Build Android APK**
|
|
||||||
- 右侧点击 **Run workflow** 下拉框
|
|
||||||
|
|
||||||
3. **配置参数**
|
|
||||||
|
|
||||||
| 参数 | 说明 | 默认值 |
|
|
||||||
|-----|------|--------|
|
|
||||||
| **构建类型** | debug 或 release | `release` |
|
|
||||||
| **API 域名** | 后端 API 服务器域名 | `api.maodag.top` |
|
|
||||||
| **OSS 地址 1** | 配置文件 CDN 地址(香港) | `https://ppp2.oss-cn-hongkong.aliyuncs.com/bear1.txt` |
|
|
||||||
| **OSS 地址 2** | 配置文件 CDN 地址(东京) | `https://xgp3.oss-ap-northeast-1.aliyuncs.com/bear1.txt` |
|
|
||||||
| **OSS 地址 3** | 配置文件 CDN 地址(首尔) | `https://xpp4.oss-ap-northeast-2.aliyuncs.com/bear1.txt` |
|
|
||||||
| **OSS 地址 4** | 配置文件 CDN 地址(新加坡) | `https://xpp5.oss-ap-southeast-1.aliyuncs.com/bear1.txt` |
|
|
||||||
|
|
||||||
4. **开始构建**
|
|
||||||
- 点击绿色 **Run workflow** 按钮
|
|
||||||
- 等待约 30 分钟完成
|
|
||||||
|
|
||||||
5. **下载 APK**
|
|
||||||
- 构建完成后,在运行记录页面找到 **Artifacts** 区域
|
|
||||||
- 下载对应架构的 APK
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 方法二:推送代码自动构建(使用默认配置)
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# 提交代码
|
|
||||||
git add .
|
|
||||||
git commit -m "feat: 新功能"
|
|
||||||
|
|
||||||
# 推送到 main 分支
|
|
||||||
git push origin main
|
|
||||||
```
|
|
||||||
|
|
||||||
**注意:** 自动触发的构建使用默认配置(`api.maodag.top` 和默认 OSS 地址)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 方法三:创建 Release 版本
|
|
||||||
|
|
||||||
```bash
|
|
||||||
# 1. 打标签(必须以 v 开头)
|
|
||||||
git tag v1.0.0
|
|
||||||
|
|
||||||
# 2. 推送标签
|
|
||||||
git push origin v1.0.0
|
|
||||||
|
|
||||||
# 3. 自动触发构建并创建 Release
|
|
||||||
# 访问 https://github.com/你的用户名/LighthouseApp/releases 查看
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📦 构建产物
|
|
||||||
|
|
||||||
### APK 命名规则
|
|
||||||
|
|
||||||
```
|
|
||||||
BearVPN-{架构}-{类型}-{日期}-{提交哈希}.apk
|
|
||||||
```
|
|
||||||
|
|
||||||
**示例:**
|
|
||||||
```
|
|
||||||
BearVPN-arm64-v8a-release-20251027-abc1234.apk
|
|
||||||
BearVPN-armeabi-v7a-release-20251027-abc1234.apk
|
|
||||||
BearVPN-x86_64-release-20251027-abc1234.apk
|
|
||||||
```
|
|
||||||
|
|
||||||
### 架构说明
|
|
||||||
|
|
||||||
| 架构 | 适用设备 | 推荐度 |
|
|
||||||
|------|---------|-------|
|
|
||||||
| **arm64-v8a** | 2017年后的现代手机 | ⭐⭐⭐⭐⭐ |
|
|
||||||
| **armeabi-v7a** | 2012-2017年的老旧手机 | ⭐⭐ |
|
|
||||||
| **x86_64** | Android 模拟器 | ⭐⭐⭐ |
|
|
||||||
|
|
||||||
**大多数用户应下载 `arm64-v8a` 版本**
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🔧 配置示例
|
|
||||||
|
|
||||||
### 示例 1:修改 API 域名
|
|
||||||
|
|
||||||
如果你的后端部署在 `api.example.com`:
|
|
||||||
|
|
||||||
1. 手动触发 workflow
|
|
||||||
2. 将 **API 域名** 改为 `api.example.com`
|
|
||||||
3. OSS 地址保持默认
|
|
||||||
4. 点击 Run workflow
|
|
||||||
|
|
||||||
### 示例 2:使用自己的 CDN
|
|
||||||
|
|
||||||
如果你有自己的配置文件 CDN:
|
|
||||||
|
|
||||||
1. 手动触发 workflow
|
|
||||||
2. API 域名保持默认
|
|
||||||
3. 修改 **OSS 地址 1-4** 为你的 CDN 地址,例如:
|
|
||||||
- OSS 地址 1: `https://cdn1.example.com/config.txt`
|
|
||||||
- OSS 地址 2: `https://cdn2.example.com/config.txt`
|
|
||||||
- OSS 地址 3: `https://cdn3.example.com/config.txt`
|
|
||||||
- OSS 地址 4: `https://cdn4.example.com/config.txt`
|
|
||||||
4. 点击 Run workflow
|
|
||||||
|
|
||||||
### 示例 3:完全自定义配置
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
构建类型: release
|
|
||||||
API 域名: api.mycompany.com
|
|
||||||
OSS 地址 1: https://config.mycdn.com/v1/nodes.txt
|
|
||||||
OSS 地址 2: https://backup1.mycdn.com/v1/nodes.txt
|
|
||||||
OSS 地址 3: https://backup2.mycdn.com/v1/nodes.txt
|
|
||||||
OSS 地址 4: https://backup3.mycdn.com/v1/nodes.txt
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## ⏱️ 构建时间
|
|
||||||
|
|
||||||
| 阶段 | 时间 |
|
|
||||||
|-----|------|
|
|
||||||
| 编译 libcore.aar | 10-15 分钟 |
|
|
||||||
| 编译 Flutter APK | 15-20 分钟 |
|
|
||||||
| **总计** | **约 30 分钟** |
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🔍 查看构建日志
|
|
||||||
|
|
||||||
1. 打开 Actions 页面
|
|
||||||
2. 点击对应的运行记录
|
|
||||||
3. 点击具体的 job(如 "编译 Android APK")
|
|
||||||
4. 展开步骤查看详细日志
|
|
||||||
|
|
||||||
**关键步骤:**
|
|
||||||
- `⚙️ 配置 API 域名和 OSS 地址` - 查看配置是否正确替换
|
|
||||||
- `🔨 构建 APK` - 查看编译过程
|
|
||||||
- `📦 重命名 APK 文件` - 查看生成的文件名和 MD5
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🐛 常见问题
|
|
||||||
|
|
||||||
### Q1: 如何验证配置是否生效?
|
|
||||||
|
|
||||||
**A:** 查看 `⚙️ 配置 API 域名和 OSS 地址` 步骤的日志:
|
|
||||||
|
|
||||||
```
|
|
||||||
🔧 配置构建参数:
|
|
||||||
API 域名: api.example.com
|
|
||||||
OSS 地址 1: https://cdn1.example.com/config.txt
|
|
||||||
...
|
|
||||||
|
|
||||||
✅ 配置替换完成
|
|
||||||
|
|
||||||
📄 查看修改后的配置:
|
|
||||||
static List<String> kr_baseDomains = ["api.example.com","api.example.com"];
|
|
||||||
static String kr_currentDomain = "api.example.com";
|
|
||||||
```
|
|
||||||
|
|
||||||
如果看到你设置的域名,说明配置成功。
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### Q2: Release 构建和 Debug 构建有什么区别?
|
|
||||||
|
|
||||||
| 特性 | Debug | Release |
|
|
||||||
|-----|-------|---------|
|
|
||||||
| **文件大小** | 较大 | 较小(优化后) |
|
|
||||||
| **性能** | 较慢 | 快 |
|
|
||||||
| **调试信息** | 包含 | 移除 |
|
|
||||||
| **代码混淆** | 无 | 有 |
|
|
||||||
| **适用场景** | 开发测试 | 正式发布 |
|
|
||||||
|
|
||||||
**推荐:** 生产环境使用 **release** 构建
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### Q3: 如何使用环境变量配置(不想每次手动输入)?
|
|
||||||
|
|
||||||
在仓库 **Settings → Secrets and variables → Actions → Variables** 添加:
|
|
||||||
|
|
||||||
| 变量名 | 值 |
|
|
||||||
|-------|---|
|
|
||||||
| `DEFAULT_API_DOMAIN` | `api.example.com` |
|
|
||||||
| `DEFAULT_OSS_URL_1` | `https://cdn1.example.com/config.txt` |
|
|
||||||
| `DEFAULT_OSS_URL_2` | `https://cdn2.example.com/config.txt` |
|
|
||||||
| `DEFAULT_OSS_URL_3` | `https://cdn3.example.com/config.txt` |
|
|
||||||
| `DEFAULT_OSS_URL_4` | `https://cdn4.example.com/config.txt` |
|
|
||||||
|
|
||||||
然后修改 workflow 文件,将默认值改为:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
default: ${{ vars.DEFAULT_API_DOMAIN || 'api.maodag.top' }}
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### Q4: 构建失败 - "libcore.aar not found"
|
|
||||||
|
|
||||||
**原因:** libcore 编译失败
|
|
||||||
|
|
||||||
**解决:**
|
|
||||||
1. 检查 `build-libcore` job 的日志
|
|
||||||
2. 确认 Go 环境和 gomobile 安装成功
|
|
||||||
3. 确认 libcore 子模块已正确初始化
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### Q5: 如何配置签名(Release 构建必需)?
|
|
||||||
|
|
||||||
详见主文档 `.github/workflows/README.md` 的签名配置章节。
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 💡 高级技巧
|
|
||||||
|
|
||||||
### 技巧 1:同时构建多个版本
|
|
||||||
|
|
||||||
修改 `build-apk` job:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
build_type: [debug, release]
|
|
||||||
api_domain: ['api.maodag.top', 'api.example.com']
|
|
||||||
```
|
|
||||||
|
|
||||||
这样会生成 4 个 APK(2种类型 × 2个域名)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 技巧 2:添加构建完成通知
|
|
||||||
|
|
||||||
在 workflow 最后添加:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- name: 📢 发送 Telegram 通知
|
|
||||||
if: success()
|
|
||||||
run: |
|
|
||||||
curl -X POST "https://api.telegram.org/bot${{ secrets.TELEGRAM_BOT_TOKEN }}/sendMessage" \
|
|
||||||
-d chat_id=${{ secrets.TELEGRAM_CHAT_ID }} \
|
|
||||||
-d text="✅ BearVPN 构建成功!下载: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
|
||||||
```
|
|
||||||
|
|
||||||
需要先配置 `TELEGRAM_BOT_TOKEN` 和 `TELEGRAM_CHAT_ID` Secrets。
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 技巧 3:缓存加速构建
|
|
||||||
|
|
||||||
workflow 已配置 Go 和 Flutter 缓存,首次构建约 30 分钟,后续构建可缩短至 15-20 分钟。
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📊 构建状态徽章
|
|
||||||
|
|
||||||
在 README.md 中添加:
|
|
||||||
|
|
||||||
```markdown
|
|
||||||

|
|
||||||
```
|
|
||||||
|
|
||||||
效果:
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🔗 相关文件
|
|
||||||
|
|
||||||
- **主 Workflow:** `.github/workflows/build-android-apk.yml`
|
|
||||||
- **配置文件:** `lib/app/common/app_config.dart`
|
|
||||||
- **libcore 源码:** `libcore/` 子模块
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📞 需要帮助?
|
|
||||||
|
|
||||||
- 查看 [GitHub Actions 文档](https://docs.github.com/actions)
|
|
||||||
- 查看构建日志排查问题
|
|
||||||
- 提交 Issue 到仓库
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**生成时间:** 2025-10-27
|
|
||||||
**作者:** Claude Code
|
|
||||||
**版本:** 1.0.0
|
|
||||||
@@ -1,366 +0,0 @@
|
|||||||
# 🎯 如何在 GitHub 上构建你的应用
|
|
||||||
|
|
||||||
## 📋 前提条件
|
|
||||||
|
|
||||||
✅ 已将配置推送到 GitHub
|
|
||||||
✅ 有 GitHub 账号访问权限
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🚀 方法一:手动触发构建(推荐新手)
|
|
||||||
|
|
||||||
### 步骤 1: 访问 GitHub Actions 页面
|
|
||||||
|
|
||||||
1. 打开浏览器,访问你的仓库:
|
|
||||||
```
|
|
||||||
https://github.com/你的用户名/LighthouseApp
|
|
||||||
```
|
|
||||||
|
|
||||||
2. 点击顶部导航栏的 **Actions** 标签
|
|
||||||
```
|
|
||||||
Code Issues Pull requests Actions Projects Wiki Security Insights
|
|
||||||
↑ 点这里
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 步骤 2: 选择 Workflow
|
|
||||||
|
|
||||||
在左侧栏看到可用的 workflows:
|
|
||||||
|
|
||||||
```
|
|
||||||
All workflows
|
|
||||||
├── Build Android APK ← 仅构建 Android
|
|
||||||
├── Build Multi-Platform ← 构建所有平台 ⭐推荐
|
|
||||||
└── Build Clash Core
|
|
||||||
```
|
|
||||||
|
|
||||||
**选择建议:**
|
|
||||||
- 🟢 **首次测试:** 选择 **Build Android APK**(快速)
|
|
||||||
- 🔵 **正式发布:** 选择 **Build Multi-Platform**(全平台)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 步骤 3: 运行 Workflow
|
|
||||||
|
|
||||||
1. 点击选择的 workflow 名称
|
|
||||||
|
|
||||||
2. 右侧出现 **"Run workflow"** 下拉按钮
|
|
||||||
```
|
|
||||||
[Run workflow ▼]
|
|
||||||
```
|
|
||||||
|
|
||||||
3. 点击下拉按钮,展开配置面板
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 步骤 4: 配置参数
|
|
||||||
|
|
||||||
#### 如果选择 "Build Android APK":
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
┌─────────────────────────────────────────┐
|
|
||||||
│ Run workflow │
|
|
||||||
├─────────────────────────────────────────┤
|
|
||||||
│ Use workflow from │
|
|
||||||
│ Branch: main [▼] │
|
|
||||||
│ │
|
|
||||||
│ 构建类型 │
|
|
||||||
│ ○ debug │
|
|
||||||
│ ● release │
|
|
||||||
│ │
|
|
||||||
│ API 域名 │
|
|
||||||
│ [api.maodag.top________________] │
|
|
||||||
│ │
|
|
||||||
│ OSS 配置地址 1 │
|
|
||||||
│ [https://ppp2.oss-cn-hongkong...] │
|
|
||||||
│ │
|
|
||||||
│ OSS 配置地址 2 │
|
|
||||||
│ [https://xgp3.oss-ap-northeast-1...] │
|
|
||||||
│ │
|
|
||||||
│ OSS 配置地址 3 │
|
|
||||||
│ [https://xpp4.oss-ap-northeast-2...] │
|
|
||||||
│ │
|
|
||||||
│ OSS 配置地址 4 │
|
|
||||||
│ [https://xpp5.oss-ap-southeast-1...] │
|
|
||||||
│ │
|
|
||||||
│ [Cancel] [Run workflow] │
|
|
||||||
└─────────────────────────────────────────┘
|
|
||||||
```
|
|
||||||
|
|
||||||
**配置说明:**
|
|
||||||
- **构建类型:** 选择 `release`(生产环境)
|
|
||||||
- **API 域名:** 填写你的后端域名(默认 `api.maodag.top`)
|
|
||||||
- **OSS 地址:** 保持默认或填写你的 CDN 地址
|
|
||||||
|
|
||||||
#### 如果选择 "Build Multi-Platform":
|
|
||||||
|
|
||||||
额外多一个参数:
|
|
||||||
```yaml
|
|
||||||
│ 构建平台 │
|
|
||||||
│ [android,windows,macos,linux______] │
|
|
||||||
```
|
|
||||||
|
|
||||||
**选项:**
|
|
||||||
- `android` - 仅 Android
|
|
||||||
- `windows` - 仅 Windows
|
|
||||||
- `macos` - 仅 macOS
|
|
||||||
- `linux` - 仅 Linux
|
|
||||||
- `android,windows` - Android + Windows
|
|
||||||
- `android,windows,macos,linux` - 全部平台 ⭐
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 步骤 5: 开始构建
|
|
||||||
|
|
||||||
1. 检查所有参数是否正确
|
|
||||||
|
|
||||||
2. 点击绿色的 **"Run workflow"** 按钮
|
|
||||||
|
|
||||||
3. 页面刷新,顶部出现黄色进度条:
|
|
||||||
```
|
|
||||||
⚠️ Build Android APK #1
|
|
||||||
Queued - This workflow is in queue waiting to run
|
|
||||||
```
|
|
||||||
|
|
||||||
4. 几秒后变为蓝色(运行中):
|
|
||||||
```
|
|
||||||
🔵 Build Android APK #1
|
|
||||||
In progress - This workflow is currently running
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 步骤 6: 监控构建进度
|
|
||||||
|
|
||||||
1. 点击运行记录(蓝色行)
|
|
||||||
|
|
||||||
2. 看到构建阶段:
|
|
||||||
```
|
|
||||||
编译 libcore.aar 🔵 Running (15分钟)
|
|
||||||
编译 Android APK ⏸️ Pending
|
|
||||||
```
|
|
||||||
|
|
||||||
3. 可以展开查看实时日志:
|
|
||||||
```
|
|
||||||
▼ 编译 libcore.aar
|
|
||||||
▼ 📦 编译 libcore.aar
|
|
||||||
🚀 开始编译 libcore...
|
|
||||||
[gomobile] installing...
|
|
||||||
✅ libcore.aar 生成成功
|
|
||||||
```
|
|
||||||
|
|
||||||
4. 等待所有阶段完成(约 30-85 分钟)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 步骤 7: 下载构建产物
|
|
||||||
|
|
||||||
构建成功后:
|
|
||||||
|
|
||||||
1. 向下滚动到 **Artifacts** 区域
|
|
||||||
```
|
|
||||||
📦 Artifacts
|
|
||||||
|
|
||||||
Produced during runtime
|
|
||||||
|
|
||||||
Name Size Expires
|
|
||||||
apk-arm64-v8a-release 42.5 MB in 30 days [Download]
|
|
||||||
apk-armeabi-v7a-release 38.2 MB in 30 days [Download]
|
|
||||||
apk-x86_64-release 45.1 MB in 30 days [Download]
|
|
||||||
```
|
|
||||||
|
|
||||||
2. 点击 **[Download]** 下载对应文件
|
|
||||||
|
|
||||||
3. 下载的是 ZIP 文件,解压后得到 APK:
|
|
||||||
```
|
|
||||||
apk-arm64-v8a-release.zip
|
|
||||||
└── BearVPN-android-arm64-v8a-release-20251027-abc1234.apk
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🏷️ 方法二:推送标签自动构建
|
|
||||||
|
|
||||||
这种方式会自动构建并创建 GitHub Release。
|
|
||||||
|
|
||||||
### 步骤 1: 在本地打标签
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cd /Users/mac/Project/Dart/LighthouseApp
|
|
||||||
|
|
||||||
# 创建标签(版本号必须以 v 开头)
|
|
||||||
git tag v1.0.0
|
|
||||||
|
|
||||||
# 查看标签
|
|
||||||
git tag
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 步骤 2: 推送标签到 GitHub
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git push origin v1.0.0
|
|
||||||
```
|
|
||||||
|
|
||||||
**输出:**
|
|
||||||
```
|
|
||||||
Enumerating objects: 1, done.
|
|
||||||
Counting objects: 100% (1/1), done.
|
|
||||||
Writing objects: 100% (1/1), 160 bytes | 160.00 KiB/s, done.
|
|
||||||
Total 1 (delta 0), reused 0 (delta 0)
|
|
||||||
To github.com:你的用户名/LighthouseApp.git
|
|
||||||
* [new tag] v1.0.0 -> v1.0.0
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 步骤 3: 自动触发构建
|
|
||||||
|
|
||||||
1. 推送标签后,GitHub 自动检测到标签
|
|
||||||
2. 触发 **Build Multi-Platform** workflow
|
|
||||||
3. 使用默认配置构建所有平台
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 步骤 4: 查看构建进度
|
|
||||||
|
|
||||||
1. 访问 Actions 页面
|
|
||||||
2. 看到自动创建的构建任务:
|
|
||||||
```
|
|
||||||
🔵 Build Multi-Platform
|
|
||||||
v1.0.0
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 步骤 5: 下载 Release
|
|
||||||
|
|
||||||
构建成功后:
|
|
||||||
|
|
||||||
1. 访问 **Releases** 页面:
|
|
||||||
```
|
|
||||||
https://github.com/你的用户名/LighthouseApp/releases
|
|
||||||
```
|
|
||||||
|
|
||||||
2. 看到新创建的 Release:
|
|
||||||
```
|
|
||||||
📦 v1.0.0
|
|
||||||
|
|
||||||
Latest Pre-release
|
|
||||||
|
|
||||||
🎉 BearVPN 多平台版本发布
|
|
||||||
|
|
||||||
Assets (7)
|
|
||||||
├── BearVPN-android-arm64-v8a-release-*.apk 42.5 MB
|
|
||||||
├── BearVPN-android-armeabi-v7a-release-*.apk 38.2 MB
|
|
||||||
├── BearVPN-android-x86_64-release-*.apk 45.1 MB
|
|
||||||
├── BearVPN-windows-x64-release-*.zip 52.3 MB
|
|
||||||
├── BearVPN-macos-release-*.zip 48.7 MB
|
|
||||||
├── BearVPN-linux-x64-release-*.tar.gz 45.9 MB
|
|
||||||
└── Source code (zip)
|
|
||||||
```
|
|
||||||
|
|
||||||
3. 直接下载需要的文件
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## ⏱️ 构建时间参考
|
|
||||||
|
|
||||||
| Workflow | 平台 | 时间 |
|
|
||||||
|---------|------|------|
|
|
||||||
| Build Android APK | Android | 30 分钟 |
|
|
||||||
| Build Multi-Platform | Android | 35 分钟 |
|
|
||||||
| Build Multi-Platform | Windows | 30 分钟 |
|
|
||||||
| Build Multi-Platform | macOS | 35 分钟 |
|
|
||||||
| Build Multi-Platform | Linux | 30 分钟 |
|
|
||||||
| Build Multi-Platform | 全部平台 | **60-85 分钟** |
|
|
||||||
|
|
||||||
**提示:** 平台是并行构建的,不是累加时间。
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🎯 推荐流程
|
|
||||||
|
|
||||||
### 首次测试(验证流程)
|
|
||||||
|
|
||||||
```
|
|
||||||
1. 选择 "Build Android APK"
|
|
||||||
2. 使用默认配置
|
|
||||||
3. 运行构建
|
|
||||||
4. 等待 30 分钟
|
|
||||||
5. 下载 arm64-v8a APK
|
|
||||||
6. 安装测试
|
|
||||||
```
|
|
||||||
|
|
||||||
### 正式发布(生产环境)
|
|
||||||
|
|
||||||
```
|
|
||||||
1. 确保代码已测试
|
|
||||||
2. 本地打标签: git tag v1.0.0
|
|
||||||
3. 推送标签: git push origin v1.0.0
|
|
||||||
4. 等待 60-85 分钟
|
|
||||||
5. 在 Releases 页面下载所有平台
|
|
||||||
6. 分发给用户
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🐛 常见问题
|
|
||||||
|
|
||||||
### Q1: 找不到 "Run workflow" 按钮
|
|
||||||
|
|
||||||
**原因:** 可能还在查看历史运行记录
|
|
||||||
|
|
||||||
**解决:**
|
|
||||||
1. 点击左侧的 workflow 名称
|
|
||||||
2. 确保在 workflow 主页面
|
|
||||||
3. 右侧会出现 "Run workflow" 按钮
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### Q2: 构建失败
|
|
||||||
|
|
||||||
**排查步骤:**
|
|
||||||
1. 点击失败的运行记录
|
|
||||||
2. 展开红色的步骤
|
|
||||||
3. 查看错误日志
|
|
||||||
4. 常见错误:
|
|
||||||
- libcore 编译失败 → 检查 Go 环境
|
|
||||||
- APK 构建失败 → 检查 Flutter 依赖
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### Q3: Artifacts 下载后是空的
|
|
||||||
|
|
||||||
**原因:** 构建可能失败
|
|
||||||
|
|
||||||
**解决:**
|
|
||||||
1. 检查构建日志
|
|
||||||
2. 确保所有步骤都是绿色 ✅
|
|
||||||
3. 重新运行构建
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### Q4: 如何修改 API 域名
|
|
||||||
|
|
||||||
**方法 1:** 手动触发时修改参数
|
|
||||||
|
|
||||||
**方法 2:** 修改代码中的默认值
|
|
||||||
```dart
|
|
||||||
// lib/app/common/app_config.dart
|
|
||||||
static String kr_currentDomain = "api.example.com";
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📞 需要帮助?
|
|
||||||
|
|
||||||
- **查看详细文档:** `.github/workflows/INDEX.md`
|
|
||||||
- **快速开始:** `.github/workflows/QUICKSTART.md`
|
|
||||||
- **问题反馈:** GitHub Issues
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**准备好了吗?立即开始构建!** 🚀
|
|
||||||
@@ -1,318 +0,0 @@
|
|||||||
# 📚 GitHub Actions 构建系统总览
|
|
||||||
|
|
||||||
## 🎯 快速导航
|
|
||||||
|
|
||||||
| 文档 | 用途 | 适合人群 |
|
|
||||||
|-----|------|---------|
|
|
||||||
| **[QUICKSTART.md](./QUICKSTART.md)** | 3步快速开始 | 新手 |
|
|
||||||
| **[README.md](./README.md)** | 基础说明 | 所有人 |
|
|
||||||
| **[BUILD_GUIDE.md](./BUILD_GUIDE.md)** | Android 详细指南 | Android 开发者 |
|
|
||||||
| **[MULTIPLATFORM_GUIDE.md](./MULTIPLATFORM_GUIDE.md)** | 多平台构建指南 | 全平台开发者 |
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📋 可用的 Workflows
|
|
||||||
|
|
||||||
### 1. `build-android-apk.yml` - Android 专用构建
|
|
||||||
|
|
||||||
**功能:**
|
|
||||||
- ✅ 编译 libcore.aar
|
|
||||||
- ✅ 构建 Android APK (arm64/armv7/x86_64)
|
|
||||||
- ✅ 配置 API 域名和 OSS 地址
|
|
||||||
- ✅ Release 构建
|
|
||||||
|
|
||||||
**触发条件:**
|
|
||||||
- 推送到 main/develop 分支
|
|
||||||
- 创建 v* 标签
|
|
||||||
- 手动触发
|
|
||||||
|
|
||||||
**文档:** [BUILD_GUIDE.md](./BUILD_GUIDE.md)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 2. `build-multiplatform.yml` - 多平台构建 ⭐推荐
|
|
||||||
|
|
||||||
**功能:**
|
|
||||||
- ✅ Android APK
|
|
||||||
- ✅ Windows 可执行文件
|
|
||||||
- ✅ macOS 应用
|
|
||||||
- ✅ Linux 可执行文件
|
|
||||||
- ✅ 可选择构建平台
|
|
||||||
- ✅ 统一配置管理
|
|
||||||
|
|
||||||
**触发条件:**
|
|
||||||
- 推送到 main/develop 分支
|
|
||||||
- 创建 v* 标签
|
|
||||||
- 手动触发
|
|
||||||
|
|
||||||
**文档:** [MULTIPLATFORM_GUIDE.md](./MULTIPLATFORM_GUIDE.md)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 3. `build-clash-core.yml` - Clash 核心编译
|
|
||||||
|
|
||||||
**功能:**
|
|
||||||
- 编译 Clash Meta 核心
|
|
||||||
- 支持多架构 (arm64/armv7/x86_64)
|
|
||||||
|
|
||||||
**触发条件:**
|
|
||||||
- core/ 目录变更
|
|
||||||
- 手动触发
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🚀 使用建议
|
|
||||||
|
|
||||||
### 场景 1: 日常开发(仅 Android)
|
|
||||||
|
|
||||||
**使用:** `build-android-apk.yml`
|
|
||||||
```bash
|
|
||||||
# 推送代码自动触发
|
|
||||||
git push origin main
|
|
||||||
```
|
|
||||||
|
|
||||||
**时间:** 约 30 分钟
|
|
||||||
**产物:** 3 个 Android APK
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 场景 2: 正式发布(所有平台)
|
|
||||||
|
|
||||||
**使用:** `build-multiplatform.yml`
|
|
||||||
```bash
|
|
||||||
# 1. 打标签
|
|
||||||
git tag v1.0.0
|
|
||||||
git push origin v1.0.0
|
|
||||||
|
|
||||||
# 2. 自动构建所有平台并创建 Release
|
|
||||||
```
|
|
||||||
|
|
||||||
**时间:** 约 60-85 分钟(并行)
|
|
||||||
**产物:** Android + Windows + macOS + Linux
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 场景 3: 测试特定平台
|
|
||||||
|
|
||||||
**使用:** `build-multiplatform.yml` 手动触发
|
|
||||||
```yaml
|
|
||||||
构建平台: android,windows # 只构建这两个
|
|
||||||
```
|
|
||||||
|
|
||||||
**时间:** 约 35 分钟
|
|
||||||
**产物:** 指定平台
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📦 构建产物对比
|
|
||||||
|
|
||||||
### Android 专用构建
|
|
||||||
|
|
||||||
```
|
|
||||||
BearVPN-android-arm64-v8a-release-20251027-abc1234.apk
|
|
||||||
BearVPN-android-armeabi-v7a-release-20251027-abc1234.apk
|
|
||||||
BearVPN-android-x86_64-release-20251027-abc1234.apk
|
|
||||||
```
|
|
||||||
|
|
||||||
### 多平台构建
|
|
||||||
|
|
||||||
```
|
|
||||||
# Android
|
|
||||||
BearVPN-android-arm64-v8a-release-20251027-abc1234.apk
|
|
||||||
BearVPN-android-armeabi-v7a-release-20251027-abc1234.apk
|
|
||||||
BearVPN-android-x86_64-release-20251027-abc1234.apk
|
|
||||||
|
|
||||||
# Windows
|
|
||||||
BearVPN-windows-x64-release-20251027-abc1234.zip
|
|
||||||
|
|
||||||
# macOS
|
|
||||||
BearVPN-macos-release-20251027-abc1234.zip
|
|
||||||
|
|
||||||
# Linux
|
|
||||||
BearVPN-linux-x64-release-20251027-abc1234.tar.gz
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## ⚙️ 配置参数说明
|
|
||||||
|
|
||||||
### 所有 Workflow 通用参数
|
|
||||||
|
|
||||||
| 参数 | 默认值 | 说明 |
|
|
||||||
|-----|-------|------|
|
|
||||||
| **构建类型** | `release` | debug 或 release |
|
|
||||||
| **API 域名** | `api.maodag.top` | 后端服务器地址 |
|
|
||||||
| **OSS 地址 1** | 香港 CDN | 配置文件源 |
|
|
||||||
| **OSS 地址 2** | 东京 CDN | 备用配置源 |
|
|
||||||
| **OSS 地址 3** | 首尔 CDN | 备用配置源 |
|
|
||||||
| **OSS 地址 4** | 新加坡 CDN | 备用配置源 |
|
|
||||||
|
|
||||||
### 多平台专用参数
|
|
||||||
|
|
||||||
| 参数 | 默认值 | 说明 |
|
|
||||||
|-----|-------|------|
|
|
||||||
| **构建平台** | `android,windows,macos,linux` | 选择构建的平台 |
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## ⏱️ 构建时间对比
|
|
||||||
|
|
||||||
| Workflow | 单平台 | 全平台 |
|
|
||||||
|---------|-------|-------|
|
|
||||||
| **Android 专用** | 30分钟 | - |
|
|
||||||
| **多平台** | 30-40分钟 | 60-85分钟 |
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🎯 选择 Workflow 的建议
|
|
||||||
|
|
||||||
### 选择 `build-android-apk.yml` 如果:
|
|
||||||
|
|
||||||
- ✅ 只需要 Android 版本
|
|
||||||
- ✅ 快速迭代开发
|
|
||||||
- ✅ CI/CD 自动触发
|
|
||||||
|
|
||||||
### 选择 `build-multiplatform.yml` 如果:
|
|
||||||
|
|
||||||
- ✅ 需要桌面版本
|
|
||||||
- ✅ 正式版本发布
|
|
||||||
- ✅ 需要灵活选择平台
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🔧 环境配置
|
|
||||||
|
|
||||||
### 必需的 Secrets(用于 Release 签名)
|
|
||||||
|
|
||||||
**Android:**
|
|
||||||
```
|
|
||||||
KEYSTORE_BASE64
|
|
||||||
KEYSTORE_PASSWORD
|
|
||||||
KEY_ALIAS
|
|
||||||
KEY_PASSWORD
|
|
||||||
```
|
|
||||||
|
|
||||||
**macOS:**
|
|
||||||
```
|
|
||||||
MACOS_CERTIFICATE_BASE64
|
|
||||||
MACOS_CERTIFICATE_PASSWORD
|
|
||||||
```
|
|
||||||
|
|
||||||
**Windows:**
|
|
||||||
```
|
|
||||||
WINDOWS_CERTIFICATE_BASE64
|
|
||||||
WINDOWS_CERTIFICATE_PASSWORD
|
|
||||||
```
|
|
||||||
|
|
||||||
**说明:** 如果不配置签名,可以使用 debug 构建。
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📊 构建流程图
|
|
||||||
|
|
||||||
### Android 专用
|
|
||||||
|
|
||||||
```
|
|
||||||
Checkout 代码
|
|
||||||
↓
|
|
||||||
编译 libcore.aar (15min)
|
|
||||||
↓
|
|
||||||
配置 API/OSS
|
|
||||||
↓
|
|
||||||
构建 APK (20min)
|
|
||||||
↓
|
|
||||||
上传产物
|
|
||||||
```
|
|
||||||
|
|
||||||
### 多平台
|
|
||||||
|
|
||||||
```
|
|
||||||
Checkout 代码
|
|
||||||
↓
|
|
||||||
编译 libcore.aar (15min)
|
|
||||||
↓
|
|
||||||
├─→ Android (20min) ─┐
|
|
||||||
├─→ Windows (15min) ─┤
|
|
||||||
├─→ macOS (20min) ─┼─→ 创建 Release
|
|
||||||
└─→ Linux (15min) ─┘
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🐛 故障排查
|
|
||||||
|
|
||||||
### 问题 1: libcore 编译失败
|
|
||||||
|
|
||||||
**检查:**
|
|
||||||
1. Go 环境是否正常
|
|
||||||
2. gomobile 是否安装
|
|
||||||
3. 网络连接(下载依赖)
|
|
||||||
|
|
||||||
**日志位置:** `build-libcore` job
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 问题 2: Android 构建失败
|
|
||||||
|
|
||||||
**常见原因:**
|
|
||||||
- libcore.aar 未生成
|
|
||||||
- Gradle 依赖问题
|
|
||||||
- 签名配置错误
|
|
||||||
|
|
||||||
**解决:** 查看 `build-android` job 日志
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 问题 3: macOS 构建失败
|
|
||||||
|
|
||||||
**常见原因:**
|
|
||||||
- 签名证书未配置
|
|
||||||
- Xcode 版本不兼容
|
|
||||||
|
|
||||||
**解决:**
|
|
||||||
- 使用 debug 构建
|
|
||||||
- 或配置签名证书
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 💡 高级用法
|
|
||||||
|
|
||||||
### 1. 定时构建
|
|
||||||
|
|
||||||
添加到 workflow:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: '0 2 * * *' # 每天UTC 2:00
|
|
||||||
```
|
|
||||||
|
|
||||||
### 2. PR 自动构建
|
|
||||||
|
|
||||||
已配置:推送 PR 到 main 分支自动触发
|
|
||||||
|
|
||||||
### 3. 构建通知
|
|
||||||
|
|
||||||
可集成 Telegram/Slack/钉钉通知
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📞 获取帮助
|
|
||||||
|
|
||||||
- **查看文档:** 本目录下的 Markdown 文件
|
|
||||||
- **查看日志:** GitHub Actions 页面
|
|
||||||
- **提交问题:** Issues 页面
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🔗 相关链接
|
|
||||||
|
|
||||||
- [GitHub Actions 文档](https://docs.github.com/actions)
|
|
||||||
- [Flutter CI/CD](https://docs.flutter.dev/deployment/cd)
|
|
||||||
- [sing-box 文档](https://sing-box.sagernet.org/)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**版本:** 1.0.0
|
|
||||||
**更新:** 2025-10-27
|
|
||||||
**作者:** Claude Code
|
|
||||||
@@ -1,407 +0,0 @@
|
|||||||
# 🌐 多平台构建完全指南
|
|
||||||
|
|
||||||
## 📋 支持的平台
|
|
||||||
|
|
||||||
✅ **Android** - arm64-v8a / armeabi-v7a / x86_64
|
|
||||||
✅ **Windows** - x64
|
|
||||||
✅ **macOS** - Universal (Intel + Apple Silicon)
|
|
||||||
✅ **Linux** - x64
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🚀 快速开始
|
|
||||||
|
|
||||||
### 方法 1: 构建所有平台(推荐)
|
|
||||||
|
|
||||||
1. 打开 GitHub Actions 页面
|
|
||||||
2. 选择 **Build Multi-Platform**
|
|
||||||
3. 点击 **Run workflow**
|
|
||||||
4. 配置参数:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
构建类型: release
|
|
||||||
API 域名: api.maodag.top
|
|
||||||
OSS 地址 1-4: 使用默认值
|
|
||||||
构建平台: android,windows,macos,linux # 构建所有平台
|
|
||||||
```
|
|
||||||
|
|
||||||
5. 点击 **Run workflow** 开始
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 方法 2: 仅构建指定平台
|
|
||||||
|
|
||||||
**场景:** 只需要 Android 和 Windows 版本
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
构建平台: android,windows # 只构建这两个平台
|
|
||||||
```
|
|
||||||
|
|
||||||
**可选值:**
|
|
||||||
- `android` - 仅 Android
|
|
||||||
- `windows` - 仅 Windows
|
|
||||||
- `macos` - 仅 macOS
|
|
||||||
- `linux` - 仅 Linux
|
|
||||||
- `android,windows` - Android + Windows
|
|
||||||
- `android,windows,macos,linux` - 全部平台
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## ⏱️ 构建时间估算
|
|
||||||
|
|
||||||
| 平台 | 时间 | 说明 |
|
|
||||||
|-----|------|-----|
|
|
||||||
| **libcore** | 10-15分钟 | Android 依赖 |
|
|
||||||
| **Android** | 15-20分钟 | 3个架构APK |
|
|
||||||
| **Windows** | 10-15分钟 | x64可执行文件 |
|
|
||||||
| **macOS** | 15-20分钟 | Universal应用 |
|
|
||||||
| **Linux** | 10-15分钟 | x64可执行文件 |
|
|
||||||
| **总计(全平台)** | **60-85分钟** | 并行构建 |
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📦 构建产物
|
|
||||||
|
|
||||||
### Android
|
|
||||||
|
|
||||||
```
|
|
||||||
BearVPN-android-arm64-v8a-release-20251027-abc1234.apk (推荐)
|
|
||||||
BearVPN-android-armeabi-v7a-release-20251027-abc1234.apk (老设备)
|
|
||||||
BearVPN-android-x86_64-release-20251027-abc1234.apk (模拟器)
|
|
||||||
```
|
|
||||||
|
|
||||||
**安装:** 直接点击APK安装
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### Windows
|
|
||||||
|
|
||||||
```
|
|
||||||
BearVPN-windows-x64-release-20251027-abc1234.zip
|
|
||||||
```
|
|
||||||
|
|
||||||
**内容结构:**
|
|
||||||
```
|
|
||||||
BearVPN.exe # 主程序
|
|
||||||
flutter_windows.dll # Flutter运行时
|
|
||||||
data/ # 资源文件
|
|
||||||
```
|
|
||||||
|
|
||||||
**运行:**
|
|
||||||
1. 解压 ZIP 文件
|
|
||||||
2. 双击 `BearVPN.exe` 运行
|
|
||||||
3. 如提示缺少依赖,安装 [VC++ Redistributable](https://aka.ms/vs/17/release/vc_redist.x64.exe)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### macOS
|
|
||||||
|
|
||||||
```
|
|
||||||
BearVPN-macos-release-20251027-abc1234.zip
|
|
||||||
```
|
|
||||||
|
|
||||||
**内容:**
|
|
||||||
```
|
|
||||||
BearVPN.app # 应用程序包(Universal)
|
|
||||||
```
|
|
||||||
|
|
||||||
**安装:**
|
|
||||||
1. 解压 ZIP 文件
|
|
||||||
2. 将 `BearVPN.app` 拖到 **应用程序** 文件夹
|
|
||||||
3. 首次运行右键点击 → 打开(绕过 Gatekeeper)
|
|
||||||
|
|
||||||
**支持架构:**
|
|
||||||
- Intel (x86_64)
|
|
||||||
- Apple Silicon (arm64)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### Linux
|
|
||||||
|
|
||||||
```
|
|
||||||
BearVPN-linux-x64-release-20251027-abc1234.tar.gz
|
|
||||||
```
|
|
||||||
|
|
||||||
**内容结构:**
|
|
||||||
```
|
|
||||||
bearvpn # 可执行文件
|
|
||||||
lib/ # 共享库
|
|
||||||
data/ # 资源文件
|
|
||||||
```
|
|
||||||
|
|
||||||
**运行:**
|
|
||||||
```bash
|
|
||||||
# 1. 解压
|
|
||||||
tar -xzf BearVPN-linux-x64-release-*.tar.gz
|
|
||||||
cd bundle
|
|
||||||
|
|
||||||
# 2. 添加执行权限
|
|
||||||
chmod +x bearvpn
|
|
||||||
|
|
||||||
# 3. 运行
|
|
||||||
./bearvpn
|
|
||||||
```
|
|
||||||
|
|
||||||
**依赖要求:**
|
|
||||||
- GTK+ 3
|
|
||||||
- libstdc++12
|
|
||||||
|
|
||||||
**安装依赖(Ubuntu/Debian):**
|
|
||||||
```bash
|
|
||||||
sudo apt-get install libgtk-3-0 libstdc++6
|
|
||||||
```
|
|
||||||
|
|
||||||
**安装依赖(Fedora/RHEL):**
|
|
||||||
```bash
|
|
||||||
sudo dnf install gtk3 libstdc++
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🔧 配置说明
|
|
||||||
|
|
||||||
### 所有平台通用配置
|
|
||||||
|
|
||||||
| 参数 | 默认值 | 说明 |
|
|
||||||
|-----|-------|------|
|
|
||||||
| **构建类型** | `release` | debug 或 release |
|
|
||||||
| **API 域名** | `api.maodag.top` | 后端服务器 |
|
|
||||||
| **OSS 地址 1** | 香港 CDN | 配置文件源 |
|
|
||||||
| **OSS 地址 2** | 东京 CDN | 备用源 |
|
|
||||||
| **OSS 地址 3** | 首尔 CDN | 备用源 |
|
|
||||||
| **OSS 地址 4** | 新加坡 CDN | 备用源 |
|
|
||||||
| **构建平台** | `android,windows,macos,linux` | 选择平台 |
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📥 下载构建产物
|
|
||||||
|
|
||||||
### 从 Actions 页面下载
|
|
||||||
|
|
||||||
1. 打开运行记录
|
|
||||||
2. 滚动到 **Artifacts** 区域
|
|
||||||
3. 下载对应平台:
|
|
||||||
- `android-apk` - Android APK (所有架构)
|
|
||||||
- `windows-x64` - Windows 可执行程序
|
|
||||||
- `macos-app` - macOS 应用
|
|
||||||
- `linux-x64` - Linux 可执行程序
|
|
||||||
|
|
||||||
### 从 Releases 下载(推送标签时)
|
|
||||||
|
|
||||||
1. 访问 Releases 页面
|
|
||||||
2. 选择版本
|
|
||||||
3. 在 Assets 中下载对应平台文件
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🎯 使用场景
|
|
||||||
|
|
||||||
### 场景 1: 开发测试(仅 Android)
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
构建类型: debug
|
|
||||||
构建平台: android
|
|
||||||
API 域名: api.test.com
|
|
||||||
```
|
|
||||||
|
|
||||||
**优点:** 快速,约20分钟
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 场景 2: 正式发布(全平台)
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
构建类型: release
|
|
||||||
构建平台: android,windows,macos,linux
|
|
||||||
API 域名: api.maodag.top
|
|
||||||
```
|
|
||||||
|
|
||||||
**优点:** 一次构建,覆盖所有用户
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 场景 3: 仅桌面平台
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
构建类型: release
|
|
||||||
构建平台: windows,macos,linux
|
|
||||||
```
|
|
||||||
|
|
||||||
**用途:** 桌面版更新
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🐛 常见问题
|
|
||||||
|
|
||||||
### Q1: Windows 构建失败 - "7z command not found"
|
|
||||||
|
|
||||||
**原因:** Windows runner 默认有 7z
|
|
||||||
|
|
||||||
**解决:** 检查构建日志,可能是其他错误
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### Q2: macOS 构建失败 - "Code signing required"
|
|
||||||
|
|
||||||
**原因:** Release 构建需要签名
|
|
||||||
|
|
||||||
**解决方案:**
|
|
||||||
|
|
||||||
**方法 1:** 使用 debug 构建(测试用)
|
|
||||||
|
|
||||||
**方法 2:** 配置签名证书(生产用)
|
|
||||||
```yaml
|
|
||||||
# 在 Secrets 中添加
|
|
||||||
MACOS_CERTIFICATE_BASE64
|
|
||||||
MACOS_CERTIFICATE_PASSWORD
|
|
||||||
MACOS_KEYCHAIN_PASSWORD
|
|
||||||
PROVISIONING_PROFILE_BASE64
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### Q3: Linux 运行时提示缺少库
|
|
||||||
|
|
||||||
**错误:**
|
|
||||||
```
|
|
||||||
error while loading shared libraries: libgtk-3.so.0
|
|
||||||
```
|
|
||||||
|
|
||||||
**解决:**
|
|
||||||
```bash
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install libgtk-3-0
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### Q4: 如何只更新某个平台?
|
|
||||||
|
|
||||||
**方法 1:** 手动触发指定平台
|
|
||||||
```yaml
|
|
||||||
构建平台: android # 只构建 Android
|
|
||||||
```
|
|
||||||
|
|
||||||
**方法 2:** 创建平台专用 workflow(推荐)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### Q5: 构建时间太长怎么办?
|
|
||||||
|
|
||||||
**优化方案:**
|
|
||||||
|
|
||||||
1. **仅构建需要的平台**
|
|
||||||
```yaml
|
|
||||||
构建平台: android # 而不是全部
|
|
||||||
```
|
|
||||||
|
|
||||||
2. **使用缓存**(已配置)
|
|
||||||
- Flutter SDK 缓存
|
|
||||||
- Gradle 缓存
|
|
||||||
- Go modules 缓存
|
|
||||||
|
|
||||||
3. **分批构建**
|
|
||||||
- 白天构建 Android/Windows
|
|
||||||
- 晚上构建 macOS/Linux
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 💡 高级用法
|
|
||||||
|
|
||||||
### 技巧 1: 矩阵构建多个配置
|
|
||||||
|
|
||||||
修改 workflow:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
api_domain: ['api.prod.com', 'api.test.com']
|
|
||||||
platform: ['android', 'windows', 'macos', 'linux']
|
|
||||||
```
|
|
||||||
|
|
||||||
**效果:** 生成 8 个版本(2域名 × 4平台)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 技巧 2: 定时自动构建
|
|
||||||
|
|
||||||
添加到 workflow:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: '0 2 * * *' # 每天凌晨2点(UTC)
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### 技巧 3: 构建完成通知
|
|
||||||
|
|
||||||
添加 Telegram 通知:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
- name: 📢 通知
|
|
||||||
run: |
|
|
||||||
curl -X POST "https://api.telegram.org/bot${{ secrets.TG_BOT_TOKEN }}/sendMessage" \
|
|
||||||
-d chat_id=${{ secrets.TG_CHAT_ID }} \
|
|
||||||
-d text="✅ 多平台构建完成!"
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📊 构建并行示意图
|
|
||||||
|
|
||||||
```
|
|
||||||
libcore (15min)
|
|
||||||
↓
|
|
||||||
├─→ Android (20min) ─┐
|
|
||||||
├─→ Windows (15min) ─┤
|
|
||||||
├─→ macOS (20min) ─┼─→ Release (2min)
|
|
||||||
└─→ Linux (15min) ─┘
|
|
||||||
|
|
||||||
总时间: 约 35-40分钟(并行)
|
|
||||||
如果串行: 约 85分钟
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🔐 安全建议
|
|
||||||
|
|
||||||
### Release 版本签名
|
|
||||||
|
|
||||||
**Android:**
|
|
||||||
```yaml
|
|
||||||
# Secrets 配置
|
|
||||||
KEYSTORE_BASE64
|
|
||||||
KEYSTORE_PASSWORD
|
|
||||||
KEY_ALIAS
|
|
||||||
KEY_PASSWORD
|
|
||||||
```
|
|
||||||
|
|
||||||
**macOS:**
|
|
||||||
```yaml
|
|
||||||
# Secrets 配置
|
|
||||||
MACOS_CERTIFICATE_BASE64
|
|
||||||
MACOS_CERTIFICATE_PASSWORD
|
|
||||||
```
|
|
||||||
|
|
||||||
**Windows:**
|
|
||||||
```yaml
|
|
||||||
# Secrets 配置
|
|
||||||
WINDOWS_CERTIFICATE_BASE64
|
|
||||||
WINDOWS_CERTIFICATE_PASSWORD
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📞 需要帮助?
|
|
||||||
|
|
||||||
- 查看 [GitHub Actions 文档](https://docs.github.com/actions)
|
|
||||||
- 查看 [Flutter 桌面支持](https://docs.flutter.dev/desktop)
|
|
||||||
- 提交 Issue
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**版本:** 1.0.0
|
|
||||||
**更新:** 2025-10-27
|
|
||||||
**作者:** Claude Code
|
|
||||||
@@ -1,78 +0,0 @@
|
|||||||
# 🚀 GitHub Actions 快速开始
|
|
||||||
|
|
||||||
## 📋 3 步开始使用
|
|
||||||
|
|
||||||
### 步骤 1: 推送配置文件
|
|
||||||
|
|
||||||
```bash
|
|
||||||
cd /Users/mac/Project/Dart/LighthouseApp
|
|
||||||
|
|
||||||
git add .github/workflows/
|
|
||||||
git commit -m "feat: 添加 GitHub Actions 自动构建配置"
|
|
||||||
git push origin main
|
|
||||||
```
|
|
||||||
|
|
||||||
### 步骤 2: 手动触发构建
|
|
||||||
|
|
||||||
1. 打开 GitHub 仓库页面
|
|
||||||
2. 点击 **Actions** 标签
|
|
||||||
3. 左侧选择 **Build Android APK**
|
|
||||||
4. 右侧点击 **Run workflow** 下拉按钮
|
|
||||||
5. 配置参数(可以使用默认值):
|
|
||||||
|
|
||||||
```
|
|
||||||
构建类型: release
|
|
||||||
API 域名: api.maodag.top
|
|
||||||
OSS 地址 1-4: 使用默认值
|
|
||||||
```
|
|
||||||
|
|
||||||
6. 点击绿色 **Run workflow** 按钮
|
|
||||||
|
|
||||||
### 步骤 3: 下载 APK
|
|
||||||
|
|
||||||
- 等待约 30 分钟
|
|
||||||
- 在构建记录页面找到 **Artifacts**
|
|
||||||
- 下载 `apk-arm64-v8a-release`(推荐)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🎯 自定义配置示例
|
|
||||||
|
|
||||||
### 场景 1: 更换 API 域名
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
构建类型: release
|
|
||||||
API 域名: api.example.com ← 修改这里
|
|
||||||
OSS 地址: 保持默认
|
|
||||||
```
|
|
||||||
|
|
||||||
### 场景 2: 使用自己的 CDN
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
构建类型: release
|
|
||||||
API 域名: api.maodag.top
|
|
||||||
OSS 地址 1: https://your-cdn.com/config1.txt ← 修改这里
|
|
||||||
OSS 地址 2: https://your-cdn.com/config2.txt ← 修改这里
|
|
||||||
OSS 地址 3: https://your-cdn.com/config3.txt ← 修改这里
|
|
||||||
OSS 地址 4: https://your-cdn.com/config4.txt ← 修改这里
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📖 详细文档
|
|
||||||
|
|
||||||
- **完整指南:** [BUILD_GUIDE.md](./BUILD_GUIDE.md)
|
|
||||||
- **基础说明:** [README.md](./README.md)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## ✅ 核心功能
|
|
||||||
|
|
||||||
✅ **Release 构建** - 生产环境优化版本
|
|
||||||
✅ **可配置域名** - 支持自定义 API 和 CDN
|
|
||||||
✅ **分架构打包** - arm64/armv7/x86_64
|
|
||||||
✅ **自动 Release** - 推送标签自动发布
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**需要帮助?** 查看 [BUILD_GUIDE.md](./BUILD_GUIDE.md)
|
|
||||||
@@ -1,90 +0,0 @@
|
|||||||
# GitHub Actions 构建说明
|
|
||||||
|
|
||||||
## 📋 工作流概览
|
|
||||||
|
|
||||||
### `build-android-apk.yml` - Android APK 自动构建
|
|
||||||
|
|
||||||
**触发条件:**
|
|
||||||
- ✅ 推送到 `main` 或 `develop` 分支
|
|
||||||
- ✅ 打 `v*` 标签时自动创建 Release
|
|
||||||
- ✅ 手动触发(Actions 页面点击 "Run workflow")
|
|
||||||
|
|
||||||
**构建产物:**
|
|
||||||
- `libcore.aar` - sing-box 核心库
|
|
||||||
- `BearVPN-arm64-v8a-*.apk` - 64位 ARM 版本(推荐)
|
|
||||||
- `BearVPN-armeabi-v7a-*.apk` - 32位 ARM 版本
|
|
||||||
- `BearVPN-x86_64-*.apk` - 模拟器版本
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🚀 使用方法
|
|
||||||
|
|
||||||
### 方法一:推送代码自动构建
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git add .
|
|
||||||
git commit -m "feat: 新功能"
|
|
||||||
git push origin main
|
|
||||||
```
|
|
||||||
|
|
||||||
### 方法二:手动触发
|
|
||||||
|
|
||||||
1. 打开仓库 **Actions** 页面
|
|
||||||
2. 点击 **Build Android APK**
|
|
||||||
3. 点击 **Run workflow**
|
|
||||||
|
|
||||||
### 方法三:创建 Release
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git tag v1.0.0
|
|
||||||
git push origin v1.0.0
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 📦 下载构建产物
|
|
||||||
|
|
||||||
- **Actions 页面:** 点击运行记录 → Artifacts 区域下载
|
|
||||||
- **Releases 页面:** 选择版本 → Assets 下载
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🔧 配置 Release 签名(可选)
|
|
||||||
|
|
||||||
1. 生成密钥:
|
|
||||||
```bash
|
|
||||||
keytool -genkey -v -keystore release.keystore -alias bearvpn -keyalg RSA -keysize 2048 -validity 10000
|
|
||||||
```
|
|
||||||
|
|
||||||
2. 转换为 Base64:
|
|
||||||
```bash
|
|
||||||
base64 release.keystore > keystore.base64.txt
|
|
||||||
```
|
|
||||||
|
|
||||||
3. 在 GitHub 仓库 **Settings → Secrets** 添加:
|
|
||||||
- `KEYSTORE_BASE64`
|
|
||||||
- `KEYSTORE_PASSWORD`
|
|
||||||
- `KEY_ALIAS`
|
|
||||||
- `KEY_PASSWORD`
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## ⏱️ 构建时间
|
|
||||||
|
|
||||||
- libcore.aar: 10-15 分钟
|
|
||||||
- Flutter APK: 15-20 分钟
|
|
||||||
- **总计: 约 30 分钟**
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 🐛 常见问题
|
|
||||||
|
|
||||||
**Q: 构建失败 "libcore.aar not found"**
|
|
||||||
A: 检查 libcore 子模块是否正确初始化
|
|
||||||
|
|
||||||
**Q: Release 未创建**
|
|
||||||
A: 标签必须以 `v` 开头,如 `v1.0.0`
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
生成时间: 2025-10-27
|
|
||||||
@@ -1,319 +0,0 @@
|
|||||||
name: Build Android APK
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- develop
|
|
||||||
tags:
|
|
||||||
- 'v*'
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
workflow_dispatch: # 允许手动触发
|
|
||||||
inputs:
|
|
||||||
build_type:
|
|
||||||
description: '构建类型'
|
|
||||||
required: true
|
|
||||||
default: 'release'
|
|
||||||
type: choice
|
|
||||||
options:
|
|
||||||
- debug
|
|
||||||
- release
|
|
||||||
api_domain:
|
|
||||||
description: 'API 域名'
|
|
||||||
required: true
|
|
||||||
default: 'api.maodag.top'
|
|
||||||
type: string
|
|
||||||
oss_url_1:
|
|
||||||
description: 'OSS 配置地址 1'
|
|
||||||
required: true
|
|
||||||
default: 'https://ppp2.oss-cn-hongkong.aliyuncs.com/bear1.txt'
|
|
||||||
type: string
|
|
||||||
oss_url_2:
|
|
||||||
description: 'OSS 配置地址 2'
|
|
||||||
required: true
|
|
||||||
default: 'https://xgp3.oss-ap-northeast-1.aliyuncs.com/bear1.txt'
|
|
||||||
type: string
|
|
||||||
oss_url_3:
|
|
||||||
description: 'OSS 配置地址 3'
|
|
||||||
required: true
|
|
||||||
default: 'https://xpp4.oss-ap-northeast-2.aliyuncs.com/bear1.txt'
|
|
||||||
type: string
|
|
||||||
oss_url_4:
|
|
||||||
description: 'OSS 配置地址 4'
|
|
||||||
required: true
|
|
||||||
default: 'https://xpp5.oss-ap-southeast-1.aliyuncs.com/bear1.txt'
|
|
||||||
type: string
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-libcore:
|
|
||||||
name: 编译 libcore.aar
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: 📥 Checkout 代码
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: 🔧 设置 Go 环境
|
|
||||||
uses: actions/setup-go@v5
|
|
||||||
with:
|
|
||||||
go-version: '1.23'
|
|
||||||
cache: true
|
|
||||||
cache-dependency-path: libcore/go.sum
|
|
||||||
|
|
||||||
- name: 🔧 设置 Node.js 环境
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: '20'
|
|
||||||
|
|
||||||
- name: 🔧 设置 Java 环境
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
distribution: 'zulu'
|
|
||||||
java-version: '17'
|
|
||||||
|
|
||||||
- name: 🔧 安装 gomobile
|
|
||||||
run: |
|
|
||||||
go install golang.org/x/mobile/cmd/gomobile@latest
|
|
||||||
gomobile init
|
|
||||||
|
|
||||||
- name: 📦 编译 libcore.aar
|
|
||||||
working-directory: libcore
|
|
||||||
run: |
|
|
||||||
echo "🚀 开始编译 libcore..."
|
|
||||||
make android
|
|
||||||
|
|
||||||
echo "✅ 编译完成,检查产物..."
|
|
||||||
ls -lh bin/
|
|
||||||
|
|
||||||
if [ -f "bin/libcore.aar" ]; then
|
|
||||||
echo "✅ libcore.aar 生成成功"
|
|
||||||
cp bin/libcore.aar ../android/app/libs/
|
|
||||||
else
|
|
||||||
echo "❌ libcore.aar 未找到"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: 📤 上传 libcore.aar
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: libcore-aar
|
|
||||||
path: android/app/libs/libcore.aar
|
|
||||||
retention-days: 7
|
|
||||||
|
|
||||||
build-apk:
|
|
||||||
name: 编译 Android APK
|
|
||||||
needs: build-libcore
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
build_type: [release] # 默认 release 构建
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: 📥 Checkout 代码
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: 🔧 设置 Java 环境
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
distribution: 'zulu'
|
|
||||||
java-version: '17'
|
|
||||||
|
|
||||||
- name: 🔧 设置 Flutter 环境
|
|
||||||
uses: subosito/flutter-action@v2
|
|
||||||
with:
|
|
||||||
flutter-version: '3.24.5'
|
|
||||||
channel: 'stable'
|
|
||||||
cache: true
|
|
||||||
|
|
||||||
- name: 📥 下载 libcore.aar
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: libcore-aar
|
|
||||||
path: android/app/libs/
|
|
||||||
|
|
||||||
- name: ⚙️ 配置 API 域名和 OSS 地址
|
|
||||||
run: |
|
|
||||||
CONFIG_FILE="lib/app/common/app_config.dart"
|
|
||||||
|
|
||||||
# 获取参数(手动触发时使用输入值,自动触发时使用默认值)
|
|
||||||
API_DOMAIN="${{ inputs.api_domain || 'api.maodag.top' }}"
|
|
||||||
OSS_URL_1="${{ inputs.oss_url_1 || 'https://ppp2.oss-cn-hongkong.aliyuncs.com/bear1.txt' }}"
|
|
||||||
OSS_URL_2="${{ inputs.oss_url_2 || 'https://xgp3.oss-ap-northeast-1.aliyuncs.com/bear1.txt' }}"
|
|
||||||
OSS_URL_3="${{ inputs.oss_url_3 || 'https://xpp4.oss-ap-northeast-2.aliyuncs.com/bear1.txt' }}"
|
|
||||||
OSS_URL_4="${{ inputs.oss_url_4 || 'https://xpp5.oss-ap-southeast-1.aliyuncs.com/bear1.txt' }}"
|
|
||||||
|
|
||||||
echo "🔧 配置构建参数:"
|
|
||||||
echo " API 域名: $API_DOMAIN"
|
|
||||||
echo " OSS 地址 1: $OSS_URL_1"
|
|
||||||
echo " OSS 地址 2: $OSS_URL_2"
|
|
||||||
echo " OSS 地址 3: $OSS_URL_3"
|
|
||||||
echo " OSS 地址 4: $OSS_URL_4"
|
|
||||||
|
|
||||||
# 替换 API 域名
|
|
||||||
sed -i "s|api\.maodag\.top|$API_DOMAIN|g" "$CONFIG_FILE"
|
|
||||||
|
|
||||||
# 替换 OSS 地址
|
|
||||||
sed -i "s|https://ppp2\.oss-cn-hongkong\.aliyuncs\.com/bear1\.txt|$OSS_URL_1|g" "$CONFIG_FILE"
|
|
||||||
sed -i "s|https://xgp3\.oss-ap-northeast-1\.aliyuncs\.com/bear1\.txt|$OSS_URL_2|g" "$CONFIG_FILE"
|
|
||||||
sed -i "s|https://xpp4\.oss-ap-northeast-2\.aliyuncs\.com/bear1\.txt|$OSS_URL_3|g" "$CONFIG_FILE"
|
|
||||||
sed -i "s|https://xpp5\.oss-ap-southeast-1\.aliyuncs\.com/bear1\.txt|$OSS_URL_4|g" "$CONFIG_FILE"
|
|
||||||
|
|
||||||
echo "✅ 配置替换完成"
|
|
||||||
echo ""
|
|
||||||
echo "📄 查看修改后的配置:"
|
|
||||||
grep -A 15 "kr_baseDomains" "$CONFIG_FILE" || true
|
|
||||||
|
|
||||||
- name: 📦 安装 Flutter 依赖
|
|
||||||
run: |
|
|
||||||
flutter pub get
|
|
||||||
flutter pub run build_runner build --delete-conflicting-outputs
|
|
||||||
|
|
||||||
- name: 🔨 构建 APK (Release)
|
|
||||||
run: |
|
|
||||||
flutter build apk --release --split-per-abi
|
|
||||||
|
|
||||||
- name: 📋 生成构建信息
|
|
||||||
id: build_info
|
|
||||||
run: |
|
|
||||||
BUILD_DATE=$(date '+%Y-%m-%d %H:%M:%S')
|
|
||||||
COMMIT_SHA=${GITHUB_SHA::7}
|
|
||||||
|
|
||||||
echo "build_date=$BUILD_DATE" >> $GITHUB_OUTPUT
|
|
||||||
echo "commit_sha=$COMMIT_SHA" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
echo "📊 构建信息:"
|
|
||||||
echo " - 日期: $BUILD_DATE"
|
|
||||||
echo " - 提交: $COMMIT_SHA"
|
|
||||||
echo " - 分支: ${GITHUB_REF#refs/heads/}"
|
|
||||||
|
|
||||||
- name: 📦 重命名 APK 文件
|
|
||||||
run: |
|
|
||||||
COMMIT_SHA=${{ steps.build_info.outputs.commit_sha }}
|
|
||||||
DATE=$(date '+%Y%m%d')
|
|
||||||
|
|
||||||
cd build/app/outputs/flutter-apk/
|
|
||||||
|
|
||||||
for file in app-*-release.apk; do
|
|
||||||
if [ -f "$file" ]; then
|
|
||||||
# 提取架构名称 (arm64-v8a, armeabi-v7a, x86_64)
|
|
||||||
ARCH=$(echo "$file" | sed "s/app-\(.*\)-release.apk/\1/")
|
|
||||||
NEW_NAME="BearVPN-${ARCH}-release-${DATE}-${COMMIT_SHA}.apk"
|
|
||||||
|
|
||||||
mv "$file" "$NEW_NAME"
|
|
||||||
|
|
||||||
# 计算文件大小和 MD5
|
|
||||||
SIZE=$(ls -lh "$NEW_NAME" | awk '{print $5}')
|
|
||||||
MD5=$(md5sum "$NEW_NAME" | awk '{print $1}')
|
|
||||||
|
|
||||||
echo "✅ $NEW_NAME"
|
|
||||||
echo " 大小: $SIZE"
|
|
||||||
echo " MD5: $MD5"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
ls -lh
|
|
||||||
|
|
||||||
- name: 📤 上传 APK (arm64-v8a)
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: apk-arm64-v8a-release
|
|
||||||
path: build/app/outputs/flutter-apk/*arm64-v8a*.apk
|
|
||||||
retention-days: 30
|
|
||||||
|
|
||||||
- name: 📤 上传 APK (armeabi-v7a)
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: apk-armeabi-v7a-release
|
|
||||||
path: build/app/outputs/flutter-apk/*armeabi-v7a*.apk
|
|
||||||
retention-days: 30
|
|
||||||
|
|
||||||
- name: 📤 上传 APK (x86_64)
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: apk-x86_64-release
|
|
||||||
path: build/app/outputs/flutter-apk/*x86_64*.apk
|
|
||||||
retention-days: 30
|
|
||||||
|
|
||||||
create-release:
|
|
||||||
name: 创建 GitHub Release
|
|
||||||
needs: build-apk
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: 📥 下载所有 APK
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
path: artifacts
|
|
||||||
pattern: apk-*
|
|
||||||
|
|
||||||
- name: 📋 生成 Release 说明
|
|
||||||
id: release_notes
|
|
||||||
run: |
|
|
||||||
cat > release_notes.md << 'EOF'
|
|
||||||
## 🎉 BearVPN Android 版本发布
|
|
||||||
|
|
||||||
### 📦 安装包说明
|
|
||||||
|
|
||||||
| 架构 | 适用设备 | 文件大小 |
|
|
||||||
|------|----------|----------|
|
|
||||||
| arm64-v8a | 64位 ARM 设备(推荐,现代手机) | ~40MB |
|
|
||||||
| armeabi-v7a | 32位 ARM 设备(老旧手机) | ~35MB |
|
|
||||||
| x86_64 | x86_64 模拟器 | ~45MB |
|
|
||||||
|
|
||||||
### ✨ 主要特性
|
|
||||||
|
|
||||||
- ✅ 支持 Shadowsocks/VLESS/Trojan/Hysteria2 等协议
|
|
||||||
- ✅ 内置 sing-box 核心
|
|
||||||
- ✅ 支持自定义路由规则
|
|
||||||
- ✅ 支持 URL Test 节点延迟测试
|
|
||||||
|
|
||||||
### 📥 下载建议
|
|
||||||
|
|
||||||
**不确定选哪个?** 下载 `arm64-v8a` 版本即可,适用于绝大多数现代 Android 手机。
|
|
||||||
|
|
||||||
### 🔒 文件校验
|
|
||||||
|
|
||||||
下载后请验证 MD5 以确保文件完整性(见下方 Assets 描述)。
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**构建信息:**
|
|
||||||
- 提交: ${GITHUB_SHA::7}
|
|
||||||
- 构建时间: $(date '+%Y-%m-%d %H:%M:%S UTC')
|
|
||||||
- Flutter: 3.24.5
|
|
||||||
- sing-box: latest
|
|
||||||
EOF
|
|
||||||
|
|
||||||
echo "release_notes<<EOF" >> $GITHUB_OUTPUT
|
|
||||||
cat release_notes.md >> $GITHUB_OUTPUT
|
|
||||||
echo "EOF" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: 🚀 创建 GitHub Release
|
|
||||||
uses: softprops/action-gh-release@v2
|
|
||||||
with:
|
|
||||||
files: |
|
|
||||||
artifacts/apk-arm64-v8a-*/*.apk
|
|
||||||
artifacts/apk-armeabi-v7a-*/*.apk
|
|
||||||
artifacts/apk-x86_64-*/*.apk
|
|
||||||
body: ${{ steps.release_notes.outputs.release_notes }}
|
|
||||||
draft: false
|
|
||||||
prerelease: false
|
|
||||||
generate_release_notes: true
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: 📢 构建成功通知
|
|
||||||
run: |
|
|
||||||
echo "✅ 构建完成!"
|
|
||||||
echo "📦 Release 已创建: ${{ github.ref }}"
|
|
||||||
echo "🔗 查看: https://github.com/${{ github.repository }}/releases"
|
|
||||||
@@ -1,142 +0,0 @@
|
|||||||
name: Build Clash Core
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- 'core/**'
|
|
||||||
- '.github/workflows/build-clash-core.yml'
|
|
||||||
pull_request:
|
|
||||||
paths:
|
|
||||||
- 'core/**'
|
|
||||||
workflow_dispatch: # 允许手动触发
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-android:
|
|
||||||
name: Build Android (${{ matrix.arch }})
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- arch: arm64
|
|
||||||
abi: arm64-v8a
|
|
||||||
cc: aarch64-linux-android29-clang
|
|
||||||
- arch: armv7
|
|
||||||
abi: armeabi-v7a
|
|
||||||
cc: armv7a-linux-androideabi29-clang
|
|
||||||
- arch: x86_64
|
|
||||||
abi: x86_64
|
|
||||||
cc: x86_64-linux-android29-clang
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: Setup Go
|
|
||||||
uses: actions/setup-go@v5
|
|
||||||
with:
|
|
||||||
go-version: '1.20'
|
|
||||||
cache: true
|
|
||||||
cache-dependency-path: core/go.sum
|
|
||||||
|
|
||||||
- name: Setup Android NDK
|
|
||||||
uses: nttld/setup-ndk@v1
|
|
||||||
with:
|
|
||||||
ndk-version: r25c
|
|
||||||
add-to-path: true
|
|
||||||
|
|
||||||
- name: Build Core
|
|
||||||
working-directory: core
|
|
||||||
run: make android-${{ matrix.arch }}
|
|
||||||
env:
|
|
||||||
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}
|
|
||||||
|
|
||||||
- name: Verify Build
|
|
||||||
run: |
|
|
||||||
echo "📦 检查编译产物..."
|
|
||||||
ls -lh android/app/src/main/jniLibs/${{ matrix.abi }}/libclash.so
|
|
||||||
file android/app/src/main/jniLibs/${{ matrix.abi }}/libclash.so
|
|
||||||
|
|
||||||
echo "🔍 验证导出函数..."
|
|
||||||
nm -D android/app/src/main/jniLibs/${{ matrix.abi }}/libclash.so | grep -E "(quickStart|getAndroidVpnOptions|startTUN)"
|
|
||||||
|
|
||||||
- name: Calculate MD5
|
|
||||||
id: md5
|
|
||||||
run: |
|
|
||||||
MD5=$(md5sum android/app/src/main/jniLibs/${{ matrix.abi }}/libclash.so | awk '{print $1}')
|
|
||||||
echo "md5=$MD5" >> $GITHUB_OUTPUT
|
|
||||||
echo "📋 MD5: $MD5"
|
|
||||||
|
|
||||||
- name: Upload Artifact
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: libclash-${{ matrix.abi }}
|
|
||||||
path: android/app/src/main/jniLibs/${{ matrix.abi }}/libclash.so
|
|
||||||
retention-days: 30
|
|
||||||
if-no-files-found: error
|
|
||||||
|
|
||||||
- name: Comment Build Info
|
|
||||||
if: github.event_name == 'pull_request'
|
|
||||||
uses: actions/github-script@v7
|
|
||||||
with:
|
|
||||||
script: |
|
|
||||||
const fs = require('fs');
|
|
||||||
const stats = fs.statSync('android/app/src/main/jniLibs/${{ matrix.abi }}/libclash.so');
|
|
||||||
const sizeMB = (stats.size / 1024 / 1024).toFixed(2);
|
|
||||||
|
|
||||||
github.rest.issues.createComment({
|
|
||||||
issue_number: context.issue.number,
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
body: `### 🔨 Clash Core 构建完成 (${{ matrix.abi }})
|
|
||||||
|
|
||||||
- **架构:** ${{ matrix.abi }}
|
|
||||||
- **大小:** ${sizeMB} MB
|
|
||||||
- **MD5:** ${{ steps.md5.outputs.md5 }}
|
|
||||||
- **提交:** ${context.sha.substring(0, 7)}
|
|
||||||
|
|
||||||
[下载构建产物](https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId})`
|
|
||||||
});
|
|
||||||
|
|
||||||
create-release:
|
|
||||||
name: Create Release
|
|
||||||
needs: build-android
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Download All Artifacts
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
path: artifacts
|
|
||||||
|
|
||||||
- name: Create Release Archive
|
|
||||||
run: |
|
|
||||||
cd artifacts
|
|
||||||
tar -czf clash-core-android-all.tar.gz libclash-*/*.so
|
|
||||||
ls -lh clash-core-android-all.tar.gz
|
|
||||||
|
|
||||||
- name: Create GitHub Release
|
|
||||||
uses: softprops/action-gh-release@v1
|
|
||||||
with:
|
|
||||||
files: artifacts/clash-core-android-all.tar.gz
|
|
||||||
body: |
|
|
||||||
## Clash Meta 核心 Android 构建
|
|
||||||
|
|
||||||
此版本包含所有 Android 架构的预编译二进制文件:
|
|
||||||
- arm64-v8a (ARM64)
|
|
||||||
- armeabi-v7a (ARMv7)
|
|
||||||
- x86_64 (模拟器)
|
|
||||||
|
|
||||||
**使用方法:**
|
|
||||||
```bash
|
|
||||||
tar -xzf clash-core-android-all.tar.gz
|
|
||||||
cp libclash-*/libclash.so android/app/src/main/jniLibs/
|
|
||||||
```
|
|
||||||
draft: false
|
|
||||||
prerelease: false
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
@@ -1,950 +0,0 @@
|
|||||||
name: Build Multi-Platform
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- develop
|
|
||||||
tags:
|
|
||||||
- 'v*'
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
build_type:
|
|
||||||
description: '构建类型'
|
|
||||||
required: true
|
|
||||||
default: 'release'
|
|
||||||
type: choice
|
|
||||||
options:
|
|
||||||
- debug
|
|
||||||
- release
|
|
||||||
api_domain:
|
|
||||||
description: 'API 域名'
|
|
||||||
required: true
|
|
||||||
default: 'api.maodag.top'
|
|
||||||
type: string
|
|
||||||
oss_url_1:
|
|
||||||
description: 'OSS 配置地址 1'
|
|
||||||
required: true
|
|
||||||
default: 'https://ppp2.oss-cn-hongkong.aliyuncs.com/bear1.txt'
|
|
||||||
type: string
|
|
||||||
oss_url_2:
|
|
||||||
description: 'OSS 配置地址 2'
|
|
||||||
required: true
|
|
||||||
default: 'https://xgp3.oss-ap-northeast-1.aliyuncs.com/bear1.txt'
|
|
||||||
type: string
|
|
||||||
oss_url_3:
|
|
||||||
description: 'OSS 配置地址 3'
|
|
||||||
required: true
|
|
||||||
default: 'https://xpp4.oss-ap-northeast-2.aliyuncs.com/bear1.txt'
|
|
||||||
type: string
|
|
||||||
oss_url_4:
|
|
||||||
description: 'OSS 配置地址 4'
|
|
||||||
required: true
|
|
||||||
default: 'https://xpp5.oss-ap-southeast-1.aliyuncs.com/bear1.txt'
|
|
||||||
type: string
|
|
||||||
encryption_key:
|
|
||||||
description: '加密密钥'
|
|
||||||
required: true
|
|
||||||
default: 'c0qhq99a-nq8h-ropg-wrlc-ezj4dlkxqpzx'
|
|
||||||
type: string
|
|
||||||
platforms:
|
|
||||||
description: '构建平台 (多选: android,windows,macos,linux,ios)'
|
|
||||||
required: true
|
|
||||||
default: 'android,windows,macos,linux'
|
|
||||||
type: string
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
# ==================== 编译 libcore (iOS/tvOS) ====================
|
|
||||||
build-libcore-ios:
|
|
||||||
name: 编译 libcore (iOS/tvOS)
|
|
||||||
runs-on: macos-latest
|
|
||||||
if: contains(inputs.platforms || 'ios', 'ios')
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: 📥 Checkout 代码
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: 🔧 设置 Go 环境
|
|
||||||
uses: actions/setup-go@v5
|
|
||||||
with:
|
|
||||||
go-version: '1.23'
|
|
||||||
cache: true
|
|
||||||
cache-dependency-path: libcore/go.sum
|
|
||||||
|
|
||||||
- name: 🔧 设置 Node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: '20'
|
|
||||||
|
|
||||||
- name: 📦 编译 libcore.xcframework (支持 iOS/tvOS)
|
|
||||||
working-directory: libcore
|
|
||||||
run: |
|
|
||||||
echo "🚀 开始编译 iOS/tvOS libcore..."
|
|
||||||
make ios-full
|
|
||||||
|
|
||||||
if [ -d "bin/Libcore.xcframework" ]; then
|
|
||||||
echo "✅ iOS/tvOS libcore 编译成功"
|
|
||||||
ls -lh bin/
|
|
||||||
else
|
|
||||||
echo "❌ iOS/tvOS libcore 编译失败"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: 📤 上传 iOS libcore
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: libcore-ios
|
|
||||||
path: libcore/bin/Libcore.xcframework
|
|
||||||
retention-days: 7
|
|
||||||
|
|
||||||
# ==================== 编译 libcore (Android) ====================
|
|
||||||
build-libcore-android:
|
|
||||||
name: 编译 libcore (Android)
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: contains(inputs.platforms || 'android', 'android')
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: 📥 Checkout 代码
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: 🔧 设置 Go 环境
|
|
||||||
uses: actions/setup-go@v5
|
|
||||||
with:
|
|
||||||
go-version: '1.23'
|
|
||||||
cache: true
|
|
||||||
cache-dependency-path: libcore/go.sum
|
|
||||||
|
|
||||||
- name: 🔧 设置 Node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: '20'
|
|
||||||
|
|
||||||
- name: 🔧 设置 Java
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
distribution: 'zulu'
|
|
||||||
java-version: '17'
|
|
||||||
|
|
||||||
- name: 🔧 安装 gomobile
|
|
||||||
run: |
|
|
||||||
go install golang.org/x/mobile/cmd/gomobile@latest
|
|
||||||
gomobile init
|
|
||||||
|
|
||||||
- name: 📦 编译 libcore.aar
|
|
||||||
working-directory: libcore
|
|
||||||
run: |
|
|
||||||
echo "🚀 开始编译 Android libcore..."
|
|
||||||
make android
|
|
||||||
|
|
||||||
if [ -f "bin/libcore.aar" ]; then
|
|
||||||
echo "✅ libcore.aar 生成成功"
|
|
||||||
ls -lh bin/libcore.aar
|
|
||||||
else
|
|
||||||
echo "❌ libcore.aar 未找到"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: 📤 上传 libcore.aar
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: libcore-android
|
|
||||||
path: libcore/bin/libcore.aar
|
|
||||||
retention-days: 7
|
|
||||||
|
|
||||||
# ==================== 编译 libcore (Windows) ====================
|
|
||||||
build-libcore-windows:
|
|
||||||
name: 编译 libcore (Windows)
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: contains(inputs.platforms || 'windows', 'windows')
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: 📥 Checkout 代码
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: 🔧 设置 Go 环境
|
|
||||||
uses: actions/setup-go@v5
|
|
||||||
with:
|
|
||||||
go-version: '1.23'
|
|
||||||
cache: true
|
|
||||||
cache-dependency-path: libcore/go.sum
|
|
||||||
|
|
||||||
- name: 🔧 设置 Node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: '20'
|
|
||||||
|
|
||||||
- name: 🔧 安装 MinGW (交叉编译工具)
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y mingw-w64
|
|
||||||
|
|
||||||
- name: 📦 编译 libcore.dll
|
|
||||||
working-directory: libcore
|
|
||||||
run: |
|
|
||||||
echo "🚀 开始编译 Windows libcore..."
|
|
||||||
make windows-amd64
|
|
||||||
|
|
||||||
if [ -f "bin/libcore.dll" ] && [ -f "bin/HiddifyCli.exe" ]; then
|
|
||||||
echo "✅ Windows libcore 编译成功"
|
|
||||||
ls -lh bin/libcore.dll bin/HiddifyCli.exe
|
|
||||||
else
|
|
||||||
echo "❌ Windows libcore 编译失败"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: 📤 上传 Windows libcore
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: libcore-windows
|
|
||||||
path: |
|
|
||||||
libcore/bin/libcore.dll
|
|
||||||
libcore/bin/HiddifyCli.exe
|
|
||||||
libcore/bin/webui/**
|
|
||||||
retention-days: 7
|
|
||||||
|
|
||||||
# ==================== 编译 libcore (macOS) ====================
|
|
||||||
build-libcore-macos:
|
|
||||||
name: 编译 libcore (macOS)
|
|
||||||
runs-on: macos-latest
|
|
||||||
if: contains(inputs.platforms || 'macos', 'macos')
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: 📥 Checkout 代码
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: 🔧 设置 Go 环境
|
|
||||||
uses: actions/setup-go@v5
|
|
||||||
with:
|
|
||||||
go-version: '1.23'
|
|
||||||
cache: true
|
|
||||||
cache-dependency-path: libcore/go.sum
|
|
||||||
|
|
||||||
- name: 🔧 设置 Node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: '20'
|
|
||||||
|
|
||||||
- name: 📦 编译 libcore.dylib
|
|
||||||
working-directory: libcore
|
|
||||||
run: |
|
|
||||||
echo "🚀 开始编译 macOS libcore..."
|
|
||||||
make macos-universal
|
|
||||||
|
|
||||||
if [ -f "bin/libcore.dylib" ] && [ -f "bin/HiddifyCli" ]; then
|
|
||||||
echo "✅ macOS libcore 编译成功"
|
|
||||||
ls -lh bin/libcore.dylib bin/HiddifyCli
|
|
||||||
else
|
|
||||||
echo "❌ macOS libcore 编译失败"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: 📤 上传 macOS libcore
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: libcore-macos
|
|
||||||
path: |
|
|
||||||
libcore/bin/libcore.dylib
|
|
||||||
libcore/bin/HiddifyCli
|
|
||||||
retention-days: 7
|
|
||||||
|
|
||||||
# ==================== 编译 libcore (Linux) ====================
|
|
||||||
build-libcore-linux:
|
|
||||||
name: 编译 libcore (Linux)
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: contains(inputs.platforms || 'linux', 'linux')
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: 📥 Checkout 代码
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: 🔧 设置 Go 环境
|
|
||||||
uses: actions/setup-go@v5
|
|
||||||
with:
|
|
||||||
go-version: '1.23'
|
|
||||||
cache: true
|
|
||||||
cache-dependency-path: libcore/go.sum
|
|
||||||
|
|
||||||
- name: 🔧 设置 Node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: '20'
|
|
||||||
|
|
||||||
- name: 📦 编译 libcore.so
|
|
||||||
working-directory: libcore
|
|
||||||
run: |
|
|
||||||
echo "🚀 开始编译 Linux libcore..."
|
|
||||||
make linux-amd64
|
|
||||||
|
|
||||||
if [ -f "bin/lib/libcore.so" ] && [ -f "bin/HiddifyCli" ]; then
|
|
||||||
echo "✅ Linux libcore 编译成功"
|
|
||||||
ls -lh bin/lib/libcore.so bin/HiddifyCli
|
|
||||||
else
|
|
||||||
echo "❌ Linux libcore 编译失败"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: 📤 上传 Linux libcore
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: libcore-linux
|
|
||||||
path: |
|
|
||||||
libcore/bin/lib/libcore.so
|
|
||||||
libcore/bin/HiddifyCli
|
|
||||||
libcore/bin/webui/**
|
|
||||||
retention-days: 7
|
|
||||||
|
|
||||||
# ==================== Android 构建 ====================
|
|
||||||
build-android:
|
|
||||||
name: 构建 Android APK
|
|
||||||
needs: build-libcore-android
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: contains(inputs.platforms || 'android', 'android')
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: 📥 Checkout 代码
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: 🔧 设置 Java
|
|
||||||
uses: actions/setup-java@v4
|
|
||||||
with:
|
|
||||||
distribution: 'zulu'
|
|
||||||
java-version: '17'
|
|
||||||
|
|
||||||
- name: 🔧 设置 Flutter
|
|
||||||
uses: subosito/flutter-action@v2
|
|
||||||
with:
|
|
||||||
flutter-version: '3.24.5'
|
|
||||||
channel: 'stable'
|
|
||||||
cache: true
|
|
||||||
|
|
||||||
- name: 📥 下载 libcore.aar
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: libcore-android
|
|
||||||
path: android/app/libs/
|
|
||||||
|
|
||||||
- name: ⚙️ 配置 API、OSS 和加密密钥
|
|
||||||
run: |
|
|
||||||
CONFIG_FILE="lib/app/common/app_config.dart"
|
|
||||||
API_DOMAIN="${{ inputs.api_domain || 'api.maodag.top' }}"
|
|
||||||
OSS_URL_1="${{ inputs.oss_url_1 || 'https://ppp2.oss-cn-hongkong.aliyuncs.com/bear1.txt' }}"
|
|
||||||
OSS_URL_2="${{ inputs.oss_url_2 || 'https://xgp3.oss-ap-northeast-1.aliyuncs.com/bear1.txt' }}"
|
|
||||||
OSS_URL_3="${{ inputs.oss_url_3 || 'https://xpp4.oss-ap-northeast-2.aliyuncs.com/bear1.txt' }}"
|
|
||||||
OSS_URL_4="${{ inputs.oss_url_4 || 'https://xpp5.oss-ap-southeast-1.aliyuncs.com/bear1.txt' }}"
|
|
||||||
ENCRYPTION_KEY="${{ inputs.encryption_key || 'c0qhq99a-nq8h-ropg-wrlc-ezj4dlkxqpzx' }}"
|
|
||||||
|
|
||||||
echo "🔧 配置参数:"
|
|
||||||
echo " API: $API_DOMAIN"
|
|
||||||
echo " OSS: $OSS_URL_1"
|
|
||||||
echo " 密钥: ${ENCRYPTION_KEY:0:10}..."
|
|
||||||
|
|
||||||
# 转义密钥中的特殊字符(使用 perl 兼容所有平台)
|
|
||||||
ENCRYPTION_KEY_ESCAPED=$(echo "$ENCRYPTION_KEY" | perl -pe 's/([\[\].*^$()+?{|\\])/\\$1/g')
|
|
||||||
|
|
||||||
sed -i "s|api\.maodag\.top|$API_DOMAIN|g" "$CONFIG_FILE"
|
|
||||||
sed -i "s|https://ppp2\.oss-cn-hongkong\.aliyuncs\.com/bear1\.txt|$OSS_URL_1|g" "$CONFIG_FILE"
|
|
||||||
sed -i "s|https://xgp3\.oss-ap-northeast-1\.aliyuncs\.com/bear1\.txt|$OSS_URL_2|g" "$CONFIG_FILE"
|
|
||||||
sed -i "s|https://xpp4\.oss-ap-northeast-2\.aliyuncs\.com/bear1\.txt|$OSS_URL_3|g" "$CONFIG_FILE"
|
|
||||||
sed -i "s|https://xpp5\.oss-ap-southeast-1\.aliyuncs\.com/bear1\.txt|$OSS_URL_4|g" "$CONFIG_FILE"
|
|
||||||
sed -i "s|c0qhq99a-nq8h-ropg-wrlc-ezj4dlkxqpzx|$ENCRYPTION_KEY_ESCAPED|g" "$CONFIG_FILE"
|
|
||||||
|
|
||||||
echo "✅ 配置完成"
|
|
||||||
|
|
||||||
- name: 📦 安装 Flutter 依赖
|
|
||||||
run: |
|
|
||||||
flutter pub get
|
|
||||||
flutter pub run build_runner build --delete-conflicting-outputs
|
|
||||||
|
|
||||||
- name: 🔨 构建 APK (Release)
|
|
||||||
run: |
|
|
||||||
flutter build apk --release --split-per-abi
|
|
||||||
|
|
||||||
- name: 📦 重命名 APK
|
|
||||||
run: |
|
|
||||||
COMMIT_SHA=${GITHUB_SHA::7}
|
|
||||||
DATE=$(date '+%Y%m%d')
|
|
||||||
cd build/app/outputs/flutter-apk/
|
|
||||||
|
|
||||||
for file in app-*-release.apk; do
|
|
||||||
if [ -f "$file" ]; then
|
|
||||||
ARCH=$(echo "$file" | sed "s/app-\(.*\)-release.apk/\1/")
|
|
||||||
NEW_NAME="BearVPN-android-${ARCH}-release-${DATE}-${COMMIT_SHA}.apk"
|
|
||||||
mv "$file" "$NEW_NAME"
|
|
||||||
echo "✅ $NEW_NAME"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
- name: 📤 上传 APK
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: android-apk
|
|
||||||
path: build/app/outputs/flutter-apk/*.apk
|
|
||||||
retention-days: 30
|
|
||||||
|
|
||||||
# ==================== Windows 构建 ====================
|
|
||||||
build-windows:
|
|
||||||
name: 构建 Windows
|
|
||||||
needs: build-libcore-windows
|
|
||||||
runs-on: windows-latest
|
|
||||||
if: contains(inputs.platforms || 'windows', 'windows')
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: 📥 Checkout 代码
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: 🔧 设置 Flutter
|
|
||||||
uses: subosito/flutter-action@v2
|
|
||||||
with:
|
|
||||||
flutter-version: '3.24.5'
|
|
||||||
channel: 'stable'
|
|
||||||
cache: true
|
|
||||||
|
|
||||||
- name: 📥 下载 Windows libcore
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: libcore-windows
|
|
||||||
path: libcore_windows_temp
|
|
||||||
|
|
||||||
- name: 🔧 复制 libcore 文件到正确位置并重命名
|
|
||||||
run: |
|
|
||||||
Write-Host "📋 开始复制 libcore 文件..."
|
|
||||||
|
|
||||||
# 显示下载的文件结构
|
|
||||||
Write-Host "🔍 检查下载的文件结构:"
|
|
||||||
Get-ChildItem -Recurse libcore_windows_temp -ErrorAction SilentlyContinue | Format-Table Name, FullName
|
|
||||||
|
|
||||||
# 确保目标目录存在
|
|
||||||
New-Item -ItemType Directory -Force -Path "libcore\bin" | Out-Null
|
|
||||||
|
|
||||||
# 查找 libcore.dll(可能在 libcore_windows_temp/bin/ 或 libcore_windows_temp/libcore/bin/)
|
|
||||||
$dllFiles = Get-ChildItem -Path libcore_windows_temp -Recurse -Filter "libcore.dll" -ErrorAction SilentlyContinue
|
|
||||||
if ($dllFiles) {
|
|
||||||
$sourceDll = $dllFiles[0].FullName
|
|
||||||
Write-Host "✅ 找到 libcore.dll: $sourceDll"
|
|
||||||
Copy-Item $sourceDll "libcore\bin\libcore.dll" -Force
|
|
||||||
} else {
|
|
||||||
Write-Host "❌ 未找到 libcore.dll"
|
|
||||||
Write-Host "当前目录内容:"
|
|
||||||
Get-ChildItem -Path . -Recurse | Select-Object -First 20 | Format-Table Name, FullName
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# 查找并复制 HiddifyCli.exe,重命名为 BearVPNCli.exe
|
|
||||||
$exeFiles = Get-ChildItem -Path libcore_windows_temp -Recurse -Filter "HiddifyCli.exe" -ErrorAction SilentlyContinue
|
|
||||||
if ($exeFiles) {
|
|
||||||
$sourceExe = $exeFiles[0].FullName
|
|
||||||
Write-Host "✅ 找到 HiddifyCli.exe: $sourceExe"
|
|
||||||
Write-Host "📝 复制并重命名为 BearVPNCli.exe"
|
|
||||||
Copy-Item $sourceExe "libcore\bin\BearVPNCli.exe" -Force
|
|
||||||
Write-Host "✅ 重命名完成:HiddifyCli.exe → BearVPNCli.exe"
|
|
||||||
} else {
|
|
||||||
Write-Host "⚠️ 未找到 HiddifyCli.exe(这不是致命错误)"
|
|
||||||
}
|
|
||||||
|
|
||||||
# 复制 webui 目录
|
|
||||||
$webuiDir = Get-ChildItem -Path libcore_windows_temp -Recurse -Filter "webui" -Directory -ErrorAction SilentlyContinue
|
|
||||||
if ($webuiDir) {
|
|
||||||
Write-Host "✅ 找到 webui 目录: $($webuiDir[0].FullName)"
|
|
||||||
Copy-Item -Path $webuiDir[0].FullName -Destination "libcore\bin\webui" -Recurse -Force
|
|
||||||
} else {
|
|
||||||
Write-Host "⚠️ 未找到 webui 目录(这不是致命错误)"
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host ""
|
|
||||||
Write-Host "📄 验证复制后的文件结构:"
|
|
||||||
if (Test-Path "libcore\bin") {
|
|
||||||
Get-ChildItem libcore\bin\ -Recurse | Format-Table Name, FullName, Length
|
|
||||||
} else {
|
|
||||||
Write-Host "❌ libcore\bin 目录不存在"
|
|
||||||
}
|
|
||||||
|
|
||||||
if (-not (Test-Path "libcore\bin\libcore.dll")) {
|
|
||||||
Write-Host "❌ libcore.dll 未正确复制到 libcore\bin\"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "✅ libcore 文件复制完成"
|
|
||||||
shell: pwsh
|
|
||||||
|
|
||||||
- name: ⚙️ 配置 API、OSS 和加密密钥
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
CONFIG_FILE="lib/app/common/app_config.dart"
|
|
||||||
API_DOMAIN="${{ inputs.api_domain || 'api.maodag.top' }}"
|
|
||||||
OSS_URL_1="${{ inputs.oss_url_1 || 'https://ppp2.oss-cn-hongkong.aliyuncs.com/bear1.txt' }}"
|
|
||||||
OSS_URL_2="${{ inputs.oss_url_2 || 'https://xgp3.oss-ap-northeast-1.aliyuncs.com/bear1.txt' }}"
|
|
||||||
OSS_URL_3="${{ inputs.oss_url_3 || 'https://xpp4.oss-ap-northeast-2.aliyuncs.com/bear1.txt' }}"
|
|
||||||
OSS_URL_4="${{ inputs.oss_url_4 || 'https://xpp5.oss-ap-southeast-1.aliyuncs.com/bear1.txt' }}"
|
|
||||||
ENCRYPTION_KEY="${{ inputs.encryption_key || 'c0qhq99a-nq8h-ropg-wrlc-ezj4dlkxqpzx' }}"
|
|
||||||
|
|
||||||
ENCRYPTION_KEY_ESCAPED=$(echo "$ENCRYPTION_KEY" | perl -pe 's/([\[\].*^$()+?{|\\])/\\$1/g')
|
|
||||||
|
|
||||||
sed -i "s|api\.maodag\.top|$API_DOMAIN|g" "$CONFIG_FILE"
|
|
||||||
sed -i "s|https://ppp2\.oss-cn-hongkong\.aliyuncs\.com/bear1\.txt|$OSS_URL_1|g" "$CONFIG_FILE"
|
|
||||||
sed -i "s|https://xgp3\.oss-ap-northeast-1\.aliyuncs\.com/bear1\.txt|$OSS_URL_2|g" "$CONFIG_FILE"
|
|
||||||
sed -i "s|https://xpp4\.oss-ap-northeast-2\.aliyuncs\.com/bear1\.txt|$OSS_URL_3|g" "$CONFIG_FILE"
|
|
||||||
sed -i "s|https://xpp5\.oss-ap-southeast-1\.aliyuncs\.com/bear1\.txt|$OSS_URL_4|g" "$CONFIG_FILE"
|
|
||||||
sed -i "s|c0qhq99a-nq8h-ropg-wrlc-ezj4dlkxqpzx|$ENCRYPTION_KEY_ESCAPED|g" "$CONFIG_FILE"
|
|
||||||
|
|
||||||
- name: 📦 安装 Flutter 依赖
|
|
||||||
run: |
|
|
||||||
flutter pub get
|
|
||||||
|
|
||||||
- name: 🔧 生成代码文件 (build_runner)
|
|
||||||
run: |
|
|
||||||
echo "🔧 开始运行 build_runner..."
|
|
||||||
flutter pub run build_runner build --delete-conflicting-outputs
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo "✅ build_runner 完成,检查生成的文件..."
|
|
||||||
|
|
||||||
if (Test-Path "lib\singbox\model\singbox_status.freezed.dart") {
|
|
||||||
echo "✅ singbox_status.freezed.dart 已生成"
|
|
||||||
} else {
|
|
||||||
echo "❌ singbox_status.freezed.dart 未生成"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Test-Path "lib\singbox\service\singbox_service_provider.g.dart") {
|
|
||||||
echo "✅ singbox_service_provider.g.dart 已生成"
|
|
||||||
} else {
|
|
||||||
echo "❌ singbox_service_provider.g.dart 未生成"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
shell: pwsh
|
|
||||||
|
|
||||||
- name: 🔧 验证 libcore 文件存在
|
|
||||||
run: |
|
|
||||||
Write-Host "📋 验证 libcore 文件是否存在..."
|
|
||||||
|
|
||||||
if (Test-Path "libcore\bin\libcore.dll") {
|
|
||||||
$dllInfo = Get-Item "libcore\bin\libcore.dll"
|
|
||||||
Write-Host "✅ libcore.dll 存在: $($dllInfo.FullName) - 大小: $($dllInfo.Length) bytes"
|
|
||||||
} else {
|
|
||||||
Write-Host "❌ libcore.dll 不存在"
|
|
||||||
Write-Host "当前 libcore\bin 目录内容:"
|
|
||||||
if (Test-Path "libcore\bin") {
|
|
||||||
Get-ChildItem "libcore\bin" | Format-Table Name, FullName, Length
|
|
||||||
} else {
|
|
||||||
Write-Host "libcore\bin 目录不存在"
|
|
||||||
}
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Test-Path "libcore\bin\BearVPNCli.exe") {
|
|
||||||
$exeInfo = Get-Item "libcore\bin\BearVPNCli.exe"
|
|
||||||
Write-Host "✅ BearVPNCli.exe 存在: $($exeInfo.FullName) - 大小: $($exeInfo.Length) bytes"
|
|
||||||
} else {
|
|
||||||
Write-Host "⚠️ BearVPNCli.exe 不存在"
|
|
||||||
}
|
|
||||||
shell: pwsh
|
|
||||||
|
|
||||||
- name: 🔨 构建 Windows (Release)
|
|
||||||
run: |
|
|
||||||
flutter build windows --release
|
|
||||||
|
|
||||||
- name: 🔍 验证 Windows 文件结构
|
|
||||||
run: |
|
|
||||||
Write-Host "📋 检查 Release 目录文件结构..."
|
|
||||||
|
|
||||||
$releaseDir = "build\windows\x64\runner\Release"
|
|
||||||
if (Test-Path $releaseDir) {
|
|
||||||
Write-Host "✅ Release 目录存在"
|
|
||||||
Write-Host ""
|
|
||||||
Write-Host "📄 文件列表:"
|
|
||||||
Get-ChildItem $releaseDir | Format-Table Name, Length, LastWriteTime
|
|
||||||
|
|
||||||
# 检查关键文件
|
|
||||||
if (Test-Path "$releaseDir\BearVPN.exe") {
|
|
||||||
Write-Host "✅ BearVPN.exe 存在"
|
|
||||||
} else {
|
|
||||||
Write-Host "❌ BearVPN.exe 不存在"
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Test-Path "$releaseDir\BearVPNCli.exe") {
|
|
||||||
Write-Host "✅ BearVPNCli.exe 存在"
|
|
||||||
} else {
|
|
||||||
Write-Host "⚠️ BearVPNCli.exe 不存在"
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Test-Path "$releaseDir\libcore.dll") {
|
|
||||||
Write-Host "✅ libcore.dll 存在"
|
|
||||||
} else {
|
|
||||||
Write-Host "❌ libcore.dll 不存在"
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "❌ Release 目录不存在"
|
|
||||||
}
|
|
||||||
shell: pwsh
|
|
||||||
|
|
||||||
- name: 📦 打包 Windows
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
COMMIT_SHA=${GITHUB_SHA::7}
|
|
||||||
DATE=$(date '+%Y%m%d')
|
|
||||||
|
|
||||||
cd build/windows/x64/runner/Release
|
|
||||||
7z a -tzip "../../../../../BearVPN-windows-x64-release-${DATE}-${COMMIT_SHA}.zip" ./*
|
|
||||||
|
|
||||||
- name: 📤 上传 Windows
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: windows-x64
|
|
||||||
path: BearVPN-windows-*.zip
|
|
||||||
retention-days: 30
|
|
||||||
|
|
||||||
# ==================== macOS 构建 ====================
|
|
||||||
build-macos:
|
|
||||||
name: 构建 macOS
|
|
||||||
needs: build-libcore-macos
|
|
||||||
runs-on: macos-latest
|
|
||||||
if: contains(inputs.platforms || 'macos', 'macos')
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: 📥 Checkout 代码
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: 🔧 设置 Flutter
|
|
||||||
uses: subosito/flutter-action@v2
|
|
||||||
with:
|
|
||||||
flutter-version: '3.24.5'
|
|
||||||
channel: 'stable'
|
|
||||||
cache: true
|
|
||||||
|
|
||||||
- name: 📥 下载 macOS libcore
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: libcore-macos
|
|
||||||
path: libcore/bin/
|
|
||||||
|
|
||||||
- name: 🔧 设置 libcore 执行权限
|
|
||||||
run: |
|
|
||||||
chmod +x libcore/bin/HiddifyCli
|
|
||||||
|
|
||||||
- name: ⚙️ 配置 API、OSS 和加密密钥
|
|
||||||
run: |
|
|
||||||
CONFIG_FILE="lib/app/common/app_config.dart"
|
|
||||||
API_DOMAIN="${{ inputs.api_domain || 'api.maodag.top' }}"
|
|
||||||
OSS_URL_1="${{ inputs.oss_url_1 || 'https://ppp2.oss-cn-hongkong.aliyuncs.com/bear1.txt' }}"
|
|
||||||
OSS_URL_2="${{ inputs.oss_url_2 || 'https://xgp3.oss-ap-northeast-1.aliyuncs.com/bear1.txt' }}"
|
|
||||||
OSS_URL_3="${{ inputs.oss_url_3 || 'https://xpp4.oss-ap-northeast-2.aliyuncs.com/bear1.txt' }}"
|
|
||||||
OSS_URL_4="${{ inputs.oss_url_4 || 'https://xpp5.oss-ap-southeast-1.aliyuncs.com/bear1.txt' }}"
|
|
||||||
ENCRYPTION_KEY="${{ inputs.encryption_key || 'c0qhq99a-nq8h-ropg-wrlc-ezj4dlkxqpzx' }}"
|
|
||||||
|
|
||||||
# macOS 使用 BSD sed,转义特殊字符
|
|
||||||
# 使用 perl 来转义特殊字符,更可靠
|
|
||||||
ENCRYPTION_KEY_ESCAPED=$(echo "$ENCRYPTION_KEY" | perl -pe 's/([\[\].*^$()+?{|\\])/\\$1/g')
|
|
||||||
|
|
||||||
echo "🔧 配置参数:"
|
|
||||||
echo " API: $API_DOMAIN"
|
|
||||||
echo " 密钥: ${ENCRYPTION_KEY:0:10}..."
|
|
||||||
|
|
||||||
# macOS sed 需要使用 -i '' 和正确的语法
|
|
||||||
sed -i '' "s|api\.maodag\.top|$API_DOMAIN|g" "$CONFIG_FILE"
|
|
||||||
sed -i '' "s|https://ppp2\.oss-cn-hongkong\.aliyuncs\.com/bear1\.txt|$OSS_URL_1|g" "$CONFIG_FILE"
|
|
||||||
sed -i '' "s|https://xgp3\.oss-ap-northeast-1\.aliyuncs\.com/bear1\.txt|$OSS_URL_2|g" "$CONFIG_FILE"
|
|
||||||
sed -i '' "s|https://xpp4\.oss-ap-northeast-2\.aliyuncs\.com/bear1\.txt|$OSS_URL_3|g" "$CONFIG_FILE"
|
|
||||||
sed -i '' "s|https://xpp5\.oss-ap-southeast-1\.aliyuncs\.com/bear1\.txt|$OSS_URL_4|g" "$CONFIG_FILE"
|
|
||||||
|
|
||||||
# 使用不同的分隔符避免转义问题
|
|
||||||
sed -i '' "s|c0qhq99a-nq8h-ropg-wrlc-ezj4dlkxqpzx|$ENCRYPTION_KEY_ESCAPED|g" "$CONFIG_FILE"
|
|
||||||
|
|
||||||
echo "✅ 配置完成"
|
|
||||||
|
|
||||||
- name: 📦 安装 Flutter 依赖
|
|
||||||
run: |
|
|
||||||
flutter pub get
|
|
||||||
flutter pub run build_runner build --delete-conflicting-outputs
|
|
||||||
|
|
||||||
- name: 🔨 构建 macOS (Release)
|
|
||||||
run: |
|
|
||||||
flutter build macos --release
|
|
||||||
|
|
||||||
- name: 📦 打包 macOS
|
|
||||||
run: |
|
|
||||||
COMMIT_SHA=${GITHUB_SHA::7}
|
|
||||||
DATE=$(date '+%Y%m%d')
|
|
||||||
|
|
||||||
cd build/macos/Build/Products/Release
|
|
||||||
zip -r -y "../../../../../BearVPN-macos-release-${DATE}-${COMMIT_SHA}.zip" BearVPN.app
|
|
||||||
|
|
||||||
- name: 📤 上传 macOS
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: macos-app
|
|
||||||
path: BearVPN-macos-*.zip
|
|
||||||
retention-days: 30
|
|
||||||
|
|
||||||
# ==================== Linux 构建 ====================
|
|
||||||
build-linux:
|
|
||||||
name: 构建 Linux
|
|
||||||
needs: build-libcore-linux
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: contains(inputs.platforms || 'linux', 'linux')
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: 📥 Checkout 代码
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: 🔧 安装 Linux 依赖
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y \
|
|
||||||
clang \
|
|
||||||
cmake \
|
|
||||||
ninja-build \
|
|
||||||
pkg-config \
|
|
||||||
libgtk-3-dev \
|
|
||||||
liblzma-dev \
|
|
||||||
libstdc++-12-dev \
|
|
||||||
libayatana-appindicator3-dev
|
|
||||||
|
|
||||||
- name: 🔧 设置 Flutter
|
|
||||||
uses: subosito/flutter-action@v2
|
|
||||||
with:
|
|
||||||
flutter-version: '3.24.5'
|
|
||||||
channel: 'stable'
|
|
||||||
cache: true
|
|
||||||
|
|
||||||
- name: 📥 下载 Linux libcore
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: libcore-linux
|
|
||||||
path: libcore/bin/
|
|
||||||
|
|
||||||
- name: 🔧 设置 libcore 执行权限
|
|
||||||
run: |
|
|
||||||
chmod +x libcore/bin/HiddifyCli
|
|
||||||
|
|
||||||
- name: ⚙️ 配置 API、OSS 和加密密钥
|
|
||||||
run: |
|
|
||||||
CONFIG_FILE="lib/app/common/app_config.dart"
|
|
||||||
API_DOMAIN="${{ inputs.api_domain || 'api.maodag.top' }}"
|
|
||||||
OSS_URL_1="${{ inputs.oss_url_1 || 'https://ppp2.oss-cn-hongkong.aliyuncs.com/bear1.txt' }}"
|
|
||||||
OSS_URL_2="${{ inputs.oss_url_2 || 'https://xgp3.oss-ap-northeast-1.aliyuncs.com/bear1.txt' }}"
|
|
||||||
OSS_URL_3="${{ inputs.oss_url_3 || 'https://xpp4.oss-ap-northeast-2.aliyuncs.com/bear1.txt' }}"
|
|
||||||
OSS_URL_4="${{ inputs.oss_url_4 || 'https://xpp5.oss-ap-southeast-1.aliyuncs.com/bear1.txt' }}"
|
|
||||||
ENCRYPTION_KEY="${{ inputs.encryption_key || 'c0qhq99a-nq8h-ropg-wrlc-ezj4dlkxqpzx' }}"
|
|
||||||
|
|
||||||
ENCRYPTION_KEY_ESCAPED=$(echo "$ENCRYPTION_KEY" | perl -pe 's/([\[\].*^$()+?{|\\])/\\$1/g')
|
|
||||||
|
|
||||||
sed -i "s|api\.maodag\.top|$API_DOMAIN|g" "$CONFIG_FILE"
|
|
||||||
sed -i "s|https://ppp2\.oss-cn-hongkong\.aliyuncs\.com/bear1\.txt|$OSS_URL_1|g" "$CONFIG_FILE"
|
|
||||||
sed -i "s|https://xgp3\.oss-ap-northeast-1\.aliyuncs\.com/bear1\.txt|$OSS_URL_2|g" "$CONFIG_FILE"
|
|
||||||
sed -i "s|https://xpp4\.oss-ap-northeast-2\.aliyuncs\.com/bear1\.txt|$OSS_URL_3|g" "$CONFIG_FILE"
|
|
||||||
sed -i "s|https://xpp5\.oss-ap-southeast-1\.aliyuncs\.com/bear1\.txt|$OSS_URL_4|g" "$CONFIG_FILE"
|
|
||||||
sed -i "s|c0qhq99a-nq8h-ropg-wrlc-ezj4dlkxqpzx|$ENCRYPTION_KEY_ESCAPED|g" "$CONFIG_FILE"
|
|
||||||
|
|
||||||
- name: 📦 安装 Flutter 依赖
|
|
||||||
run: |
|
|
||||||
flutter pub get
|
|
||||||
flutter pub run build_runner build --delete-conflicting-outputs
|
|
||||||
|
|
||||||
- name: 🔨 构建 Linux (Release)
|
|
||||||
run: |
|
|
||||||
flutter build linux --release
|
|
||||||
|
|
||||||
- name: 📦 打包 Linux
|
|
||||||
run: |
|
|
||||||
COMMIT_SHA=${GITHUB_SHA::7}
|
|
||||||
DATE=$(date '+%Y%m%d')
|
|
||||||
|
|
||||||
cd build/linux/x64/release/bundle
|
|
||||||
tar -czf "../../../../../BearVPN-linux-x64-release-${DATE}-${COMMIT_SHA}.tar.gz" ./*
|
|
||||||
|
|
||||||
- name: 📤 上传 Linux
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: linux-x64
|
|
||||||
path: BearVPN-linux-*.tar.gz
|
|
||||||
retention-days: 30
|
|
||||||
|
|
||||||
# ==================== iOS 构建 ====================
|
|
||||||
build-ios:
|
|
||||||
name: 构建 iOS
|
|
||||||
needs: build-libcore-ios
|
|
||||||
runs-on: macos-latest
|
|
||||||
if: contains(inputs.platforms || 'ios', 'ios')
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: 📥 Checkout 代码
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: 🔧 设置 Flutter
|
|
||||||
uses: subosito/flutter-action@v2
|
|
||||||
with:
|
|
||||||
flutter-version: '3.24.5'
|
|
||||||
channel: 'stable'
|
|
||||||
cache: true
|
|
||||||
|
|
||||||
- name: 📥 下载 iOS libcore
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: libcore-ios
|
|
||||||
path: ios/Frameworks/
|
|
||||||
|
|
||||||
- name: ⚙️ 配置 API、OSS 和加密密钥
|
|
||||||
run: |
|
|
||||||
CONFIG_FILE="lib/app/common/app_config.dart"
|
|
||||||
API_DOMAIN="${{ inputs.api_domain || 'api.maodag.top' }}"
|
|
||||||
OSS_URL_1="${{ inputs.oss_url_1 || 'https://ppp2.oss-cn-hongkong.aliyuncs.com/bear1.txt' }}"
|
|
||||||
OSS_URL_2="${{ inputs.oss_url_2 || 'https://xgp3.oss-ap-northeast-1.aliyuncs.com/bear1.txt' }}"
|
|
||||||
OSS_URL_3="${{ inputs.oss_url_3 || 'https://xpp4.oss-ap-northeast-2.aliyuncs.com/bear1.txt' }}"
|
|
||||||
OSS_URL_4="${{ inputs.oss_url_4 || 'https://xpp5.oss-ap-southeast-1.aliyuncs.com/bear1.txt' }}"
|
|
||||||
ENCRYPTION_KEY="${{ inputs.encryption_key || 'c0qhq99a-nq8h-ropg-wrlc-ezj4dlkxqpzx' }}"
|
|
||||||
|
|
||||||
# 使用 perl 转义特殊字符
|
|
||||||
ENCRYPTION_KEY_ESCAPED=$(echo "$ENCRYPTION_KEY" | perl -pe 's/([\[\].*^$()+?{|\\])/\\$1/g')
|
|
||||||
|
|
||||||
sed -i '' "s|api\.maodag\.top|$API_DOMAIN|g" "$CONFIG_FILE"
|
|
||||||
sed -i '' "s|https://ppp2\.oss-cn-hongkong\.aliyuncs\.com/bear1\.txt|$OSS_URL_1|g" "$CONFIG_FILE"
|
|
||||||
sed -i '' "s|https://xgp3\.oss-ap-northeast-1\.aliyuncs\.com/bear1\.txt|$OSS_URL_2|g" "$CONFIG_FILE"
|
|
||||||
sed -i '' "s|https://xpp4\.oss-ap-northeast-2\.aliyuncs\.com/bear1\.txt|$OSS_URL_3|g" "$CONFIG_FILE"
|
|
||||||
sed -i '' "s|https://xpp5\.oss-ap-southeast-1\.aliyuncs\.com/bear1\.txt|$OSS_URL_4|g" "$CONFIG_FILE"
|
|
||||||
sed -i '' "s|c0qhq99a-nq8h-ropg-wrlc-ezj4dlkxqpzx|$ENCRYPTION_KEY_ESCAPED|g" "$CONFIG_FILE"
|
|
||||||
|
|
||||||
- name: 📦 安装 Flutter 依赖
|
|
||||||
run: |
|
|
||||||
flutter pub get
|
|
||||||
flutter pub run build_runner build --delete-conflicting-outputs
|
|
||||||
|
|
||||||
- name: 🔨 构建 iOS (Release)
|
|
||||||
run: |
|
|
||||||
flutter build ios --release --no-codesign
|
|
||||||
|
|
||||||
- name: 📦 打包 iOS
|
|
||||||
run: |
|
|
||||||
COMMIT_SHA=${GITHUB_SHA::7}
|
|
||||||
DATE=$(date '+%Y%m%d')
|
|
||||||
|
|
||||||
cd build/ios/iphoneos
|
|
||||||
|
|
||||||
# 创建 Payload 目录
|
|
||||||
mkdir -p Payload
|
|
||||||
cp -r Runner.app Payload/
|
|
||||||
|
|
||||||
# 创建 IPA 文件
|
|
||||||
zip -r "../../../../BearVPN-ios-release-${DATE}-${COMMIT_SHA}.ipa" Payload
|
|
||||||
|
|
||||||
echo "✅ iOS IPA 创建完成"
|
|
||||||
ls -lh BearVPN-ios-*.ipa
|
|
||||||
|
|
||||||
- name: 📤 上传 iOS
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: ios-app
|
|
||||||
path: BearVPN-ios-*.ipa
|
|
||||||
retention-days: 30
|
|
||||||
|
|
||||||
# ==================== 创建 Release ====================
|
|
||||||
create-release:
|
|
||||||
name: 创建 Release
|
|
||||||
needs: [build-android, build-windows, build-macos, build-linux, build-ios]
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
if: startsWith(github.ref, 'refs/tags/v')
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: 📥 下载所有构建产物
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
path: artifacts
|
|
||||||
|
|
||||||
- name: 📋 生成 Release 说明
|
|
||||||
id: release_notes
|
|
||||||
run: |
|
|
||||||
cat > release_notes.md << 'EOF'
|
|
||||||
## 🎉 BearVPN 多平台版本发布
|
|
||||||
|
|
||||||
### 📦 平台支持
|
|
||||||
|
|
||||||
| 平台 | 架构 | 文件 |
|
|
||||||
|-----|------|-----|
|
|
||||||
| **Android** | arm64-v8a | BearVPN-android-arm64-v8a-*.apk |
|
|
||||||
| **Android** | armeabi-v7a | BearVPN-android-armeabi-v7a-*.apk |
|
|
||||||
| **Android** | x86_64 | BearVPN-android-x86_64-*.apk |
|
|
||||||
| **iOS** | Universal | BearVPN-ios-*.ipa |
|
|
||||||
| **Windows** | x64 | BearVPN-windows-x64-*.zip |
|
|
||||||
| **macOS** | Universal | BearVPN-macos-*.zip |
|
|
||||||
| **Linux** | x64 | BearVPN-linux-x64-*.tar.gz |
|
|
||||||
|
|
||||||
### ✨ 主要特性
|
|
||||||
|
|
||||||
- ✅ 支持 Shadowsocks/VLESS/Trojan/Hysteria2
|
|
||||||
- ✅ 内置 sing-box 核心 v3.1.7
|
|
||||||
- ✅ 跨平台支持
|
|
||||||
- ✅ 自定义路由规则
|
|
||||||
|
|
||||||
### 📥 安装指南
|
|
||||||
|
|
||||||
**Android:** 下载 APK 直接安装
|
|
||||||
**iOS:** 下载 IPA 使用 AltStore/Sideloadly 安装
|
|
||||||
**Windows:** 解压 ZIP 运行 BearVPN.exe
|
|
||||||
**macOS:** 解压 ZIP 拖拽到应用程序
|
|
||||||
**Linux:** 解压 tar.gz 运行可执行文件
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
**构建信息:**
|
|
||||||
- 提交: ${GITHUB_SHA::7}
|
|
||||||
- 时间: $(date '+%Y-%m-%d %H:%M:%S UTC')
|
|
||||||
- Flutter: 3.24.5
|
|
||||||
- sing-box: v3.1.7
|
|
||||||
EOF
|
|
||||||
|
|
||||||
echo "release_notes<<EOF" >> $GITHUB_OUTPUT
|
|
||||||
cat release_notes.md >> $GITHUB_OUTPUT
|
|
||||||
echo "EOF" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: 🚀 创建 Release
|
|
||||||
uses: softprops/action-gh-release@v2
|
|
||||||
with:
|
|
||||||
files: |
|
|
||||||
artifacts/android-apk/*.apk
|
|
||||||
artifacts/ios-app/*.ipa
|
|
||||||
artifacts/windows-x64/*.zip
|
|
||||||
artifacts/macos-app/*.zip
|
|
||||||
artifacts/linux-x64/*.tar.gz
|
|
||||||
body: ${{ steps.release_notes.outputs.release_notes }}
|
|
||||||
draft: false
|
|
||||||
prerelease: false
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: 📢 构建完成
|
|
||||||
run: |
|
|
||||||
echo "✅ 所有平台构建完成!"
|
|
||||||
echo "📦 Release: ${{ github.ref }}"
|
|
||||||
echo "🔗 https://github.com/${{ github.repository }}/releases"
|
|
||||||
@@ -1,145 +0,0 @@
|
|||||||
name: Build Windows
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ main, master ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ main, master ]
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
# 先编译 libcore
|
|
||||||
build-libcore:
|
|
||||||
name: 编译 libcore (Windows)
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: 📥 Checkout 代码
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: 🔧 设置 Go 环境
|
|
||||||
uses: actions/setup-go@v5
|
|
||||||
with:
|
|
||||||
go-version: '1.23'
|
|
||||||
cache: true
|
|
||||||
cache-dependency-path: libcore/go.sum
|
|
||||||
|
|
||||||
- name: 🔧 设置 Node.js
|
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: '20'
|
|
||||||
|
|
||||||
- name: 🔧 安装 MinGW
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y mingw-w64
|
|
||||||
|
|
||||||
- name: 📦 编译 libcore.dll
|
|
||||||
working-directory: libcore
|
|
||||||
run: |
|
|
||||||
echo "🚀 开始编译 Windows libcore..."
|
|
||||||
make windows-amd64
|
|
||||||
|
|
||||||
if [ -f "bin/libcore.dll" ] && [ -f "bin/HiddifyCli.exe" ]; then
|
|
||||||
echo "✅ Windows libcore 编译成功"
|
|
||||||
ls -lh bin/
|
|
||||||
else
|
|
||||||
echo "❌ Windows libcore 编译失败"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: 📤 上传 Windows libcore
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: libcore-windows
|
|
||||||
path: |
|
|
||||||
libcore/bin/libcore.dll
|
|
||||||
libcore/bin/HiddifyCli.exe
|
|
||||||
libcore/bin/webui/**
|
|
||||||
retention-days: 7
|
|
||||||
|
|
||||||
# 构建 Windows 应用
|
|
||||||
build:
|
|
||||||
runs-on: windows-latest
|
|
||||||
needs: build-libcore
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: 📥 Checkout 代码
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: 📥 下载 libcore
|
|
||||||
uses: actions/download-artifact@v4
|
|
||||||
with:
|
|
||||||
name: libcore-windows
|
|
||||||
path: .
|
|
||||||
|
|
||||||
- name: 🔧 复制 libcore 文件到正确位置并重命名
|
|
||||||
run: |
|
|
||||||
Write-Host "📋 复制 libcore 文件..."
|
|
||||||
|
|
||||||
# 创建目标目录
|
|
||||||
New-Item -ItemType Directory -Force -Path libcore\bin
|
|
||||||
|
|
||||||
# 查找并复制 HiddifyCli.exe,重命名为 BearVPNCli.exe
|
|
||||||
$exeFiles = Get-ChildItem -Recurse -Filter "HiddifyCli.exe" -ErrorAction SilentlyContinue
|
|
||||||
if ($exeFiles) {
|
|
||||||
$sourceExe = $exeFiles[0].FullName
|
|
||||||
Write-Host "✅ 找到 HiddifyCli.exe: $sourceExe"
|
|
||||||
Write-Host "📝 复制并重命名为 BearVPNCli.exe"
|
|
||||||
Copy-Item $sourceExe libcore\bin\BearVPNCli.exe
|
|
||||||
Write-Host "✅ 重命名完成:HiddifyCli.exe → BearVPNCli.exe"
|
|
||||||
} else {
|
|
||||||
Write-Host "⚠️ 未找到 HiddifyCli.exe"
|
|
||||||
}
|
|
||||||
|
|
||||||
# 复制 libcore.dll
|
|
||||||
$dllFiles = Get-ChildItem -Recurse -Filter "libcore.dll" -ErrorAction SilentlyContinue
|
|
||||||
if ($dllFiles) {
|
|
||||||
$sourceDll = $dllFiles[0].FullName
|
|
||||||
Write-Host "✅ 找到 libcore.dll: $sourceDll"
|
|
||||||
Copy-Item $sourceDll libcore\bin\libcore.dll
|
|
||||||
} else {
|
|
||||||
Write-Host "⚠️ 未找到 libcore.dll"
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host ""
|
|
||||||
Write-Host "📄 验证文件:"
|
|
||||||
if (Test-Path libcore\bin) {
|
|
||||||
Get-ChildItem libcore\bin\ -ErrorAction SilentlyContinue | Format-Table Name, Length
|
|
||||||
}
|
|
||||||
|
|
||||||
- name: Setup Flutter
|
|
||||||
uses: subosito/flutter-action@v2
|
|
||||||
with:
|
|
||||||
flutter-version: '3.24.5'
|
|
||||||
channel: 'stable'
|
|
||||||
|
|
||||||
- name: Enable Windows desktop
|
|
||||||
run: flutter config --enable-windows-desktop
|
|
||||||
|
|
||||||
- name: Get dependencies
|
|
||||||
run: flutter pub get
|
|
||||||
|
|
||||||
- name: Generate code
|
|
||||||
run: dart run build_runner build --delete-conflicting-outputs
|
|
||||||
|
|
||||||
- name: Build Windows Debug
|
|
||||||
run: flutter build windows
|
|
||||||
|
|
||||||
- name: Build Windows Release
|
|
||||||
run: flutter build windows --release
|
|
||||||
|
|
||||||
- name: Upload Debug build artifacts
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: windows-debug-build
|
|
||||||
path: build/windows/runner/Debug/
|
|
||||||
|
|
||||||
- name: Upload Release build artifacts
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: windows-release-build
|
|
||||||
path: build/windows/runner/Release/
|
|
||||||
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 24 KiB |
@@ -14,7 +14,7 @@ class ActiveGroupsChannel(private val scope: CoroutineScope) : FlutterPlugin,
|
|||||||
CommandClient.Handler {
|
CommandClient.Handler {
|
||||||
companion object {
|
companion object {
|
||||||
const val TAG = "A/ActiveGroupsChannel"
|
const val TAG = "A/ActiveGroupsChannel"
|
||||||
const val CHANNEL = "com.baer.app/active-groups"
|
const val CHANNEL = "com.hi.app/active-groups"
|
||||||
val gson = Gson()
|
val gson = Gson()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ class EventHandler : FlutterPlugin {
|
|||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
const val TAG = "A/EventHandler"
|
const val TAG = "A/EventHandler"
|
||||||
const val SERVICE_STATUS = "com.baer.app/service.status"
|
const val SERVICE_STATUS = "com.hi.app/service.status"
|
||||||
const val SERVICE_ALERTS = "com.baer.app/service.alerts"
|
const val SERVICE_ALERTS = "com.hi.app/service.alerts"
|
||||||
}
|
}
|
||||||
|
|
||||||
private var statusChannel: EventChannel? = null
|
private var statusChannel: EventChannel? = null
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import kotlinx.coroutines.CoroutineScope
|
|||||||
class GroupsChannel(private val scope: CoroutineScope) : FlutterPlugin, CommandClient.Handler {
|
class GroupsChannel(private val scope: CoroutineScope) : FlutterPlugin, CommandClient.Handler {
|
||||||
companion object {
|
companion object {
|
||||||
const val TAG = "A/GroupsChannel"
|
const val TAG = "A/GroupsChannel"
|
||||||
const val CHANNEL = "com.baer.app/groups"
|
const val CHANNEL = "com.hi.app/groups"
|
||||||
val gson = Gson()
|
val gson = Gson()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ class LogHandler : FlutterPlugin {
|
|||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
const val TAG = "A/LogHandler"
|
const val TAG = "A/LogHandler"
|
||||||
const val SERVICE_LOGS = "com.baer.app/service.logs"
|
const val SERVICE_LOGS = "com.hi.app/service.logs"
|
||||||
}
|
}
|
||||||
|
|
||||||
private lateinit var logsChannel: EventChannel
|
private lateinit var logsChannel: EventChannel
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ class MethodHandler(private val scope: CoroutineScope) : FlutterPlugin,
|
|||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
const val TAG = "A/MethodHandler"
|
const val TAG = "A/MethodHandler"
|
||||||
const val channelName = "com.baer.app/method"
|
const val channelName = "com.hi.app/method"
|
||||||
|
|
||||||
enum class Trigger(val method: String) {
|
enum class Trigger(val method: String) {
|
||||||
Setup("setup"),
|
Setup("setup"),
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ class PlatformSettingsHandler : FlutterPlugin, MethodChannel.MethodCallHandler,
|
|||||||
private lateinit var ignoreRequestResult: MethodChannel.Result
|
private lateinit var ignoreRequestResult: MethodChannel.Result
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
const val channelName = "com.baer.app/platform"
|
const val channelName = "com.hi.app/platform"
|
||||||
|
|
||||||
const val REQUEST_IGNORE_BATTERY_OPTIMIZATIONS = 44
|
const val REQUEST_IGNORE_BATTERY_OPTIMIZATIONS = 44
|
||||||
val gson = Gson()
|
val gson = Gson()
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import kotlinx.coroutines.CoroutineScope
|
|||||||
class StatsChannel(private val scope: CoroutineScope) : FlutterPlugin, CommandClient.Handler{
|
class StatsChannel(private val scope: CoroutineScope) : FlutterPlugin, CommandClient.Handler{
|
||||||
companion object {
|
companion object {
|
||||||
const val TAG = "A/StatsChannel"
|
const val TAG = "A/StatsChannel"
|
||||||
const val STATS_CHANNEL = "com.baer.app/stats"
|
const val STATS_CHANNEL = "com.hi.app/stats"
|
||||||
}
|
}
|
||||||
|
|
||||||
private val commandClient =
|
private val commandClient =
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.hiddify.hiddify.constant
|
package com.hiddify.hiddify.constant
|
||||||
|
|
||||||
object Action {
|
object Action {
|
||||||
const val SERVICE = "com.baer.app.SERVICE"
|
const val SERVICE = "com.hi.app.SERVICE"
|
||||||
const val SERVICE_CLOSE = "com.baer.app.SERVICE_CLOSE"
|
const val SERVICE_CLOSE = "com.hi.app.SERVICE_CLOSE"
|
||||||
const val SERVICE_RELOAD = "com.baer.app.sfa.SERVICE_RELOAD"
|
const val SERVICE_RELOAD = "com.hi.app.sfa.SERVICE_RELOAD"
|
||||||
}
|
}
|
||||||
@@ -9,6 +9,7 @@
|
|||||||
"enterEmail": "Please enter email address",
|
"enterEmail": "Please enter email address",
|
||||||
"enterCode": "Please enter verification code",
|
"enterCode": "Please enter verification code",
|
||||||
"enterPassword": "Please enter password",
|
"enterPassword": "Please enter password",
|
||||||
|
"enterPasswordForPhone": "Please enter password (Password Login)",
|
||||||
"reenterPassword": "Please re-enter password",
|
"reenterPassword": "Please re-enter password",
|
||||||
"forgotPassword": "Forgot Password",
|
"forgotPassword": "Forgot Password",
|
||||||
"codeLogin": "Code Login",
|
"codeLogin": "Code Login",
|
||||||
@@ -18,6 +19,8 @@
|
|||||||
"privacyPolicy": "Privacy Policy",
|
"privacyPolicy": "Privacy Policy",
|
||||||
"next": "Next",
|
"next": "Next",
|
||||||
"registerNow": "Register Now",
|
"registerNow": "Register Now",
|
||||||
|
"registerAccount": "Register Account",
|
||||||
|
"clickToRegister": "Click to Register",
|
||||||
"setAndLogin": "Set and Login",
|
"setAndLogin": "Set and Login",
|
||||||
"enterAccount": "Please enter account",
|
"enterAccount": "Please enter account",
|
||||||
"passwordMismatch": "The two passwords do not match",
|
"passwordMismatch": "The two passwords do not match",
|
||||||
@@ -25,7 +28,9 @@
|
|||||||
"codeSentCountdown": "Code sent {seconds}s",
|
"codeSentCountdown": "Code sent {seconds}s",
|
||||||
"and": "and",
|
"and": "and",
|
||||||
"enterInviteCode": "Enter invite code (optional)",
|
"enterInviteCode": "Enter invite code (optional)",
|
||||||
"registerSuccess": "Registration successful"
|
"registerSuccess": "Registration successful",
|
||||||
|
"search": "Search",
|
||||||
|
"selectOtherRegion": "Select other region"
|
||||||
},
|
},
|
||||||
"failure": {
|
"failure": {
|
||||||
"unexpected": "Unexpected Error",
|
"unexpected": "Unexpected Error",
|
||||||
@@ -171,7 +176,8 @@
|
|||||||
"friday": "Fri",
|
"friday": "Fri",
|
||||||
"saturday": "Sat",
|
"saturday": "Sat",
|
||||||
"sunday": "Sun"
|
"sunday": "Sun"
|
||||||
}
|
},
|
||||||
|
"processTrafficFailed": "Failed to process traffic log data"
|
||||||
},
|
},
|
||||||
"message": {
|
"message": {
|
||||||
"title": "Notifications",
|
"title": "Notifications",
|
||||||
@@ -367,6 +373,7 @@
|
|||||||
"initializing": "Initializing...",
|
"initializing": "Initializing...",
|
||||||
"networkConnectionFailure": "Network connection failed, please check and retry",
|
"networkConnectionFailure": "Network connection failed, please check and retry",
|
||||||
"retry": "Retry",
|
"retry": "Retry",
|
||||||
|
"skip": "Skip",
|
||||||
"networkPermissionFailed": "Failed to get network permission",
|
"networkPermissionFailed": "Failed to get network permission",
|
||||||
"initializationFailed": "Initialization failed"
|
"initializationFailed": "Initialization failed"
|
||||||
},
|
},
|
||||||
@@ -467,5 +474,33 @@
|
|||||||
"open_dashboard": "Open Dashboard",
|
"open_dashboard": "Open Dashboard",
|
||||||
"copy_to_terminal": "Copy to Terminal",
|
"copy_to_terminal": "Copy to Terminal",
|
||||||
"exit_app": "Exit Application"
|
"exit_app": "Exit Application"
|
||||||
|
},
|
||||||
|
"crisp": {
|
||||||
|
"initializingSystem": "Initializing customer service system...",
|
||||||
|
"initFailed": "Customer service system initialization failed"
|
||||||
|
},
|
||||||
|
"common": {
|
||||||
|
"retry": "Retry",
|
||||||
|
"tryBrowser": "Try opening with browser",
|
||||||
|
"cannotOpenBrowser": "Cannot open browser",
|
||||||
|
"openLinkFailed": "Failed to open link, please try again later",
|
||||||
|
"cannotOpenTelegram": "Cannot open Telegram link"
|
||||||
|
},
|
||||||
|
"subscribe": {
|
||||||
|
"pleaseSelectFirst": "Please select a subscription first",
|
||||||
|
"resetPeriodFailed": "Failed to reset subscription period",
|
||||||
|
"resetPeriodSuccess": "Subscription period reset successfully"
|
||||||
|
},
|
||||||
|
"purchase": {
|
||||||
|
"noAvailablePlans": "No available plans"
|
||||||
|
},
|
||||||
|
"payment": {
|
||||||
|
"cannotOpenLink": "Cannot open payment link",
|
||||||
|
"linkEmpty": "Payment link is empty",
|
||||||
|
"unsupportedType": "Unsupported payment type"
|
||||||
|
},
|
||||||
|
"account": {
|
||||||
|
"accountRequired": "Account cannot be empty",
|
||||||
|
"deleteSuccess": "Account deleted successfully"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,6 +9,7 @@
|
|||||||
"enterEmail": "Please enter email address",
|
"enterEmail": "Please enter email address",
|
||||||
"enterCode": "Por favor, ingresa el código de verificación",
|
"enterCode": "Por favor, ingresa el código de verificación",
|
||||||
"enterPassword": "Por favor, ingresa la contraseña",
|
"enterPassword": "Por favor, ingresa la contraseña",
|
||||||
|
"enterPasswordForPhone": "Por favor ingrese la contraseña (Inicio de sesión con contraseña)",
|
||||||
"reenterPassword": "Por favor, reingresa la contraseña",
|
"reenterPassword": "Por favor, reingresa la contraseña",
|
||||||
"forgotPassword": "Olvidé mi contraseña",
|
"forgotPassword": "Olvidé mi contraseña",
|
||||||
"codeLogin": "Iniciar sesión con código",
|
"codeLogin": "Iniciar sesión con código",
|
||||||
@@ -18,6 +19,8 @@
|
|||||||
"privacyPolicy": "Política de privacidad",
|
"privacyPolicy": "Política de privacidad",
|
||||||
"next": "Siguiente",
|
"next": "Siguiente",
|
||||||
"registerNow": "Registrarse ahora",
|
"registerNow": "Registrarse ahora",
|
||||||
|
"registerAccount": "Registrar Cuenta",
|
||||||
|
"clickToRegister": "Haga clic para registrarse",
|
||||||
"setAndLogin": "Configurar e iniciar sesión",
|
"setAndLogin": "Configurar e iniciar sesión",
|
||||||
"enterAccount": "Por favor, ingresa la cuenta",
|
"enterAccount": "Por favor, ingresa la cuenta",
|
||||||
"passwordMismatch": "Las dos contraseñas no coinciden",
|
"passwordMismatch": "Las dos contraseñas no coinciden",
|
||||||
@@ -25,7 +28,9 @@
|
|||||||
"codeSentCountdown": "Código enviado {seconds}s",
|
"codeSentCountdown": "Código enviado {seconds}s",
|
||||||
"and": "y",
|
"and": "y",
|
||||||
"enterInviteCode": "Ingresa código de invitación (opcional)",
|
"enterInviteCode": "Ingresa código de invitación (opcional)",
|
||||||
"registerSuccess": "Registro exitoso"
|
"registerSuccess": "Registro exitoso",
|
||||||
|
"search": "Buscar",
|
||||||
|
"selectOtherRegion": "Seleccionar otra región"
|
||||||
},
|
},
|
||||||
"failure": {
|
"failure": {
|
||||||
"unexpected": "Error inesperado",
|
"unexpected": "Error inesperado",
|
||||||
@@ -187,7 +192,8 @@
|
|||||||
"friday": "Vie",
|
"friday": "Vie",
|
||||||
"saturday": "Sáb",
|
"saturday": "Sáb",
|
||||||
"sunday": "Dom"
|
"sunday": "Dom"
|
||||||
}
|
},
|
||||||
|
"processTrafficFailed": "Error al procesar datos de registro de tráfico"
|
||||||
},
|
},
|
||||||
"message": {
|
"message": {
|
||||||
"title": "Notificaciones",
|
"title": "Notificaciones",
|
||||||
@@ -373,6 +379,7 @@
|
|||||||
"initializing": "Inicializando...",
|
"initializing": "Inicializando...",
|
||||||
"networkConnectionFailure": "Error de conexión de red, verifique e intente nuevamente",
|
"networkConnectionFailure": "Error de conexión de red, verifique e intente nuevamente",
|
||||||
"retry": "Reintentar",
|
"retry": "Reintentar",
|
||||||
|
"skip": "Saltar",
|
||||||
"networkPermissionFailed": "Error al obtener permiso de red",
|
"networkPermissionFailed": "Error al obtener permiso de red",
|
||||||
"initializationFailed": "Error de inicialización"
|
"initializationFailed": "Error de inicialización"
|
||||||
},
|
},
|
||||||
@@ -481,5 +488,33 @@
|
|||||||
"open_dashboard": "Abrir panel",
|
"open_dashboard": "Abrir panel",
|
||||||
"copy_to_terminal": "Copiar al terminal",
|
"copy_to_terminal": "Copiar al terminal",
|
||||||
"exit_app": "Salir de la aplicación"
|
"exit_app": "Salir de la aplicación"
|
||||||
|
},
|
||||||
|
"crisp": {
|
||||||
|
"initializingSystem": "Inicializando sistema de atención al cliente...",
|
||||||
|
"initFailed": "Error al inicializar el sistema de atención al cliente"
|
||||||
|
},
|
||||||
|
"common": {
|
||||||
|
"retry": "Reintentar",
|
||||||
|
"tryBrowser": "Intentar abrir con navegador",
|
||||||
|
"cannotOpenBrowser": "No se puede abrir el navegador",
|
||||||
|
"openLinkFailed": "Error al abrir el enlace, inténtelo más tarde",
|
||||||
|
"cannotOpenTelegram": "No se puede abrir el enlace de Telegram"
|
||||||
|
},
|
||||||
|
"subscribe": {
|
||||||
|
"pleaseSelectFirst": "Seleccione primero una suscripción",
|
||||||
|
"resetPeriodFailed": "Error al restablecer el período de suscripción",
|
||||||
|
"resetPeriodSuccess": "Período de suscripción restablecido exitosamente"
|
||||||
|
},
|
||||||
|
"purchase": {
|
||||||
|
"noAvailablePlans": "No hay planes disponibles"
|
||||||
|
},
|
||||||
|
"payment": {
|
||||||
|
"cannotOpenLink": "No se puede abrir el enlace de pago",
|
||||||
|
"linkEmpty": "El enlace de pago está vacío",
|
||||||
|
"unsupportedType": "Tipo de pago no compatible"
|
||||||
|
},
|
||||||
|
"account": {
|
||||||
|
"accountRequired": "La cuenta no puede estar vacía",
|
||||||
|
"deleteSuccess": "Cuenta eliminada exitosamente"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,441 +0,0 @@
|
|||||||
{
|
|
||||||
"login": {
|
|
||||||
"welcome": "¡Bienvenido a Hi快VPN!",
|
|
||||||
"verifyPhone": "Verifica tu número de teléfono",
|
|
||||||
"verifyEmail": "Verifica tu correo electrónico",
|
|
||||||
"codeSent": "Se ha enviado un código de 6 dígitos a {account}. Por favor, ingrésalo en los próximos 30 minutos.",
|
|
||||||
"back": "Atrás",
|
|
||||||
"enterEmailOrPhone": "Ingresa correo o teléfono",
|
|
||||||
"enterCode": "Por favor, ingresa el código de verificación",
|
|
||||||
"enterPassword": "Por favor, ingresa la contraseña",
|
|
||||||
"reenterPassword": "Por favor, reingresa la contraseña",
|
|
||||||
"forgotPassword": "Olvidé mi contraseña",
|
|
||||||
"codeLogin": "Iniciar sesión con código",
|
|
||||||
"passwordLogin": "Iniciar sesión con contraseña",
|
|
||||||
"agreeTerms": "Iniciar sesión/Crear cuenta, acepto",
|
|
||||||
"termsOfService": "Términos de servicio",
|
|
||||||
"privacyPolicy": "Política de privacidad",
|
|
||||||
"next": "Siguiente",
|
|
||||||
"registerNow": "Registrarse ahora",
|
|
||||||
"setAndLogin": "Configurar e iniciar sesión",
|
|
||||||
"enterAccount": "Por favor, ingresa la cuenta",
|
|
||||||
"passwordMismatch": "Las dos contraseñas no coinciden",
|
|
||||||
"sendCode": "Enviar código",
|
|
||||||
"codeSentCountdown": "Código enviado {seconds}s",
|
|
||||||
"and": "y",
|
|
||||||
"enterInviteCode": "Ingresa código de invitación (opcional)",
|
|
||||||
"registerSuccess": "Registro exitoso"
|
|
||||||
},
|
|
||||||
"failure": {
|
|
||||||
"unexpected": "Error inesperado",
|
|
||||||
"clash": {
|
|
||||||
"unexpected": "Error inesperado",
|
|
||||||
"core": "Error de Clash ${reason}"
|
|
||||||
},
|
|
||||||
"singbox": {
|
|
||||||
"unexpected": "Error de servicio inesperado",
|
|
||||||
"serviceNotRunning": "Servicio no en ejecución",
|
|
||||||
"missingPrivilege": "Privilegios insuficientes",
|
|
||||||
"missingPrivilegeMsg": "El modo VPN requiere privilegios de administrador. Reinicia la aplicación como administrador o cambia el modo de servicio",
|
|
||||||
"missingGeoAssets": "Faltan recursos GEO",
|
|
||||||
"missingGeoAssetsMsg": "Faltan archivos de recursos GEO. Considera cambiar los recursos activos o descarga los recursos seleccionados en configuración.",
|
|
||||||
"invalidConfigOptions": "Opciones de configuración inválidas",
|
|
||||||
"invalidConfig": "Configuración inválida",
|
|
||||||
"create": "Error al crear servicio",
|
|
||||||
"start": "Error al iniciar servicio"
|
|
||||||
},
|
|
||||||
"connectivity": {
|
|
||||||
"unexpected": "Fallo inesperado",
|
|
||||||
"missingVpnPermission": "Falta permiso VPN",
|
|
||||||
"missingNotificationPermission": "Falta permiso de notificaciones",
|
|
||||||
"core": "Error del núcleo"
|
|
||||||
},
|
|
||||||
"profiles": {
|
|
||||||
"unexpected": "Error inesperado",
|
|
||||||
"notFound": "Perfil no encontrado",
|
|
||||||
"invalidConfig": "Configuración inválida",
|
|
||||||
"invalidUrl": "URL inválida"
|
|
||||||
},
|
|
||||||
"connection": {
|
|
||||||
"unexpected": "Error de conexión inesperado",
|
|
||||||
"timeout": "Tiempo de conexión agotado",
|
|
||||||
"badResponse": "Respuesta incorrecta",
|
|
||||||
"connectionError": "Error de conexión",
|
|
||||||
"badCertificate": "Certificado inválido"
|
|
||||||
},
|
|
||||||
"geoAssets": {
|
|
||||||
"unexpected": "Error inesperado",
|
|
||||||
"notUpdate": "No hay actualizaciones disponibles",
|
|
||||||
"activeNotFound": "No se encontraron recursos GEO activos"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"userInfo": {
|
|
||||||
"title": "Mi información",
|
|
||||||
"bindingTip": "Correo/teléfono no vinculado",
|
|
||||||
"myAccount": "Mi cuenta",
|
|
||||||
"balance": "Saldo",
|
|
||||||
"noValidSubscription": "No tiene una suscripción válida",
|
|
||||||
"subscribeNow": "Suscribirse ahora",
|
|
||||||
"shortcuts": "Accesos directos",
|
|
||||||
"adBlock": "Bloqueo de anuncios",
|
|
||||||
"dnsUnlock": "Desbloqueo DNS",
|
|
||||||
"contactUs": "Contáctanos",
|
|
||||||
"others": "Otros",
|
|
||||||
"logout": "Cerrar sesión",
|
|
||||||
"logoutConfirmTitle": "Cerrar sesión",
|
|
||||||
"logoutConfirmMessage": "¿Estás seguro de que quieres cerrar sesión?",
|
|
||||||
"logoutCancel": "Cancelar",
|
|
||||||
"vpnWebsite": "Sitio web VPN",
|
|
||||||
"telegram": "Telegram",
|
|
||||||
"mail": "Correo",
|
|
||||||
"phone": "Teléfono",
|
|
||||||
"customerService": "Servicio al cliente",
|
|
||||||
"workOrder": "Enviar ticket",
|
|
||||||
"pleaseLogin": "Por favor, inicia sesión primero",
|
|
||||||
"subscriptionValid": "Suscripción válida",
|
|
||||||
"startTime": "Fecha de inicio:",
|
|
||||||
"expireTime": "Fecha de vencimiento:",
|
|
||||||
"loginNow": "Iniciar sesión ahora",
|
|
||||||
"trialPeriod": "Bienvenido a la prueba Premium",
|
|
||||||
"remainingTime": "Tiempo restante",
|
|
||||||
"trialExpired": "Prueba expirada, conexión desconectada",
|
|
||||||
"subscriptionExpired": "Suscripción expirada, conexión desconectada",
|
|
||||||
"copySuccess": "Copiado con éxito",
|
|
||||||
"notAvailable": "No disponible",
|
|
||||||
"deviceLimit": "Límite de dispositivos: {count}",
|
|
||||||
"reset": "Restablecer",
|
|
||||||
"trafficUsage": "Usado: {used} / {total}",
|
|
||||||
"trafficProgress": {
|
|
||||||
"title": "Uso de tráfico",
|
|
||||||
"unlimited": "Tráfico ilimitado",
|
|
||||||
"limited": "Tráfico usado"
|
|
||||||
},
|
|
||||||
"switchSubscription": "Cambiar Suscripción",
|
|
||||||
"resetTrafficTitle": "Restablecer Tráfico",
|
|
||||||
"resetTrafficMessage": "Ejemplo de restablecimiento de tráfico del plan mensual: restablecer el tráfico del siguiente ciclo mensualmente, y el período de validez de la suscripción se adelantará de {currentTime} a {newTime}",
|
|
||||||
"trialStatus": "Estado de prueba",
|
|
||||||
"trialing": "En período de prueba",
|
|
||||||
"trialEndMessage": "No podrá continuar usando después de que expire el período de prueba",
|
|
||||||
"lastDaySubscriptionStatus": "Suscripción por expirar",
|
|
||||||
"lastDaySubscriptionMessage": "Por expirar",
|
|
||||||
"subscriptionEndMessage": "No podrá continuar usando después de que expire la suscripción",
|
|
||||||
"trialTimeWithDays": "{days}d {hours}h {minutes}m {seconds}s",
|
|
||||||
"trialTimeWithHours": "{hours}h {minutes}m {seconds}s",
|
|
||||||
"trialTimeWithMinutes": "{minutes}m {seconds}s",
|
|
||||||
"refreshLatency": "Actualizar latencia",
|
|
||||||
"testLatency": "Probar latencia",
|
|
||||||
"testing": "Probando latencia",
|
|
||||||
"refreshLatencyDesc": "Actualizar latencia de todos los nodos",
|
|
||||||
"testAllNodesLatency": "Probar la latencia de red de todos los nodos",
|
|
||||||
"autoSelect": "Selección automática",
|
|
||||||
"selected": "Seleccionado",
|
|
||||||
"willBeDeleted": "será eliminado",
|
|
||||||
"deleteAccountWarning": "La eliminación de la cuenta es permanente. Una vez que se elimine su cuenta, no podrá utilizar ninguna función. ¿Continuar?",
|
|
||||||
"requestDelete": "Solicitar eliminación"
|
|
||||||
},
|
|
||||||
"setting": {
|
|
||||||
"title": "Configuración",
|
|
||||||
"vpnConnection": "Conexión VPN",
|
|
||||||
"general": "General",
|
|
||||||
"autoConnect": "Conexión automática",
|
|
||||||
"routeRule": "Reglas de ruta",
|
|
||||||
"countrySelector": "Seleccionar país",
|
|
||||||
"appearance": "Apariencia",
|
|
||||||
"notifications": "Notificaciones",
|
|
||||||
"helpImprove": "Ayúdanos a mejorar",
|
|
||||||
"helpImproveSubtitle": "Subtítulo de ayuda para mejorar",
|
|
||||||
"requestDeleteAccount": "Solicitar eliminación de cuenta",
|
|
||||||
"goToDelete": "Ir a eliminar",
|
|
||||||
"rateUs": "Califícanos en App Store",
|
|
||||||
"iosRating": "Calificación iOS",
|
|
||||||
"version": "Versión",
|
|
||||||
"switchLanguage": "Cambiar idioma",
|
|
||||||
"system": "Sistema",
|
|
||||||
"light": "Claro",
|
|
||||||
"dark": "Oscuro",
|
|
||||||
"vpnModeSmart": "Modo inteligente",
|
|
||||||
"mode": "Modo de salida",
|
|
||||||
"connectionTypeGlobal": "Proxy global",
|
|
||||||
"connectionTypeGlobalRemark": "Cuando está activado, todo el tráfico pasa por el proxy",
|
|
||||||
"connectionTypeRule": "Proxy inteligente",
|
|
||||||
"connectionTypeRuleRemark": "Cuando el [Modo de salida] está configurado en [Proxy inteligente], el sistema dividirá automáticamente el tráfico nacional e internacional según el país seleccionado: las IPs/dominios nacionales se conectan directamente, mientras que las solicitudes extranjeras se acceden a través del proxy",
|
|
||||||
"connectionTypeDirect": "Conexión directa",
|
|
||||||
"connectionTypeDirectRemark": "Cuando está activado, todo el tráfico evita el proxy",
|
|
||||||
"smartMode": "Modo inteligente",
|
|
||||||
"secureMode": "Modo seguro"
|
|
||||||
},
|
|
||||||
"statistics": {
|
|
||||||
"title": "Estadísticas",
|
|
||||||
"vpnStatus": "Estado VPN",
|
|
||||||
"ipAddress": "Dirección IP",
|
|
||||||
"connectionTime": "Tiempo de conexión",
|
|
||||||
"protocol": "Protocolo",
|
|
||||||
"weeklyProtectionTime": "Tiempo de protección semanal",
|
|
||||||
"currentStreak": "Racha actual",
|
|
||||||
"highestStreak": "Mejor racha",
|
|
||||||
"longestConnection": "Conexión más larga",
|
|
||||||
"days": "{days} días",
|
|
||||||
"daysOfWeek": {
|
|
||||||
"monday": "Lun",
|
|
||||||
"tuesday": "Mar",
|
|
||||||
"wednesday": "Mié",
|
|
||||||
"thursday": "Jue",
|
|
||||||
"friday": "Vie",
|
|
||||||
"saturday": "Sáb",
|
|
||||||
"sunday": "Dom"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"message": {
|
|
||||||
"title": "Notificaciones",
|
|
||||||
"system": "Mensajes del sistema",
|
|
||||||
"promotion": "Mensajes promocionales"
|
|
||||||
},
|
|
||||||
"home": {
|
|
||||||
"welcome": "Bienvenido a Hi快VPN",
|
|
||||||
"disconnected": "Desconectado",
|
|
||||||
"connecting": "Conectando",
|
|
||||||
"connected": "Conectado",
|
|
||||||
"disconnecting": "Desconectando",
|
|
||||||
"currentConnectionTitle": "Conexión actual",
|
|
||||||
"switchNode": "Cambiar nodo",
|
|
||||||
"timeout": "Tiempo de espera agotado",
|
|
||||||
"loading": "Cargando...",
|
|
||||||
"error": "Error de carga",
|
|
||||||
"checkNetwork": "Verifique su conexión de red e intente nuevamente",
|
|
||||||
"retry": "Reintentar",
|
|
||||||
"connectionSectionTitle": "Método de conexión",
|
|
||||||
"dedicatedServers": "Servidores dedicados",
|
|
||||||
"countryRegion": "País/Región",
|
|
||||||
"serverListTitle": "Grupos de servidores dedicados",
|
|
||||||
"nodeListTitle": "Todos los nodos",
|
|
||||||
"countryListTitle": "Lista de países/regiones",
|
|
||||||
"noServers": "No hay servidores disponibles",
|
|
||||||
"noNodes": "No hay nodos disponibles",
|
|
||||||
"noRegions": "No hay regiones disponibles",
|
|
||||||
"subscriptionDescription": "Obtenga acceso premium a la red global de alta velocidad",
|
|
||||||
"subscribe": "Suscribirse",
|
|
||||||
"trialPeriod": "Bienvenido a la versión de prueba Premium",
|
|
||||||
"remainingTime": "Tiempo restante",
|
|
||||||
"trialExpired": "Período de prueba expirado, conexión terminada",
|
|
||||||
"subscriptionExpired": "Suscripción expirada, conexión terminada",
|
|
||||||
"subscriptionUpdated": "Suscripción actualizada",
|
|
||||||
"subscriptionUpdatedMessage": "Su información de suscripción ha sido actualizada, actualice para ver el último estado",
|
|
||||||
"trialStatus": "Estado de prueba",
|
|
||||||
"trialing": "En período de prueba",
|
|
||||||
"trialEndMessage": "No podrá continuar usando después de que expire el período de prueba",
|
|
||||||
"lastDaySubscriptionStatus": "Suscripción por expirar",
|
|
||||||
"lastDaySubscriptionMessage": "Por expirar",
|
|
||||||
"subscriptionEndMessage": "No podrá continuar usando después de que expire la suscripción",
|
|
||||||
"trialTimeWithDays": "{days}d {hours}h {minutes}m {seconds}s",
|
|
||||||
"trialTimeWithHours": "{hours}h {minutes}m {seconds}s",
|
|
||||||
"trialTimeWithMinutes": "{minutes}m {seconds}s",
|
|
||||||
"refreshLatency": "Actualizar latencia",
|
|
||||||
"testLatency": "Probar latencia",
|
|
||||||
"testing": "Probando latencia",
|
|
||||||
"refreshLatencyDesc": "Actualizar latencia de todos los nodos",
|
|
||||||
"testAllNodesLatency": "Probar la latencia de red de todos los nodos",
|
|
||||||
"autoSelect": "Selección automática",
|
|
||||||
"selected": "Seleccionado"
|
|
||||||
},
|
|
||||||
"invite": {
|
|
||||||
"title": "Invitar amigos",
|
|
||||||
"progress": "Progreso de invitación",
|
|
||||||
"inviteStats": "Estadísticas de invitación",
|
|
||||||
"registers": "Registrados",
|
|
||||||
"totalCommission": "Comisión total",
|
|
||||||
"rewardDetails": "Detalles de recompensa >",
|
|
||||||
"steps": "Pasos de invitación",
|
|
||||||
"inviteFriend": "Invitar amigo",
|
|
||||||
"acceptInvite": "El amigo acepta la invitación\ny se registra",
|
|
||||||
"getReward": "Obtener recompensa",
|
|
||||||
"shareLink": "Compartir por enlace",
|
|
||||||
"shareQR": "Compartir por código QR",
|
|
||||||
"rules": "Reglas de invitación",
|
|
||||||
"rule1": "1. Puedes invitar amigos compartiendo tu enlace o código de invitación exclusivo.",
|
|
||||||
"rule2": "2. Después de que tu amigo complete el registro e inicie sesión, la recompensa por invitación se enviará automáticamente a tu cuenta.",
|
|
||||||
"pending": "Pendiente de descarga",
|
|
||||||
"processing": "En proceso",
|
|
||||||
"success": "Exitoso",
|
|
||||||
"expired": "Expirado",
|
|
||||||
"myInviteCode": "Mi código de invitación",
|
|
||||||
"inviteCodeCopied": "Código de invitación copiado al portapapeles"
|
|
||||||
},
|
|
||||||
"purchaseMembership": {
|
|
||||||
"purchasePackage": "Comprar Paquete",
|
|
||||||
"noData": "No hay paquetes disponibles",
|
|
||||||
"myAccount": "Mi Cuenta",
|
|
||||||
"selectPackage": "Seleccionar Paquete",
|
|
||||||
"packageDescription": "Descripción del Paquete",
|
|
||||||
"paymentMethod": "Método de Pago",
|
|
||||||
"cancelAnytime": "Puedes cancelar en cualquier momento en la APP",
|
|
||||||
"startSubscription": "Comenzar Suscripción",
|
|
||||||
"renewNow": "Renovar Ahora",
|
|
||||||
"month": "{quantity} meses",
|
|
||||||
"year": "{quantity} años",
|
|
||||||
"day": "{quantity} días",
|
|
||||||
"unlimitedTraffic": "Tráfico Ilimitado",
|
|
||||||
"unlimitedDevices": "Dispositivos Ilimitados",
|
|
||||||
"devices": "{count} dispositivos",
|
|
||||||
"features": "Características del Paquete",
|
|
||||||
"expand": "Expandir",
|
|
||||||
"collapse": "Colapsar",
|
|
||||||
"confirmPurchase": "Confirmar Compra",
|
|
||||||
"confirmPurchaseDesc": "¿Está seguro de que desea comprar este paquete?"
|
|
||||||
},
|
|
||||||
"orderStatus": {
|
|
||||||
"title": "Estado del Pedido",
|
|
||||||
"pending": {
|
|
||||||
"title": "Pago Pendiente",
|
|
||||||
"description": "Por favor complete el pago"
|
|
||||||
},
|
|
||||||
"paid": {
|
|
||||||
"title": "Pago Recibido",
|
|
||||||
"description": "Procesando su pedido"
|
|
||||||
},
|
|
||||||
"success": {
|
|
||||||
"title": "¡Felicitaciones! Pago Exitoso",
|
|
||||||
"description": "Su paquete ha sido comprado exitosamente"
|
|
||||||
},
|
|
||||||
"closed": {
|
|
||||||
"title": "Pedido Cerrado",
|
|
||||||
"description": "Por favor realice un nuevo pedido"
|
|
||||||
},
|
|
||||||
"failed": {
|
|
||||||
"title": "Pago Fallido",
|
|
||||||
"description": "Por favor intente el pago nuevamente"
|
|
||||||
},
|
|
||||||
"unknown": {
|
|
||||||
"title": "Estado Desconocido",
|
|
||||||
"description": "Por favor contacte al servicio al cliente"
|
|
||||||
},
|
|
||||||
"checkFailed": {
|
|
||||||
"title": "Verificación Fallida",
|
|
||||||
"description": "Por favor intente nuevamente más tarde"
|
|
||||||
},
|
|
||||||
"initial": {
|
|
||||||
"title": "Procesando Pago",
|
|
||||||
"description": "Por favor espere mientras procesamos su pago"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"dialog": {
|
|
||||||
"confirm": "Confirmar",
|
|
||||||
"cancel": "Cancelar",
|
|
||||||
"ok": "OK",
|
|
||||||
"iKnow": "Lo entiendo"
|
|
||||||
},
|
|
||||||
"splash": {
|
|
||||||
"appName": "Hi快VPN",
|
|
||||||
"slogan": "Red global de alta velocidad",
|
|
||||||
"initializing": "Inicializando...",
|
|
||||||
"networkConnectionFailure": "Error de conexión de red, verifique e intente nuevamente",
|
|
||||||
"retry": "Reintentar",
|
|
||||||
"networkPermissionFailed": "Error al obtener permiso de red",
|
|
||||||
"initializationFailed": "Error de inicialización"
|
|
||||||
},
|
|
||||||
"network": {
|
|
||||||
"status": {
|
|
||||||
"connected": "Conectado",
|
|
||||||
"disconnected": "Desconectado",
|
|
||||||
"connecting": "Conectando...",
|
|
||||||
"disconnecting": "Desconectando...",
|
|
||||||
"reconnecting": "Reconectando...",
|
|
||||||
"failed": "Error de conexión"
|
|
||||||
},
|
|
||||||
"permission": {
|
|
||||||
"title": "Permiso de red",
|
|
||||||
"description": "Se requiere permiso de red para proporcionar el servicio VPN",
|
|
||||||
"goToSettings": "Ir a configuración",
|
|
||||||
"cancel": "Cancelar"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"update": {
|
|
||||||
"title": "Actualización disponible",
|
|
||||||
"content": "¿Actualizar ahora?",
|
|
||||||
"updateNow": "Actualizar ahora",
|
|
||||||
"updateLater": "Más tarde",
|
|
||||||
"defaultContent": "1. Optimización del rendimiento de la aplicación\n2. Corrección de problemas conocidos\n3. Mejora de la experiencia del usuario"
|
|
||||||
},
|
|
||||||
"kr_invite": {
|
|
||||||
"close": "Cerrar",
|
|
||||||
"saveQRCode": "Guardar código QR",
|
|
||||||
"qrCodeSaved": "Código QR guardado",
|
|
||||||
"shareLink": "Compartir enlace",
|
|
||||||
"shareQR": "Compartir código QR",
|
|
||||||
"myInviteCode": "Mi código de invitación"
|
|
||||||
},
|
|
||||||
"country": {
|
|
||||||
"cn": "China",
|
|
||||||
"ir": "Irán",
|
|
||||||
"af": "Afganistán",
|
|
||||||
"ru": "Rusia",
|
|
||||||
"id": "Indonesia",
|
|
||||||
"tr": "Turquía",
|
|
||||||
"br": "Brasil"
|
|
||||||
},
|
|
||||||
"error": {
|
|
||||||
"200": "Éxito",
|
|
||||||
"500": "Error interno del servidor",
|
|
||||||
"10001": "Error de consulta a la base de datos",
|
|
||||||
"10002": "Error de actualización de la base de datos",
|
|
||||||
"10003": "Error de inserción en la base de datos",
|
|
||||||
"10004": "Error de eliminación de la base de datos",
|
|
||||||
"20001": "El usuario ya existe",
|
|
||||||
"20002": "El usuario no existe",
|
|
||||||
"20003": "Contraseña de usuario incorrecta",
|
|
||||||
"20004": "Usuario deshabilitado",
|
|
||||||
"20005": "Saldo insuficiente",
|
|
||||||
"20006": "Registro detenido",
|
|
||||||
"20007": "Telegram no vinculado",
|
|
||||||
"20008": "Usuario no ha vinculado OAuth",
|
|
||||||
"20009": "Código de invitación incorrecto",
|
|
||||||
"30001": "El nodo ya existe",
|
|
||||||
"30002": "El nodo no existe",
|
|
||||||
"30003": "El grupo de nodos ya existe",
|
|
||||||
"30004": "El grupo de nodos no existe",
|
|
||||||
"30005": "El grupo de nodos no está vacío",
|
|
||||||
"400": "Error de parámetros",
|
|
||||||
"40002": "Token de usuario vacío",
|
|
||||||
"40003": "Token de usuario inválido",
|
|
||||||
"40004": "Token de usuario expirado",
|
|
||||||
"40005": "No ha iniciado sesión",
|
|
||||||
"401": "Demasiadas solicitudes",
|
|
||||||
"50001": "El cupón no existe",
|
|
||||||
"50002": "El cupón ya ha sido usado",
|
|
||||||
"50003": "El cupón no coincide",
|
|
||||||
"60001": "Suscripción expirada",
|
|
||||||
"60002": "Suscripción no disponible",
|
|
||||||
"60003": "El usuario ya tiene una suscripción",
|
|
||||||
"60004": "La suscripción ya ha sido usada",
|
|
||||||
"60005": "Límite de suscripción única excedido",
|
|
||||||
"60006": "Límite de cuota de suscripción",
|
|
||||||
"70001": "Código de verificación incorrecto",
|
|
||||||
"80001": "Error al encolar",
|
|
||||||
"90001": "Modo de depuración habilitado",
|
|
||||||
"90002": "Error al enviar SMS",
|
|
||||||
"90003": "Función SMS no habilitada",
|
|
||||||
"90004": "Función de correo electrónico no habilitada",
|
|
||||||
"90005": "Método de inicio de sesión no soportado",
|
|
||||||
"90006": "El autenticador no soporta este método",
|
|
||||||
"90007": "Código de país de teléfono vacío",
|
|
||||||
"90008": "Contraseña vacía",
|
|
||||||
"90009": "Código de país vacío",
|
|
||||||
"90010": "Se requiere contraseña o código de verificación",
|
|
||||||
"90011": "El correo electrónico ya existe",
|
|
||||||
"90012": "El número de teléfono ya existe",
|
|
||||||
"90013": "El dispositivo ya existe",
|
|
||||||
"90014": "Número de teléfono incorrecto",
|
|
||||||
"90015": "Este cuenta ha alcanzado el límite de envío hoy",
|
|
||||||
"90017": "El dispositivo no existe",
|
|
||||||
"90018": "ID de usuario no coincide",
|
|
||||||
"61001": "El pedido no existe",
|
|
||||||
"61002": "Método de pago no encontrado",
|
|
||||||
"61003": "Estado de pedido incorrecto",
|
|
||||||
"61004": "Período de reinicio insuficiente",
|
|
||||||
"61005": "Existe tráfico sin usar"
|
|
||||||
},
|
|
||||||
"tray": {
|
|
||||||
"open_dashboard": "Abrir panel",
|
|
||||||
"copy_to_terminal": "Copiar al terminal",
|
|
||||||
"exit_app": "Salir de la aplicación"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -9,6 +9,7 @@
|
|||||||
"enterEmail": "Please enter email address",
|
"enterEmail": "Please enter email address",
|
||||||
"enterCode": "Palun sisesta kinnituskood",
|
"enterCode": "Palun sisesta kinnituskood",
|
||||||
"enterPassword": "Palun sisesta parool",
|
"enterPassword": "Palun sisesta parool",
|
||||||
|
"enterPasswordForPhone": "Palun sisestage parool (Parooli sisselogimine)",
|
||||||
"reenterPassword": "Palun sisesta parool uuesti",
|
"reenterPassword": "Palun sisesta parool uuesti",
|
||||||
"forgotPassword": "Unustasid parooli",
|
"forgotPassword": "Unustasid parooli",
|
||||||
"codeLogin": "Koodiga sisselogimine",
|
"codeLogin": "Koodiga sisselogimine",
|
||||||
@@ -18,6 +19,8 @@
|
|||||||
"privacyPolicy": "Privaatsuspoliitikaga",
|
"privacyPolicy": "Privaatsuspoliitikaga",
|
||||||
"next": "Edasi",
|
"next": "Edasi",
|
||||||
"registerNow": "Registreeru kohe",
|
"registerNow": "Registreeru kohe",
|
||||||
|
"registerAccount": "Registreeri konto",
|
||||||
|
"clickToRegister": "Klõpsa registreerimiseks",
|
||||||
"setAndLogin": "Seadista ja logi sisse",
|
"setAndLogin": "Seadista ja logi sisse",
|
||||||
"enterAccount": "Palun sisesta konto",
|
"enterAccount": "Palun sisesta konto",
|
||||||
"passwordMismatch": "Kaks sisestatud parooli ei ühti",
|
"passwordMismatch": "Kaks sisestatud parooli ei ühti",
|
||||||
@@ -25,7 +28,9 @@
|
|||||||
"codeSentCountdown": "Kood saadetud {seconds}s",
|
"codeSentCountdown": "Kood saadetud {seconds}s",
|
||||||
"and": "ja",
|
"and": "ja",
|
||||||
"enterInviteCode": "Sisesta kutse kood (valikuline)",
|
"enterInviteCode": "Sisesta kutse kood (valikuline)",
|
||||||
"registerSuccess": "Registreerimine õnnestus"
|
"registerSuccess": "Registreerimine õnnestus",
|
||||||
|
"search": "Otsing",
|
||||||
|
"selectOtherRegion": "Valige teine piirkond"
|
||||||
},
|
},
|
||||||
"failure": {
|
"failure": {
|
||||||
"unexpected": "Ootamatu viga",
|
"unexpected": "Ootamatu viga",
|
||||||
@@ -171,7 +176,8 @@
|
|||||||
"friday": "R",
|
"friday": "R",
|
||||||
"saturday": "L",
|
"saturday": "L",
|
||||||
"sunday": "P"
|
"sunday": "P"
|
||||||
}
|
},
|
||||||
|
"processTrafficFailed": "Liikluslogiandmete töötlemine ebaõnnestus"
|
||||||
},
|
},
|
||||||
"message": {
|
"message": {
|
||||||
"title": "Teavitused",
|
"title": "Teavitused",
|
||||||
@@ -364,6 +370,7 @@
|
|||||||
"initializing": "Initsialiseerimine...",
|
"initializing": "Initsialiseerimine...",
|
||||||
"networkConnectionFailure": "Võrguühenduse viga, kontrollige ja proovige uuesti",
|
"networkConnectionFailure": "Võrguühenduse viga, kontrollige ja proovige uuesti",
|
||||||
"retry": "Proovi uuesti",
|
"retry": "Proovi uuesti",
|
||||||
|
"skip": "Jäta vahele",
|
||||||
"networkPermissionFailed": "Võrguõiguse hankimine ebaõnnestus",
|
"networkPermissionFailed": "Võrguõiguse hankimine ebaõnnestus",
|
||||||
"initializationFailed": "Initsialiseerimine ebaõnnestus"
|
"initializationFailed": "Initsialiseerimine ebaõnnestus"
|
||||||
},
|
},
|
||||||
@@ -464,5 +471,33 @@
|
|||||||
"open_dashboard": "Ava armatuurlaud",
|
"open_dashboard": "Ava armatuurlaud",
|
||||||
"copy_to_terminal": "Kopeeri terminali",
|
"copy_to_terminal": "Kopeeri terminali",
|
||||||
"exit_app": "Välju rakendusest"
|
"exit_app": "Välju rakendusest"
|
||||||
|
},
|
||||||
|
"crisp": {
|
||||||
|
"initializingSystem": "Klienditeeninduse süsteemi initsialiseerimine...",
|
||||||
|
"initFailed": "Klienditeeninduse süsteemi initsialiseerimine ebaõnnestus"
|
||||||
|
},
|
||||||
|
"common": {
|
||||||
|
"retry": "Proovi uuesti",
|
||||||
|
"tryBrowser": "Proovi brauseriga avada",
|
||||||
|
"cannotOpenBrowser": "Ei saa brauserit avada",
|
||||||
|
"openLinkFailed": "Lingi avamine ebaõnnestus, proovige hiljem uuesti",
|
||||||
|
"cannotOpenTelegram": "Ei saa Telegrami linki avada"
|
||||||
|
},
|
||||||
|
"subscribe": {
|
||||||
|
"pleaseSelectFirst": "Palun valige esmalt tellimus",
|
||||||
|
"resetPeriodFailed": "Tellimisperioodi lähtestamine ebaõnnestus",
|
||||||
|
"resetPeriodSuccess": "Tellimisperiood edukalt lähtestatud"
|
||||||
|
},
|
||||||
|
"purchase": {
|
||||||
|
"noAvailablePlans": "Saadaolevad plaanid puuduvad"
|
||||||
|
},
|
||||||
|
"payment": {
|
||||||
|
"cannotOpenLink": "Ei saa makselinki avada",
|
||||||
|
"linkEmpty": "Makselink on tühi",
|
||||||
|
"unsupportedType": "Toetamata maksetüüp"
|
||||||
|
},
|
||||||
|
"account": {
|
||||||
|
"accountRequired": "Konto ei saa olla tühi",
|
||||||
|
"deleteSuccess": "Konto edukalt kustutatud"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,423 +0,0 @@
|
|||||||
{
|
|
||||||
"login": {
|
|
||||||
"welcome": "Tere tulemast Hi快VPN-i!",
|
|
||||||
"verifyPhone": "Kinnita oma telefoninumber",
|
|
||||||
"verifyEmail": "Kinnita oma e-post",
|
|
||||||
"codeSent": "6-kohaline kood on saadetud aadressile {account}. Palun sisesta see 30 minuti jooksul.",
|
|
||||||
"back": "Tagasi",
|
|
||||||
"enterEmailOrPhone": "Sisesta e-post või telefoninumber",
|
|
||||||
"enterCode": "Palun sisesta kinnituskood",
|
|
||||||
"enterPassword": "Palun sisesta parool",
|
|
||||||
"reenterPassword": "Palun sisesta parool uuesti",
|
|
||||||
"forgotPassword": "Unustasid parooli",
|
|
||||||
"codeLogin": "Koodiga sisselogimine",
|
|
||||||
"passwordLogin": "Parooliga sisselogimine",
|
|
||||||
"agreeTerms": "Logi sisse/Loo konto, nõustun",
|
|
||||||
"termsOfService": "Teenusetingimustega",
|
|
||||||
"privacyPolicy": "Privaatsuspoliitikaga",
|
|
||||||
"next": "Edasi",
|
|
||||||
"registerNow": "Registreeru kohe",
|
|
||||||
"setAndLogin": "Seadista ja logi sisse",
|
|
||||||
"enterAccount": "Palun sisesta konto",
|
|
||||||
"passwordMismatch": "Kaks sisestatud parooli ei ühti",
|
|
||||||
"sendCode": "Saada kood",
|
|
||||||
"codeSentCountdown": "Kood saadetud {seconds}s",
|
|
||||||
"and": "ja",
|
|
||||||
"enterInviteCode": "Sisesta kutse kood (valikuline)",
|
|
||||||
"registerSuccess": "Registreerimine õnnestus"
|
|
||||||
},
|
|
||||||
"failure": {
|
|
||||||
"unexpected": "Ootamatu viga",
|
|
||||||
"clash": {
|
|
||||||
"unexpected": "Ootamatu viga",
|
|
||||||
"core": "Clash viga ${reason}"
|
|
||||||
},
|
|
||||||
"singbox": {
|
|
||||||
"unexpected": "Ootamatu teenuse viga",
|
|
||||||
"serviceNotRunning": "Teenus ei tööta",
|
|
||||||
"missingPrivilege": "Puuduvad õigused",
|
|
||||||
"missingPrivilegeMsg": "VPN režiim vajab administraatori õigusi. Taaskäivitage rakendus administraatorina või muutke teenuse režiimi",
|
|
||||||
"missingGeoAssets": "Puuduvad GEO ressursid",
|
|
||||||
"missingGeoAssetsMsg": "Puuduvad GEO ressursifailid. Kaaluge aktiivsete ressursside muutmist või laadige valitud ressursid seadetest alla.",
|
|
||||||
"invalidConfigOptions": "Kehtetud seadistuse valikud",
|
|
||||||
"invalidConfig": "Kehtetu seadistus",
|
|
||||||
"create": "Teenuse loomise viga",
|
|
||||||
"start": "Teenuse käivitamise viga"
|
|
||||||
},
|
|
||||||
"connectivity": {
|
|
||||||
"unexpected": "Ootamatu tõrge",
|
|
||||||
"missingVpnPermission": "Puudub VPN luba",
|
|
||||||
"missingNotificationPermission": "Puudub teavituste luba",
|
|
||||||
"core": "Tuuma viga"
|
|
||||||
},
|
|
||||||
"profiles": {
|
|
||||||
"unexpected": "Ootamatu viga",
|
|
||||||
"notFound": "Profiili ei leitud",
|
|
||||||
"invalidConfig": "Kehtetu seadistus",
|
|
||||||
"invalidUrl": "Kehtetu URL"
|
|
||||||
},
|
|
||||||
"connection": {
|
|
||||||
"unexpected": "Ootamatu ühenduse viga",
|
|
||||||
"timeout": "Ühenduse ajalõpp",
|
|
||||||
"badResponse": "Halb vastus",
|
|
||||||
"connectionError": "Ühenduse viga",
|
|
||||||
"badCertificate": "Kehtetu sertifikaat"
|
|
||||||
},
|
|
||||||
"geoAssets": {
|
|
||||||
"unexpected": "Ootamatu viga",
|
|
||||||
"notUpdate": "Uuendusi pole saadaval",
|
|
||||||
"activeNotFound": "Aktiivseid GEO ressursse ei leitud"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"userInfo": {
|
|
||||||
"title": "Minu info",
|
|
||||||
"bindingTip": "E-post/telefon sidumata",
|
|
||||||
"myAccount": "Minu konto",
|
|
||||||
"balance": "Jääk",
|
|
||||||
"noValidSubscription": "Teil pole kehtivat tellimust",
|
|
||||||
"subscribeNow": "Telli kohe",
|
|
||||||
"shortcuts": "Otseteed",
|
|
||||||
"adBlock": "Reklaami blokeerimine",
|
|
||||||
"dnsUnlock": "DNS avamine",
|
|
||||||
"contactUs": "Võta meiega ühendust",
|
|
||||||
"others": "Muu",
|
|
||||||
"logout": "Logi välja",
|
|
||||||
"logoutConfirmTitle": "Logi välja",
|
|
||||||
"logoutConfirmMessage": "Kas oled kindel, et soovid välja logida?",
|
|
||||||
"logoutCancel": "Tühista",
|
|
||||||
"vpnWebsite": "VPN veebileht",
|
|
||||||
"telegram": "Telegram",
|
|
||||||
"mail": "E-post",
|
|
||||||
"phone": "Telefon",
|
|
||||||
"customerService": "Klienditugi",
|
|
||||||
"workOrder": "Esita taotlus",
|
|
||||||
"pleaseLogin": "Palun logi esmalt sisse",
|
|
||||||
"subscriptionValid": "Tellimus kehtiv",
|
|
||||||
"startTime": "Algusaeg:",
|
|
||||||
"expireTime": "Aegumisaeg:",
|
|
||||||
"loginNow": "Logi kohe sisse",
|
|
||||||
"trialPeriod": "Tere tulemast Premium prooviperioodi",
|
|
||||||
"remainingTime": "Järelejäänud aeg",
|
|
||||||
"trialExpired": "Prooviperiood on lõppenud, ühendus katkestatud",
|
|
||||||
"subscriptionExpired": "Tellimus on aegunud, ühendus katkestatud",
|
|
||||||
"switchSubscription": "Vaheta tellimust",
|
|
||||||
"resetTrafficTitle": "Lähtesta liiklus",
|
|
||||||
"resetTrafficMessage": "Kuupaketi liikluse lähtestamise näide: lähtesta järgmise tsükli liiklus igakuiselt ja tellimuse kehtivusaeg edasi lükatakse {currentTime} kuni {newTime}",
|
|
||||||
"reset": "Lähtesta",
|
|
||||||
"deviceLimit": "Seadmete limiit: {count}",
|
|
||||||
"trafficUsage": "Kasutatud: {used} / {total}",
|
|
||||||
"trafficProgress": {
|
|
||||||
"title": "Liikluse kasutamine",
|
|
||||||
"unlimited": "Piiramatu liiklus",
|
|
||||||
"limited": "Kasutatud liiklus"
|
|
||||||
},
|
|
||||||
"copySuccess": "Kopeeritud",
|
|
||||||
"notAvailable": "Pole saadaval",
|
|
||||||
"willBeDeleted": "kustutatakse",
|
|
||||||
"deleteAccountWarning": "Konto kustutamine on püsiv. Kui teie konto on kustutatud, ei saa te enam ühtegi funktsiooni kasutada. Jätkata?",
|
|
||||||
"requestDelete": "Taotle kustutamist"
|
|
||||||
},
|
|
||||||
"setting": {
|
|
||||||
"title": "Seaded",
|
|
||||||
"vpnConnection": "VPN ühendus",
|
|
||||||
"general": "Üldine",
|
|
||||||
"autoConnect": "Automaatne ühendus",
|
|
||||||
"routeRule": "Marsruudi reeglid",
|
|
||||||
"countrySelector": "Vali riik",
|
|
||||||
"appearance": "Välimus",
|
|
||||||
"notifications": "Teavitused",
|
|
||||||
"helpImprove": "Aita meil paremaks muutuda",
|
|
||||||
"helpImproveSubtitle": "Aita meil paremaks muutuda alapealkiri",
|
|
||||||
"requestDeleteAccount": "Taotle konto kustutamist",
|
|
||||||
"goToDelete": "Mine kustutama",
|
|
||||||
"rateUs": "Hinda meid App Store'is",
|
|
||||||
"iosRating": "iOS hinnang",
|
|
||||||
"version": "Versioon",
|
|
||||||
"switchLanguage": "Vaheta keelt",
|
|
||||||
"system": "Süsteem",
|
|
||||||
"light": "Hele",
|
|
||||||
"dark": "Tume",
|
|
||||||
"vpnModeSmart": "Nutikas režiim",
|
|
||||||
"mode": "Väljundrežiim",
|
|
||||||
"connectionTypeGlobal": "Globaalne puhverserver",
|
|
||||||
"connectionTypeGlobalRemark": "Lubamisel suunatakse kogu liiklus puhverserveri kaudu",
|
|
||||||
"connectionTypeRule": "Nutikas puhverserver",
|
|
||||||
"connectionTypeRuleRemark": "Lubamisel, kui väljundrežiim on seatud nutikaks puhverserveriks, valitud riigi põhjal, jaotatakse liiklus automaatselt: kohalikud IP-d/domeenid ühenduvad otse, välismaised päringud suunatakse puhverserverisse",
|
|
||||||
"connectionTypeDirect": "Otsene ühendus",
|
|
||||||
"connectionTypeDirectRemark": "Lubamisel suunatakse kogu liiklus otse",
|
|
||||||
"smartMode": "Nutikas režiim",
|
|
||||||
"secureMode": "Turvaline režiim"
|
|
||||||
},
|
|
||||||
"statistics": {
|
|
||||||
"title": "Statistika",
|
|
||||||
"vpnStatus": "VPN olek",
|
|
||||||
"ipAddress": "IP aadress",
|
|
||||||
"connectionTime": "Ühenduse aeg",
|
|
||||||
"protocol": "Protokoll",
|
|
||||||
"weeklyProtectionTime": "Iganädalane kaitseaeg",
|
|
||||||
"currentStreak": "Praegune seeria",
|
|
||||||
"highestStreak": "Parim seeria",
|
|
||||||
"longestConnection": "Pikim ühendus",
|
|
||||||
"days": "{days} päeva",
|
|
||||||
"daysOfWeek": {
|
|
||||||
"monday": "E",
|
|
||||||
"tuesday": "T",
|
|
||||||
"wednesday": "K",
|
|
||||||
"thursday": "N",
|
|
||||||
"friday": "R",
|
|
||||||
"saturday": "L",
|
|
||||||
"sunday": "P"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"message": {
|
|
||||||
"title": "Teavitused",
|
|
||||||
"system": "Süsteemi sõnumid",
|
|
||||||
"promotion": "Kampaania sõnumid"
|
|
||||||
},
|
|
||||||
"invite": {
|
|
||||||
"title": "Kutsu sõbrad",
|
|
||||||
"progress": "Kutse edenemine",
|
|
||||||
"inviteStats": "Kutse statistika",
|
|
||||||
"registers": "Registreeritud",
|
|
||||||
"totalCommission": "Kogu komisjonitasu",
|
|
||||||
"rewardDetails": "Tasu üksikasjad >",
|
|
||||||
"steps": "Kutse Sammud",
|
|
||||||
"inviteFriend": "Kutsu Sõbrad",
|
|
||||||
"acceptInvite": "Sõbrad aktsepteerivad kutset\nTee tellimus ja registreeru",
|
|
||||||
"getReward": "Saada Tasu",
|
|
||||||
"shareLink": "Jaga Linki",
|
|
||||||
"shareQR": "Jaga QR-koodi",
|
|
||||||
"rules": "Kutse Reeglid",
|
|
||||||
"rule1": "1. Saad kutsuda sõpru meiega liituma, jagades oma erilist kutselinki või kutsekoodi.",
|
|
||||||
"rule2": "2. Pärast seda, kui sõbrad on registreerunud ja sisse loginud, krediteeritakse kutsetasud automaatselt teie kontole.",
|
|
||||||
"pending": "Ootel",
|
|
||||||
"processing": "Töötlemisel",
|
|
||||||
"success": "Õnnestus",
|
|
||||||
"expired": "Aegunud",
|
|
||||||
"myInviteCode": "Minu Kutsekood",
|
|
||||||
"inviteCodeCopied": "Kutsekood kopeeritud lõikelauale",
|
|
||||||
"close": "Sulge",
|
|
||||||
"saveQRCode": "Salvesta QR-kood",
|
|
||||||
"qrCodeSaved": "QR-kood salvestatud",
|
|
||||||
"copiedToClipboard": "Kopeeritud lõikelauale",
|
|
||||||
"getInviteCodeFailed": "Kutsekoodi hankimine ebaõnnestus, proovi hiljem uuesti",
|
|
||||||
"generateQRCodeFailed": "QR-koodi genereerimine ebaõnnestus, proovi hiljem uuesti",
|
|
||||||
"generateShareLinkFailed": "Jagamislinki genereerimine ebaõnnestus, proovi hiljem uuesti"
|
|
||||||
},
|
|
||||||
"purchaseMembership": {
|
|
||||||
"purchasePackage": "Paketi Ostmine",
|
|
||||||
"noData": "Saadaval pakette pole",
|
|
||||||
"myAccount": "Minu Konto",
|
|
||||||
"selectPackage": "Vali Pakett",
|
|
||||||
"packageDescription": "Paketi Kirjeldus",
|
|
||||||
"paymentMethod": "Makseviis",
|
|
||||||
"cancelAnytime": "Saad igal ajal rakenduses tühistada",
|
|
||||||
"startSubscription": "Alusta Tellimust",
|
|
||||||
"renewNow": "Uuenda Kohe",
|
|
||||||
"month": "{months} kuud",
|
|
||||||
"year": "{years} aastat",
|
|
||||||
"day": "{days} päeva",
|
|
||||||
"unlimitedTraffic": "Piiramatu Liiklus",
|
|
||||||
"unlimitedDevices": "Piiramatu Seadmete Arv",
|
|
||||||
"devices": "{count} seadet",
|
|
||||||
"features": "Paketi Funktsioonid",
|
|
||||||
"expand": "Laienda",
|
|
||||||
"collapse": "Sulge",
|
|
||||||
"confirmPurchase": "Kinnita Ost",
|
|
||||||
"confirmPurchaseDesc": "Kas olete kindel, et soovite selle paketi osta?"
|
|
||||||
},
|
|
||||||
"orderStatus": {
|
|
||||||
"title": "Tellimuse olek",
|
|
||||||
"pending": {
|
|
||||||
"title": "Makse ootel",
|
|
||||||
"description": "Palun täitke makse"
|
|
||||||
},
|
|
||||||
"paid": {
|
|
||||||
"title": "Makse vastu võetud",
|
|
||||||
"description": "Tellimust töödeldakse"
|
|
||||||
},
|
|
||||||
"success": {
|
|
||||||
"title": "Palju õnne! Makse õnnestus",
|
|
||||||
"description": "Teie pakett on edukalt ostetud"
|
|
||||||
},
|
|
||||||
"closed": {
|
|
||||||
"title": "Tellimus suletud",
|
|
||||||
"description": "Palun esitage uus tellimus"
|
|
||||||
},
|
|
||||||
"failed": {
|
|
||||||
"title": "Makse ebaõnnestus",
|
|
||||||
"description": "Palun proovige makset uuesti"
|
|
||||||
},
|
|
||||||
"unknown": {
|
|
||||||
"title": "Tundmatu olek",
|
|
||||||
"description": "Palun võtke ühendust klienditeenindusega"
|
|
||||||
},
|
|
||||||
"checkFailed": {
|
|
||||||
"title": "Kontroll ebaõnnestus",
|
|
||||||
"description": "Palun proovige hiljem uuesti"
|
|
||||||
},
|
|
||||||
"initial": {
|
|
||||||
"title": "Makset töödeldakse",
|
|
||||||
"description": "Palun oodake, kui töötleme teie makset"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"home": {
|
|
||||||
"welcome": "Tere tulemast Hi快VPN-i",
|
|
||||||
"disconnected": "Ühendus katkestatud",
|
|
||||||
"connecting": "Ühendumine",
|
|
||||||
"connected": "Ühendatud",
|
|
||||||
"disconnecting": "Ühenduse katkestamine",
|
|
||||||
"currentConnectionTitle": "Praegune ühendus",
|
|
||||||
"switchNode": "Vaheta sõlme",
|
|
||||||
"timeout": "Aegumine",
|
|
||||||
"loading": "Laadimine...",
|
|
||||||
"error": "Laadimise viga",
|
|
||||||
"checkNetwork": "Kontrollige võrguühendust ja proovige uuesti",
|
|
||||||
"retry": "Proovi uuesti",
|
|
||||||
"connectionSectionTitle": "Ühendusviis",
|
|
||||||
"dedicatedServers": "Pühendatud serverid",
|
|
||||||
"countryRegion": "Riik/Regioon",
|
|
||||||
"serverListTitle": "Pühendatud serverite grupid",
|
|
||||||
"nodeListTitle": "Kõik sõlmed",
|
|
||||||
"countryListTitle": "Riikide/Regioonide nimekiri",
|
|
||||||
"noServers": "Saadaval pole ühtegi serverit",
|
|
||||||
"noNodes": "Saadaval pole ühtegi sõlme",
|
|
||||||
"noRegions": "Saadaval pole ühtegi regiooni",
|
|
||||||
"subscriptionDescription": "Hankige premium juurdepääs kiirele globaalsele võrgustikule",
|
|
||||||
"subscribe": "Telli",
|
|
||||||
"trialPeriod": "Tere tulemast Premium prooviversiooni",
|
|
||||||
"remainingTime": "Järelejäänud aeg",
|
|
||||||
"trialExpired": "Prooviaeg on lõppenud, ühendus katkestatud",
|
|
||||||
"subscriptionExpired": "Tellimus on aegunud, ühendus katkestatud",
|
|
||||||
"subscriptionUpdated": "Tellimus värskendatud",
|
|
||||||
"subscriptionUpdatedMessage": "Teie tellimuse teave on värskendatud, värskendage viimase oleku vaatamiseks",
|
|
||||||
"trialStatus": "Proovi olek",
|
|
||||||
"trialing": "Proovimas",
|
|
||||||
"trialEndMessage": "Prooviaja lõppedes ei saa enam kasutada",
|
|
||||||
"lastDaySubscriptionStatus": "Tellimus aegub varsti",
|
|
||||||
"lastDaySubscriptionMessage": "Aegub varsti",
|
|
||||||
"subscriptionEndMessage": "Tellimuse lõppedes ei saa enam kasutada",
|
|
||||||
"trialTimeWithDays": "{days}p {hours}t {minutes}m {seconds}s",
|
|
||||||
"trialTimeWithHours": "{hours}t {minutes}m {seconds}s",
|
|
||||||
"trialTimeWithMinutes": "{minutes}m {seconds}s",
|
|
||||||
"refreshLatency": "Värskenda latentsust",
|
|
||||||
"testLatency": "Testi latentsust",
|
|
||||||
"testing": "Latentsuse testimine",
|
|
||||||
"refreshLatencyDesc": "Värskenda kõigi sõlmede latentsust",
|
|
||||||
"testAllNodesLatency": "Testi kõigi sõlmede võrgu latentsust",
|
|
||||||
"autoSelect": "Automaatne valik",
|
|
||||||
"selected": "Valitud"
|
|
||||||
},
|
|
||||||
"dialog": {
|
|
||||||
"confirm": "Kinnita",
|
|
||||||
"cancel": "Tühista",
|
|
||||||
"ok": "OK"
|
|
||||||
},
|
|
||||||
"splash": {
|
|
||||||
"appName": "Hi快VPN",
|
|
||||||
"slogan": "Kiire globaalne võrgustik",
|
|
||||||
"initializing": "Initsialiseerimine...",
|
|
||||||
"networkConnectionFailure": "Võrguühenduse viga, kontrollige ja proovige uuesti",
|
|
||||||
"retry": "Proovi uuesti",
|
|
||||||
"networkPermissionFailed": "Võrguõiguse hankimine ebaõnnestus",
|
|
||||||
"initializationFailed": "Initsialiseerimine ebaõnnestus"
|
|
||||||
},
|
|
||||||
"network": {
|
|
||||||
"status": {
|
|
||||||
"connected": "Ühendatud",
|
|
||||||
"disconnected": "Ühendus katkestatud",
|
|
||||||
"connecting": "Ühendumine...",
|
|
||||||
"disconnecting": "Ühenduse katkestamine...",
|
|
||||||
"reconnecting": "Ühenduse taastamine...",
|
|
||||||
"failed": "Ühenduse viga"
|
|
||||||
},
|
|
||||||
"permission": {
|
|
||||||
"title": "Võrguõigus",
|
|
||||||
"description": "VPN teenuse pakkumiseks on vaja võrguõigust",
|
|
||||||
"goToSettings": "Mine seadetesse",
|
|
||||||
"cancel": "Tühista"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"update": {
|
|
||||||
"title": "Uuendus saadaval",
|
|
||||||
"content": "Uuendada nüüd?",
|
|
||||||
"updateNow": "Uuenda nüüd",
|
|
||||||
"updateLater": "Hiljem",
|
|
||||||
"defaultContent": "1. Rakenduse jõudluse optimeerimine\n2. Teadaolevate probleemide parandamine\n3. Kasutajamugavuse parandamine"
|
|
||||||
},
|
|
||||||
"country": {
|
|
||||||
"cn": "Hiina",
|
|
||||||
"ir": "Iraan",
|
|
||||||
"af": "Afganistan",
|
|
||||||
"ru": "Venemaa",
|
|
||||||
"id": "Indoneesia",
|
|
||||||
"tr": "Türgi",
|
|
||||||
"br": "Brasiilia"
|
|
||||||
},
|
|
||||||
"error": {
|
|
||||||
"200": "Edukas",
|
|
||||||
"500": "Serveri sisemine viga",
|
|
||||||
"10001": "Andmebaasi päringu viga",
|
|
||||||
"10002": "Andmebaasi uuendamise viga",
|
|
||||||
"10003": "Andmebaasi sisestamise viga",
|
|
||||||
"10004": "Andmebaasi kustutamise viga",
|
|
||||||
"20001": "Kasutaja on juba olemas",
|
|
||||||
"20002": "Kasutajat pole olemas",
|
|
||||||
"20003": "Vale kasutaja parool",
|
|
||||||
"20004": "Kasutaja on keelatud",
|
|
||||||
"20005": "Ebapiisav saldo",
|
|
||||||
"20006": "Registreerimine peatatud",
|
|
||||||
"20007": "Telegram pole seotud",
|
|
||||||
"20008": "Kasutaja pole OAuth-i seostanud",
|
|
||||||
"20009": "Vale kutsekood",
|
|
||||||
"30001": "Sõlm on juba olemas",
|
|
||||||
"30002": "Sõlme pole olemas",
|
|
||||||
"30003": "Sõlme grupp on juba olemas",
|
|
||||||
"30004": "Sõlme gruppi pole olemas",
|
|
||||||
"30005": "Sõlme grupp pole tühi",
|
|
||||||
"400": "Parameetri viga",
|
|
||||||
"40002": "Kasutaja token on tühi",
|
|
||||||
"40003": "Vale kasutaja token",
|
|
||||||
"40004": "Kasutaja token on aegunud",
|
|
||||||
"40005": "Te pole sisse logitud",
|
|
||||||
"401": "Liiga palju päringuid",
|
|
||||||
"50001": "Kupongi pole olemas",
|
|
||||||
"50002": "Kupong on juba kasutatud",
|
|
||||||
"50003": "Kupong ei vasta",
|
|
||||||
"60001": "Tellimus on aegunud",
|
|
||||||
"60002": "Tellimus pole saadaval",
|
|
||||||
"60003": "Kasutajal on juba tellimus",
|
|
||||||
"60004": "Tellimus on juba kasutatud",
|
|
||||||
"60005": "Üksiku tellimuse režiimi limiit ületatud",
|
|
||||||
"60006": "Tellimuse kvoodi limiit",
|
|
||||||
"70001": "Vale kinnituskood",
|
|
||||||
"80001": "Järjekorda lisamise viga",
|
|
||||||
"90001": "Silumisrežiim on lubatud",
|
|
||||||
"90002": "SMS-i saatmise viga",
|
|
||||||
"90003": "SMS funktsioon pole lubatud",
|
|
||||||
"90004": "E-posti funktsioon pole lubatud",
|
|
||||||
"90005": "Toetamata sisselogimise meetod",
|
|
||||||
"90006": "Autentifikaator ei toeta seda meetodit",
|
|
||||||
"90007": "Telefoni riigi kood on tühi",
|
|
||||||
"90008": "Parool on tühi",
|
|
||||||
"90009": "Riigi kood on tühi",
|
|
||||||
"90010": "Parool või kinnituskood on vajalik",
|
|
||||||
"90011": "E-post on juba olemas",
|
|
||||||
"90012": "Telefoninumber on juba olemas",
|
|
||||||
"90013": "Seade on juba olemas",
|
|
||||||
"90014": "Vale telefoninumber",
|
|
||||||
"90015": "See konto on täna saavutanud saatmise limiidi",
|
|
||||||
"90017": "Seadet pole olemas",
|
|
||||||
"90018": "Kasutaja ID ei vasta",
|
|
||||||
"61001": "Tellimust pole olemas",
|
|
||||||
"61002": "Makseviisi ei leitud",
|
|
||||||
"61003": "Vale tellimuse olek",
|
|
||||||
"61004": "Ebapiisav lähtestamise periood",
|
|
||||||
"61005": "Kasutamata liiklus on olemas"
|
|
||||||
},
|
|
||||||
"tray": {
|
|
||||||
"open_dashboard": "Ava armatuurlaud",
|
|
||||||
"copy_to_terminal": "Kopeeri terminali",
|
|
||||||
"exit_app": "Välju rakendusest"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -9,6 +9,7 @@
|
|||||||
"enterEmail": "Please enter email address",
|
"enterEmail": "Please enter email address",
|
||||||
"enterCode": "認証コードを入力してください",
|
"enterCode": "認証コードを入力してください",
|
||||||
"enterPassword": "パスワードを入力してください",
|
"enterPassword": "パスワードを入力してください",
|
||||||
|
"enterPasswordForPhone": "パスワードを入力してください (パスワードログイン)",
|
||||||
"reenterPassword": "パスワードを再入力してください",
|
"reenterPassword": "パスワードを再入力してください",
|
||||||
"forgotPassword": "パスワードをお忘れの方",
|
"forgotPassword": "パスワードをお忘れの方",
|
||||||
"codeLogin": "認証コードでログイン",
|
"codeLogin": "認証コードでログイン",
|
||||||
@@ -18,6 +19,8 @@
|
|||||||
"privacyPolicy": "プライバシーポリシー",
|
"privacyPolicy": "プライバシーポリシー",
|
||||||
"next": "次へ",
|
"next": "次へ",
|
||||||
"registerNow": "今すぐ登録",
|
"registerNow": "今すぐ登録",
|
||||||
|
"registerAccount": "アカウント登録",
|
||||||
|
"clickToRegister": "クリックして登録",
|
||||||
"setAndLogin": "設定してログイン",
|
"setAndLogin": "設定してログイン",
|
||||||
"enterAccount": "アカウントを入力してください",
|
"enterAccount": "アカウントを入力してください",
|
||||||
"passwordMismatch": "2回のパスワード入力が一致しません",
|
"passwordMismatch": "2回のパスワード入力が一致しません",
|
||||||
@@ -25,7 +28,9 @@
|
|||||||
"codeSentCountdown": "認証コード送信済み {seconds}秒",
|
"codeSentCountdown": "認証コード送信済み {seconds}秒",
|
||||||
"and": "および",
|
"and": "および",
|
||||||
"enterInviteCode": "招待コードを入力(任意)",
|
"enterInviteCode": "招待コードを入力(任意)",
|
||||||
"registerSuccess": "登録成功"
|
"registerSuccess": "登録成功",
|
||||||
|
"search": "検索",
|
||||||
|
"selectOtherRegion": "他の地域を選択"
|
||||||
},
|
},
|
||||||
"failure": {
|
"failure": {
|
||||||
"unexpected": "予期せぬエラー",
|
"unexpected": "予期せぬエラー",
|
||||||
@@ -187,7 +192,8 @@
|
|||||||
"friday": "金",
|
"friday": "金",
|
||||||
"saturday": "土",
|
"saturday": "土",
|
||||||
"sunday": "日"
|
"sunday": "日"
|
||||||
}
|
},
|
||||||
|
"processTrafficFailed": "トラフィックログデータの処理に失敗しました"
|
||||||
},
|
},
|
||||||
"message": {
|
"message": {
|
||||||
"title": "通知",
|
"title": "通知",
|
||||||
@@ -381,6 +387,7 @@
|
|||||||
"initializing": "初期化中...",
|
"initializing": "初期化中...",
|
||||||
"networkConnectionFailure": "ネットワーク接続エラー、確認して再試行してください",
|
"networkConnectionFailure": "ネットワーク接続エラー、確認して再試行してください",
|
||||||
"retry": "再試行",
|
"retry": "再試行",
|
||||||
|
"skip": "スキップ",
|
||||||
"networkPermissionFailed": "ネットワーク権限の取得に失敗しました",
|
"networkPermissionFailed": "ネットワーク権限の取得に失敗しました",
|
||||||
"initializationFailed": "初期化に失敗しました"
|
"initializationFailed": "初期化に失敗しました"
|
||||||
},
|
},
|
||||||
@@ -481,5 +488,33 @@
|
|||||||
"open_dashboard": "ダッシュボードを開く",
|
"open_dashboard": "ダッシュボードを開く",
|
||||||
"copy_to_terminal": "ターミナルにコピー",
|
"copy_to_terminal": "ターミナルにコピー",
|
||||||
"exit_app": "アプリを終了"
|
"exit_app": "アプリを終了"
|
||||||
|
},
|
||||||
|
"crisp": {
|
||||||
|
"initializingSystem": "カスタマーサービスシステムを初期化しています...",
|
||||||
|
"initFailed": "カスタマーサービスシステムの初期化に失敗しました"
|
||||||
|
},
|
||||||
|
"common": {
|
||||||
|
"retry": "再試行",
|
||||||
|
"tryBrowser": "ブラウザで開いてみる",
|
||||||
|
"cannotOpenBrowser": "ブラウザを開けません",
|
||||||
|
"openLinkFailed": "リンクを開けませんでした。後でもう一度お試しください",
|
||||||
|
"cannotOpenTelegram": "Telegramリンクを開けません"
|
||||||
|
},
|
||||||
|
"subscribe": {
|
||||||
|
"pleaseSelectFirst": "最初にサブスクリプションを選択してください",
|
||||||
|
"resetPeriodFailed": "サブスクリプション期間のリセットに失敗しました",
|
||||||
|
"resetPeriodSuccess": "サブスクリプション期間が正常にリセットされました"
|
||||||
|
},
|
||||||
|
"purchase": {
|
||||||
|
"noAvailablePlans": "利用可能なプランはありません"
|
||||||
|
},
|
||||||
|
"payment": {
|
||||||
|
"cannotOpenLink": "支払いリンクを開けません",
|
||||||
|
"linkEmpty": "支払いリンクが空です",
|
||||||
|
"unsupportedType": "サポートされていない支払いタイプ"
|
||||||
|
},
|
||||||
|
"account": {
|
||||||
|
"accountRequired": "アカウントは空にできません",
|
||||||
|
"deleteSuccess": "アカウントが正常に削除されました"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,441 +0,0 @@
|
|||||||
{
|
|
||||||
"login": {
|
|
||||||
"welcome": "Hi快VPNへようこそ!",
|
|
||||||
"verifyPhone": "電話番号を認証",
|
|
||||||
"verifyEmail": "メールアドレスを認証",
|
|
||||||
"codeSent": "{account}に6桁のコードを送信しました。30分以内に入力してください。",
|
|
||||||
"back": "戻る",
|
|
||||||
"enterEmailOrPhone": "メールアドレスまたは電話番号を入力",
|
|
||||||
"enterCode": "認証コードを入力してください",
|
|
||||||
"enterPassword": "パスワードを入力してください",
|
|
||||||
"reenterPassword": "パスワードを再入力してください",
|
|
||||||
"forgotPassword": "パスワードをお忘れの方",
|
|
||||||
"codeLogin": "認証コードでログイン",
|
|
||||||
"passwordLogin": "パスワードでログイン",
|
|
||||||
"agreeTerms": "ログイン/アカウント作成,に同意します",
|
|
||||||
"termsOfService": "利用規約",
|
|
||||||
"privacyPolicy": "プライバシーポリシー",
|
|
||||||
"next": "次へ",
|
|
||||||
"registerNow": "今すぐ登録",
|
|
||||||
"setAndLogin": "設定してログイン",
|
|
||||||
"enterAccount": "アカウントを入力してください",
|
|
||||||
"passwordMismatch": "2回のパスワード入力が一致しません",
|
|
||||||
"sendCode": "認証コードを送信",
|
|
||||||
"codeSentCountdown": "認証コード送信済み {seconds}秒",
|
|
||||||
"and": "および",
|
|
||||||
"enterInviteCode": "招待コードを入力(任意)",
|
|
||||||
"registerSuccess": "登録成功"
|
|
||||||
},
|
|
||||||
"failure": {
|
|
||||||
"unexpected": "予期せぬエラー",
|
|
||||||
"clash": {
|
|
||||||
"unexpected": "予期せぬエラー",
|
|
||||||
"core": "Clashエラー ${reason}"
|
|
||||||
},
|
|
||||||
"singbox": {
|
|
||||||
"unexpected": "予期せぬサービスエラー",
|
|
||||||
"serviceNotRunning": "サービスが実行されていません",
|
|
||||||
"missingPrivilege": "権限がありません",
|
|
||||||
"missingPrivilegeMsg": "VPNモードには管理者権限が必要です。管理者として再起動するか、サービスモードを変更してください",
|
|
||||||
"missingGeoAssets": "GEOリソースファイルがありません",
|
|
||||||
"missingGeoAssetsMsg": "GEOリソースファイルがありません。アクティブなリソースを変更するか、設定で選択したリソースをダウンロードしてください。",
|
|
||||||
"invalidConfigOptions": "設定オプションが無効です",
|
|
||||||
"invalidConfig": "無効な設定",
|
|
||||||
"create": "サービス作成エラー",
|
|
||||||
"start": "サービス起動エラー"
|
|
||||||
},
|
|
||||||
"connectivity": {
|
|
||||||
"unexpected": "予期せぬ失敗",
|
|
||||||
"missingVpnPermission": "VPN権限がありません",
|
|
||||||
"missingNotificationPermission": "通知権限がありません",
|
|
||||||
"core": "コアエラー"
|
|
||||||
},
|
|
||||||
"profiles": {
|
|
||||||
"unexpected": "予期せぬエラー",
|
|
||||||
"notFound": "プロファイルが見つかりません",
|
|
||||||
"invalidConfig": "無効な設定",
|
|
||||||
"invalidUrl": "無効なURL"
|
|
||||||
},
|
|
||||||
"connection": {
|
|
||||||
"unexpected": "予期せぬ接続エラー",
|
|
||||||
"timeout": "接続タイムアウト",
|
|
||||||
"badResponse": "不正なレスポンス",
|
|
||||||
"connectionError": "接続エラー",
|
|
||||||
"badCertificate": "無効な証明書"
|
|
||||||
},
|
|
||||||
"geoAssets": {
|
|
||||||
"unexpected": "予期せぬエラー",
|
|
||||||
"notUpdate": "利用可能な更新はありません",
|
|
||||||
"activeNotFound": "アクティブなGEOリソースファイルが見つかりません"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"userInfo": {
|
|
||||||
"title": "マイ情報",
|
|
||||||
"bindingTip": "メール/電話番号が未登録です",
|
|
||||||
"myAccount": "マイアカウント",
|
|
||||||
"balance": "残高",
|
|
||||||
"noValidSubscription": "有効なサブスクリプションがありません",
|
|
||||||
"subscribeNow": "今すぐ購読",
|
|
||||||
"shortcuts": "ショートカット",
|
|
||||||
"adBlock": "広告ブロック",
|
|
||||||
"dnsUnlock": "DNSアンロック",
|
|
||||||
"contactUs": "お問い合わせ",
|
|
||||||
"others": "その他",
|
|
||||||
"logout": "ログアウト",
|
|
||||||
"logoutConfirmTitle": "ログアウト",
|
|
||||||
"logoutConfirmMessage": "ログアウトしますか?",
|
|
||||||
"logoutCancel": "キャンセル",
|
|
||||||
"vpnWebsite": "VPN公式サイト",
|
|
||||||
"telegram": "Telegram",
|
|
||||||
"mail": "メール",
|
|
||||||
"phone": "電話",
|
|
||||||
"customerService": "カスタマーサービス",
|
|
||||||
"workOrder": "チケット送信",
|
|
||||||
"pleaseLogin": "ログインしてください",
|
|
||||||
"subscriptionValid": "サブスクリプション有効",
|
|
||||||
"startTime": "開始時間:",
|
|
||||||
"expireTime": "有効期限:",
|
|
||||||
"loginNow": "今すぐログイン",
|
|
||||||
"trialPeriod": "トライアル期間",
|
|
||||||
"remainingTime": "残り時間",
|
|
||||||
"trialExpired": "トライアル期間が終了しました",
|
|
||||||
"subscriptionExpired": "サブスクリプションが期限切れです",
|
|
||||||
"copySuccess": "コピーしました",
|
|
||||||
"notAvailable": "利用不可",
|
|
||||||
"willBeDeleted": "削除されます",
|
|
||||||
"deleteAccountWarning": "アカウントの削除は永久的です。アカウントを削除すると、すべての機能が使用できなくなります。続行しますか?",
|
|
||||||
"requestDelete": "削除をリクエスト",
|
|
||||||
"deviceLimit": "デバイス制限:{count}",
|
|
||||||
"reset": "リセット",
|
|
||||||
"trafficUsage": "トラフィック:{used} / {total}",
|
|
||||||
"trafficProgress": {
|
|
||||||
"title": "トラフィック使用状況",
|
|
||||||
"unlimited": "無制限",
|
|
||||||
"limited": "使用済み"
|
|
||||||
},
|
|
||||||
"switchSubscription": "サブスクリプションの切り替え",
|
|
||||||
"resetTrafficTitle": "トラフィックリセット",
|
|
||||||
"resetTrafficMessage": "月間プランのトラフィックリセット例:次のサイクルのトラフィックを月次でリセットし、サブスクリプションの有効期限が{currentTime}から{newTime}に繰り上げられます",
|
|
||||||
"trialStatus": "トライアル状態",
|
|
||||||
"trialing": "トライアル中",
|
|
||||||
"trialEndMessage": "トライアル期間終了後は使用できなくなります",
|
|
||||||
"lastDaySubscriptionStatus": "サブスクリプション期限切れ間近",
|
|
||||||
"lastDaySubscriptionMessage": "期限切れ間近",
|
|
||||||
"subscriptionEndMessage": "サブスクリプション終了後は使用できなくなります",
|
|
||||||
"trialTimeWithDays": "{days}日{hours}時間{minutes}分{seconds}秒",
|
|
||||||
"trialTimeWithHours": "{hours}時間{minutes}分{seconds}秒",
|
|
||||||
"trialTimeWithMinutes": "{minutes}分{seconds}秒",
|
|
||||||
"refreshLatency": "レイテンシーを更新",
|
|
||||||
"testLatency": "レイテンシーテスト",
|
|
||||||
"testing": "レイテンシーテスト中",
|
|
||||||
"refreshLatencyDesc": "すべてのノードのレイテンシーを更新",
|
|
||||||
"testAllNodesLatency": "すべてのノードのネットワークレイテンシーをテスト",
|
|
||||||
"autoSelect": "自動選択",
|
|
||||||
"selected": "選択済み"
|
|
||||||
},
|
|
||||||
"setting": {
|
|
||||||
"title": "設定",
|
|
||||||
"vpnConnection": "VPN接続",
|
|
||||||
"countrySelector": "国を選択",
|
|
||||||
"general": "一般",
|
|
||||||
"autoConnect": "自動接続",
|
|
||||||
"routeRule": "ルーティングルール",
|
|
||||||
"appearance": "外観",
|
|
||||||
"notifications": "通知",
|
|
||||||
"helpImprove": "改善にご協力ください",
|
|
||||||
"helpImproveSubtitle": "改善にご協力くださいサブタイトル",
|
|
||||||
"requestDeleteAccount": "アカウント削除をリクエスト",
|
|
||||||
"goToDelete": "削除へ",
|
|
||||||
"rateUs": "App Storeで評価する",
|
|
||||||
"iosRating": "iOS評価",
|
|
||||||
"version": "バージョン",
|
|
||||||
"switchLanguage": "言語を切り替え",
|
|
||||||
"system": "システム",
|
|
||||||
"light": "ライト",
|
|
||||||
"dark": "ダーク",
|
|
||||||
"vpnModeSmart": "スマートモード",
|
|
||||||
"mode": "アウトバウンドモード",
|
|
||||||
"connectionTypeGlobal": "グローバルプロキシ",
|
|
||||||
"connectionTypeGlobalRemark": "有効時、すべてのトラフィックはプロキシ経由でルーティングされます",
|
|
||||||
"connectionTypeRule": "スマートプロキシ",
|
|
||||||
"connectionTypeRuleRemark": "[アウトバウンドモード]が[スマートプロキシ]に設定されている場合、システムは選択された国に基づいて国内と海外のトラフィックを自動的に分割します:国内IP/ドメインは直接接続、海外リクエストはプロキシ経由でアクセス",
|
|
||||||
"connectionTypeDirect": "ダイレクト接続",
|
|
||||||
"connectionTypeDirectRemark": "有効時、すべてのトラフィックはプロキシをバイパスします",
|
|
||||||
"smartMode": "スマートモード",
|
|
||||||
"secureMode": "セキュアモード"
|
|
||||||
},
|
|
||||||
"statistics": {
|
|
||||||
"title": "統計",
|
|
||||||
"vpnStatus": "VPNステータス",
|
|
||||||
"ipAddress": "IPアドレス",
|
|
||||||
"connectionTime": "接続時間",
|
|
||||||
"protocol": "プロトコル",
|
|
||||||
"weeklyProtectionTime": "週間保護時間",
|
|
||||||
"currentStreak": "現在の連続記録",
|
|
||||||
"highestStreak": "最高記録",
|
|
||||||
"longestConnection": "最長接続時間",
|
|
||||||
"days": "{days}日",
|
|
||||||
"daysOfWeek": {
|
|
||||||
"monday": "月",
|
|
||||||
"tuesday": "火",
|
|
||||||
"wednesday": "水",
|
|
||||||
"thursday": "木",
|
|
||||||
"friday": "金",
|
|
||||||
"saturday": "土",
|
|
||||||
"sunday": "日"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"message": {
|
|
||||||
"title": "通知",
|
|
||||||
"system": "システムメッセージ",
|
|
||||||
"promotion": "プロモーションメッセージ"
|
|
||||||
},
|
|
||||||
"invite": {
|
|
||||||
"title": "友達を招待",
|
|
||||||
"progress": "招待の進捗",
|
|
||||||
"inviteStats": "招待統計",
|
|
||||||
"registers": "登録済み",
|
|
||||||
"totalCommission": "総報酬",
|
|
||||||
"rewardDetails": "報酬の詳細 >",
|
|
||||||
"steps": "招待の手順",
|
|
||||||
"inviteFriend": "友達を招待",
|
|
||||||
"acceptInvite": "友達が招待を受け入れ\n注文して登録",
|
|
||||||
"getReward": "報酬を獲得",
|
|
||||||
"shareLink": "リンクを共有",
|
|
||||||
"shareQR": "QRコードを共有",
|
|
||||||
"rules": "招待ルール",
|
|
||||||
"rule1": "1. 専用の招待リンクまたは招待コードを共有して、友達を招待できます。",
|
|
||||||
"rule2": "2. 友達が登録とログインを完了すると、招待報酬が自動的にアカウントに付与されます。",
|
|
||||||
"pending": "保留中",
|
|
||||||
"processing": "処理中",
|
|
||||||
"success": "成功",
|
|
||||||
"expired": "期限切れ",
|
|
||||||
"myInviteCode": "招待コード",
|
|
||||||
"inviteCodeCopied": "招待コードをクリップボードにコピーしました",
|
|
||||||
"close": "閉じる",
|
|
||||||
"saveQRCode": "QRコードを保存",
|
|
||||||
"qrCodeSaved": "QRコードを保存しました",
|
|
||||||
"copiedToClipboard": "クリップボードにコピーしました",
|
|
||||||
"getInviteCodeFailed": "招待コードの取得に失敗しました。後ほど再試行してください",
|
|
||||||
"generateQRCodeFailed": "QRコードの生成に失敗しました。後ほど再試行してください",
|
|
||||||
"generateShareLinkFailed": "共有リンクの生成に失敗しました。後ほど再試行してください"
|
|
||||||
},
|
|
||||||
"purchaseMembership": {
|
|
||||||
"purchasePackage": "パッケージ購入",
|
|
||||||
"noData": "利用可能なパッケージはありません",
|
|
||||||
"myAccount": "マイアカウント",
|
|
||||||
"selectPackage": "パッケージを選択",
|
|
||||||
"packageDescription": "パッケージ説明",
|
|
||||||
"paymentMethod": "支払い方法",
|
|
||||||
"cancelAnytime": "アプリでいつでもキャンセル可能",
|
|
||||||
"startSubscription": "サブスクリプションを開始",
|
|
||||||
"renewNow": "今すぐ更新",
|
|
||||||
"month": "{months}ヶ月",
|
|
||||||
"year": "{years}年",
|
|
||||||
"day": "{days}日",
|
|
||||||
"unlimitedTraffic": "無制限トラフィック",
|
|
||||||
"unlimitedDevices": "無制限デバイス",
|
|
||||||
"devices": "{count}台",
|
|
||||||
"features": "パッケージ機能",
|
|
||||||
"expand": "展開",
|
|
||||||
"collapse": "折りたたむ",
|
|
||||||
"confirmPurchase": "購入を確認",
|
|
||||||
"confirmPurchaseDesc": "このパッケージを購入してもよろしいですか?",
|
|
||||||
"subscriptionPrivacyInfo": "サブスクリプションとプライバシー情報"
|
|
||||||
},
|
|
||||||
"orderStatus": {
|
|
||||||
"title": "注文状態",
|
|
||||||
"pending": {
|
|
||||||
"title": "支払い待ち",
|
|
||||||
"description": "支払いを完了してください"
|
|
||||||
},
|
|
||||||
"paid": {
|
|
||||||
"title": "支払い完了",
|
|
||||||
"description": "注文を処理中です"
|
|
||||||
},
|
|
||||||
"success": {
|
|
||||||
"title": "おめでとうございます!支払い成功",
|
|
||||||
"description": "パッケージの購入が完了しました"
|
|
||||||
},
|
|
||||||
"closed": {
|
|
||||||
"title": "注文キャンセル",
|
|
||||||
"description": "新規注文をお願いします"
|
|
||||||
},
|
|
||||||
"failed": {
|
|
||||||
"title": "支払い失敗",
|
|
||||||
"description": "支払いを再試行してください"
|
|
||||||
},
|
|
||||||
"unknown": {
|
|
||||||
"title": "不明な状態",
|
|
||||||
"description": "カスタマーサービスにお問い合わせください"
|
|
||||||
},
|
|
||||||
"checkFailed": {
|
|
||||||
"title": "確認失敗",
|
|
||||||
"description": "後でもう一度お試しください"
|
|
||||||
},
|
|
||||||
"initial": {
|
|
||||||
"title": "支払い処理中",
|
|
||||||
"description": "支払い処理中です。お待ちください"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"home": {
|
|
||||||
"welcome": "Hi快VPNへようこそ",
|
|
||||||
"disconnected": "未接続",
|
|
||||||
"connecting": "接続中",
|
|
||||||
"connected": "接続済み",
|
|
||||||
"disconnecting": "切断中",
|
|
||||||
"currentConnectionTitle": "現在の接続",
|
|
||||||
"switchNode": "ノード切替",
|
|
||||||
"timeout": "タイムアウト",
|
|
||||||
"loading": "読み込み中...",
|
|
||||||
"error": "読み込みエラー",
|
|
||||||
"checkNetwork": "ネットワーク接続を確認して再試行してください",
|
|
||||||
"retry": "再試行",
|
|
||||||
"connectionSectionTitle": "接続方法",
|
|
||||||
"dedicatedServers": "専用サーバー",
|
|
||||||
"countryRegion": "国/地域",
|
|
||||||
"serverListTitle": "専用サーバーグループ",
|
|
||||||
"nodeListTitle": "全ノード",
|
|
||||||
"countryListTitle": "国/地域リスト",
|
|
||||||
"noServers": "利用可能なサーバーがありません",
|
|
||||||
"noNodes": "利用可能なノードがありません",
|
|
||||||
"noRegions": "利用可能な地域がありません",
|
|
||||||
"subscriptionDescription": "プレミアムアクセスで高速グローバルネットワークを利用",
|
|
||||||
"subscribe": "購読する",
|
|
||||||
"trialPeriod": "プレミアムトライアルへようこそ",
|
|
||||||
"remainingTime": "残り時間",
|
|
||||||
"trialExpired": "トライアル期間が終了し、接続が切断されました",
|
|
||||||
"subscriptionExpired": "サブスクリプションが期限切れとなり、接続が切断されました",
|
|
||||||
"subscriptionUpdated": "サブスクリプションが更新されました",
|
|
||||||
"subscriptionUpdatedMessage": "サブスクリプション情報が更新されました。最新の状態を確認するには更新してください",
|
|
||||||
"trialStatus": "トライアル状態",
|
|
||||||
"trialing": "トライアル中",
|
|
||||||
"trialEndMessage": "トライアル期間終了後は使用できなくなります",
|
|
||||||
"lastDaySubscriptionStatus": "サブスクリプション期限切れ間近",
|
|
||||||
"lastDaySubscriptionMessage": "期限切れ間近",
|
|
||||||
"subscriptionEndMessage": "サブスクリプション終了後は使用できなくなります",
|
|
||||||
"trialTimeWithDays": "{days}日{hours}時間{minutes}分{seconds}秒",
|
|
||||||
"trialTimeWithHours": "{hours}時間{minutes}分{seconds}秒",
|
|
||||||
"trialTimeWithMinutes": "{minutes}分{seconds}秒",
|
|
||||||
"refreshLatency": "レイテンシー更新",
|
|
||||||
"testLatency": "レイテンシーテスト",
|
|
||||||
"testing": "レイテンシーテスト中",
|
|
||||||
"refreshLatencyDesc": "全ノードのレイテンシーを更新",
|
|
||||||
"testAllNodesLatency": "全ノードのネットワークレイテンシーをテスト",
|
|
||||||
"autoSelect": "自動選択",
|
|
||||||
"selected": "選択済み"
|
|
||||||
},
|
|
||||||
"dialog": {
|
|
||||||
"confirm": "確認",
|
|
||||||
"cancel": "キャンセル",
|
|
||||||
"ok": "OK",
|
|
||||||
"iKnow": "分かりました"
|
|
||||||
},
|
|
||||||
"splash": {
|
|
||||||
"appName": "Hi快VPN",
|
|
||||||
"slogan": "高速グローバルネットワーク",
|
|
||||||
"initializing": "初期化中...",
|
|
||||||
"networkConnectionFailure": "ネットワーク接続エラー、確認して再試行してください",
|
|
||||||
"retry": "再試行",
|
|
||||||
"networkPermissionFailed": "ネットワーク権限の取得に失敗しました",
|
|
||||||
"initializationFailed": "初期化に失敗しました"
|
|
||||||
},
|
|
||||||
"network": {
|
|
||||||
"status": {
|
|
||||||
"connected": "接続済み",
|
|
||||||
"disconnected": "未接続",
|
|
||||||
"connecting": "接続中...",
|
|
||||||
"disconnecting": "切断中...",
|
|
||||||
"reconnecting": "再接続中...",
|
|
||||||
"failed": "接続エラー"
|
|
||||||
},
|
|
||||||
"permission": {
|
|
||||||
"title": "ネットワーク権限",
|
|
||||||
"description": "VPNサービスを提供するにはネットワーク権限が必要です",
|
|
||||||
"goToSettings": "設定へ",
|
|
||||||
"cancel": "キャンセル"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"update": {
|
|
||||||
"title": "アップデートが利用可能",
|
|
||||||
"content": "今すぐアップデートしますか?",
|
|
||||||
"updateNow": "今すぐアップデート",
|
|
||||||
"updateLater": "後で",
|
|
||||||
"defaultContent": "1. アプリのパフォーマンス最適化\n2. 既知の問題の修正\n3. ユーザー体験の向上"
|
|
||||||
},
|
|
||||||
"country": {
|
|
||||||
"cn": "中国",
|
|
||||||
"ir": "イラン",
|
|
||||||
"af": "アフガニスタン",
|
|
||||||
"ru": "ロシア",
|
|
||||||
"id": "インドネシア",
|
|
||||||
"tr": "トルコ",
|
|
||||||
"br": "ブラジル"
|
|
||||||
},
|
|
||||||
"error": {
|
|
||||||
"200": "成功",
|
|
||||||
"500": "サーバー内部エラー",
|
|
||||||
"10001": "データベースクエリエラー",
|
|
||||||
"10002": "データベース更新エラー",
|
|
||||||
"10003": "データベース挿入エラー",
|
|
||||||
"10004": "データベース削除エラー",
|
|
||||||
"20001": "ユーザーは既に存在します",
|
|
||||||
"20002": "ユーザーが存在しません",
|
|
||||||
"20003": "ユーザーパスワードが間違っています",
|
|
||||||
"20004": "ユーザーは無効化されています",
|
|
||||||
"20005": "残高不足",
|
|
||||||
"20006": "登録は停止されています",
|
|
||||||
"20007": "Telegramが未連携です",
|
|
||||||
"20008": "ユーザーがOAuthを連携していません",
|
|
||||||
"20009": "招待コードが間違っています",
|
|
||||||
"30001": "ノードは既に存在します",
|
|
||||||
"30002": "ノードが存在しません",
|
|
||||||
"30003": "ノードグループは既に存在します",
|
|
||||||
"30004": "ノードグループが存在しません",
|
|
||||||
"30005": "ノードグループは空ではありません",
|
|
||||||
"400": "パラメータエラー",
|
|
||||||
"40002": "ユーザートークンが空です",
|
|
||||||
"40003": "ユーザートークンが無効です",
|
|
||||||
"40004": "ユーザートークンの有効期限が切れています",
|
|
||||||
"40005": "ログインしていません",
|
|
||||||
"401": "リクエストが多すぎます",
|
|
||||||
"50001": "クーポンが存在しません",
|
|
||||||
"50002": "クーポンは既に使用されています",
|
|
||||||
"50003": "クーポンが一致しません",
|
|
||||||
"60001": "サブスクリプションの有効期限が切れています",
|
|
||||||
"60002": "サブスクリプションは利用できません",
|
|
||||||
"60003": "ユーザーは既にサブスクリプションを持っています",
|
|
||||||
"60004": "サブスクリプションは既に使用されています",
|
|
||||||
"60005": "単一サブスクリプションモードの制限を超えています",
|
|
||||||
"60006": "サブスクリプションクォータ制限",
|
|
||||||
"70001": "認証コードが間違っています",
|
|
||||||
"80001": "キューイングエラー",
|
|
||||||
"90001": "デバッグモードが有効です",
|
|
||||||
"90002": "SMS送信エラー",
|
|
||||||
"90003": "SMS機能が有効になっていません",
|
|
||||||
"90004": "メール機能が有効になっていません",
|
|
||||||
"90005": "サポートされていないログイン方法",
|
|
||||||
"90006": "認証器がこの方法をサポートしていません",
|
|
||||||
"90007": "電話国番号が空です",
|
|
||||||
"90008": "パスワードが空です",
|
|
||||||
"90009": "国番号が空です",
|
|
||||||
"90010": "パスワードまたは認証コードが必要です",
|
|
||||||
"90011": "メールアドレスは既に存在します",
|
|
||||||
"90012": "電話番号は既に存在します",
|
|
||||||
"90013": "デバイスは既に存在します",
|
|
||||||
"90014": "電話番号が間違っています",
|
|
||||||
"90015": "このアカウントは本日の送信制限に達しました",
|
|
||||||
"90017": "デバイスが存在しません",
|
|
||||||
"90018": "ユーザーIDが一致しません",
|
|
||||||
"61001": "注文が存在しません",
|
|
||||||
"61002": "支払い方法が見つかりません",
|
|
||||||
"61003": "注文状態が間違っています",
|
|
||||||
"61004": "リセット期間が不足しています",
|
|
||||||
"61005": "未使用のトラフィックが存在します"
|
|
||||||
},
|
|
||||||
"tray": {
|
|
||||||
"open_dashboard": "ダッシュボードを開く",
|
|
||||||
"copy_to_terminal": "ターミナルにコピー",
|
|
||||||
"exit_app": "アプリを終了"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -9,6 +9,7 @@
|
|||||||
"enterEmail": "Please enter email address",
|
"enterEmail": "Please enter email address",
|
||||||
"enterCode": "Введите код подтверждения",
|
"enterCode": "Введите код подтверждения",
|
||||||
"enterPassword": "Введите пароль",
|
"enterPassword": "Введите пароль",
|
||||||
|
"enterPasswordForPhone": "Пожалуйста, введите пароль (Вход с паролем)",
|
||||||
"reenterPassword": "Повторите пароль",
|
"reenterPassword": "Повторите пароль",
|
||||||
"forgotPassword": "Забыли пароль",
|
"forgotPassword": "Забыли пароль",
|
||||||
"codeLogin": "Вход по коду",
|
"codeLogin": "Вход по коду",
|
||||||
@@ -18,6 +19,8 @@
|
|||||||
"privacyPolicy": "Политикой конфиденциальности",
|
"privacyPolicy": "Политикой конфиденциальности",
|
||||||
"next": "Далее",
|
"next": "Далее",
|
||||||
"registerNow": "Зарегистрироваться",
|
"registerNow": "Зарегистрироваться",
|
||||||
|
"registerAccount": "Зарегистрировать аккаунт",
|
||||||
|
"clickToRegister": "Нажмите, чтобы зарегистрироваться",
|
||||||
"setAndLogin": "Установить и войти",
|
"setAndLogin": "Установить и войти",
|
||||||
"enterAccount": "Введите аккаунт",
|
"enterAccount": "Введите аккаунт",
|
||||||
"passwordMismatch": "Два введенных пароля не совпадают",
|
"passwordMismatch": "Два введенных пароля не совпадают",
|
||||||
@@ -25,7 +28,9 @@
|
|||||||
"codeSentCountdown": "Код отправлен {seconds}с",
|
"codeSentCountdown": "Код отправлен {seconds}с",
|
||||||
"and": "и",
|
"and": "и",
|
||||||
"enterInviteCode": "Введите код приглашения (необязательно)",
|
"enterInviteCode": "Введите код приглашения (необязательно)",
|
||||||
"registerSuccess": "Регистрация успешна"
|
"registerSuccess": "Регистрация успешна",
|
||||||
|
"search": "Поиск",
|
||||||
|
"selectOtherRegion": "Выбрать другой регион"
|
||||||
},
|
},
|
||||||
"failure": {
|
"failure": {
|
||||||
"unexpected": "Непредвиденная ошибка",
|
"unexpected": "Непредвиденная ошибка",
|
||||||
@@ -187,7 +192,8 @@
|
|||||||
"friday": "Пт",
|
"friday": "Пт",
|
||||||
"saturday": "Сб",
|
"saturday": "Сб",
|
||||||
"sunday": "Вс"
|
"sunday": "Вс"
|
||||||
}
|
},
|
||||||
|
"processTrafficFailed": "Не удалось обработать данные журнала трафика"
|
||||||
},
|
},
|
||||||
"message": {
|
"message": {
|
||||||
"title": "Уведомления",
|
"title": "Уведомления",
|
||||||
@@ -464,6 +470,7 @@
|
|||||||
"initializing": "Инициализация...",
|
"initializing": "Инициализация...",
|
||||||
"networkConnectionFailure": "Ошибка подключения к сети, проверьте и повторите попытку",
|
"networkConnectionFailure": "Ошибка подключения к сети, проверьте и повторите попытку",
|
||||||
"retry": "Повторить",
|
"retry": "Повторить",
|
||||||
|
"skip": "Пропустить",
|
||||||
"networkPermissionFailed": "Не удалось получить разрешение на использование сети",
|
"networkPermissionFailed": "Не удалось получить разрешение на использование сети",
|
||||||
"initializationFailed": "Ошибка инициализации"
|
"initializationFailed": "Ошибка инициализации"
|
||||||
},
|
},
|
||||||
@@ -482,5 +489,33 @@
|
|||||||
"goToSettings": "Перейти в настройки",
|
"goToSettings": "Перейти в настройки",
|
||||||
"cancel": "Отмена"
|
"cancel": "Отмена"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"crisp": {
|
||||||
|
"initializingSystem": "Инициализация системы обслуживания клиентов...",
|
||||||
|
"initFailed": "Не удалось инициализировать систему обслуживания клиентов"
|
||||||
|
},
|
||||||
|
"common": {
|
||||||
|
"retry": "Повторить",
|
||||||
|
"tryBrowser": "Попробовать открыть в браузере",
|
||||||
|
"cannotOpenBrowser": "Не удается открыть браузер",
|
||||||
|
"openLinkFailed": "Не удалось открыть ссылку, попробуйте позже",
|
||||||
|
"cannotOpenTelegram": "Не удается открыть ссылку Telegram"
|
||||||
|
},
|
||||||
|
"subscribe": {
|
||||||
|
"pleaseSelectFirst": "Сначала выберите подписку",
|
||||||
|
"resetPeriodFailed": "Не удалось сбросить период подписки",
|
||||||
|
"resetPeriodSuccess": "Период подписки успешно сброшен"
|
||||||
|
},
|
||||||
|
"purchase": {
|
||||||
|
"noAvailablePlans": "Нет доступных планов"
|
||||||
|
},
|
||||||
|
"payment": {
|
||||||
|
"cannotOpenLink": "Не удается открыть ссылку для оплаты",
|
||||||
|
"linkEmpty": "Ссылка для оплаты пуста",
|
||||||
|
"unsupportedType": "Неподдерживаемый тип оплаты"
|
||||||
|
},
|
||||||
|
"account": {
|
||||||
|
"accountRequired": "Учетная запись не может быть пустой",
|
||||||
|
"deleteSuccess": "Учетная запись успешно удалена"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,442 +0,0 @@
|
|||||||
{
|
|
||||||
"login": {
|
|
||||||
"welcome": "Добро пожаловать в Hi快VPN!",
|
|
||||||
"verifyPhone": "Подтвердите номер телефона",
|
|
||||||
"verifyEmail": "Подтвердите email",
|
|
||||||
"codeSent": "6-значный код отправлен на {account}. Введите его в течение 30 минут.",
|
|
||||||
"back": "Назад",
|
|
||||||
"enterEmailOrPhone": "Введите email или номер телефона",
|
|
||||||
"enterCode": "Введите код подтверждения",
|
|
||||||
"enterPassword": "Введите пароль",
|
|
||||||
"reenterPassword": "Повторите пароль",
|
|
||||||
"forgotPassword": "Забыли пароль",
|
|
||||||
"codeLogin": "Вход по коду",
|
|
||||||
"passwordLogin": "Вход по паролю",
|
|
||||||
"agreeTerms": "Вход/Создать аккаунт, я соглашаюсь с",
|
|
||||||
"termsOfService": "Условиями использования",
|
|
||||||
"privacyPolicy": "Политикой конфиденциальности",
|
|
||||||
"next": "Далее",
|
|
||||||
"registerNow": "Зарегистрироваться",
|
|
||||||
"setAndLogin": "Установить и войти",
|
|
||||||
"enterAccount": "Введите аккаунт",
|
|
||||||
"passwordMismatch": "Два введенных пароля не совпадают",
|
|
||||||
"sendCode": "Отправить код",
|
|
||||||
"codeSentCountdown": "Код отправлен {seconds}с",
|
|
||||||
"and": "и",
|
|
||||||
"enterInviteCode": "Введите код приглашения (необязательно)",
|
|
||||||
"registerSuccess": "Регистрация успешна"
|
|
||||||
},
|
|
||||||
"failure": {
|
|
||||||
"unexpected": "Непредвиденная ошибка",
|
|
||||||
"clash": {
|
|
||||||
"unexpected": "Непредвиденная ошибка",
|
|
||||||
"core": "Ошибка Clash ${reason}"
|
|
||||||
},
|
|
||||||
"singbox": {
|
|
||||||
"unexpected": "Непредвиденная ошибка сервиса",
|
|
||||||
"serviceNotRunning": "Сервис не запущен",
|
|
||||||
"missingPrivilege": "Отсутствуют привилегии",
|
|
||||||
"missingPrivilegeMsg": "Режим VPN требует прав администратора. Перезапустите приложение с правами администратора или измените режим сервиса",
|
|
||||||
"missingGeoAssets": "Отсутствуют GEO-ресурсы",
|
|
||||||
"missingGeoAssetsMsg": "Отсутствуют файлы GEO-ресурсов. Измените активные ресурсы или загрузите выбранные ресурсы в настройках.",
|
|
||||||
"invalidConfigOptions": "Недопустимые параметры конфигурации",
|
|
||||||
"invalidConfig": "Недопустимая конфигурация",
|
|
||||||
"create": "Ошибка создания сервиса",
|
|
||||||
"start": "Ошибка запуска сервиса"
|
|
||||||
},
|
|
||||||
"connectivity": {
|
|
||||||
"unexpected": "Непредвиденный сбой",
|
|
||||||
"missingVpnPermission": "Отсутствует разрешение VPN",
|
|
||||||
"missingNotificationPermission": "Отсутствует разрешение на уведомления",
|
|
||||||
"core": "Ошибка ядра"
|
|
||||||
},
|
|
||||||
"profiles": {
|
|
||||||
"unexpected": "Непредвиденная ошибка",
|
|
||||||
"notFound": "Профиль не найден",
|
|
||||||
"invalidConfig": "Недопустимая конфигурация",
|
|
||||||
"invalidUrl": "Недопустимый URL"
|
|
||||||
},
|
|
||||||
"connection": {
|
|
||||||
"unexpected": "Непредвиденная ошибка подключения",
|
|
||||||
"timeout": "Тайм-аут подключения",
|
|
||||||
"badResponse": "Некорректный ответ",
|
|
||||||
"connectionError": "Ошибка подключения",
|
|
||||||
"badCertificate": "Недействительный сертификат"
|
|
||||||
},
|
|
||||||
"geoAssets": {
|
|
||||||
"unexpected": "Непредвиденная ошибка",
|
|
||||||
"notUpdate": "Нет доступных обновлений",
|
|
||||||
"activeNotFound": "Активные GEO-ресурсы не найдены"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"userInfo": {
|
|
||||||
"title": "Моя информация",
|
|
||||||
"bindingTip": "Email/телефон не привязаны",
|
|
||||||
"myAccount": "Мой аккаунт",
|
|
||||||
"balance": "Баланс",
|
|
||||||
"noValidSubscription": "Нет активной подписки",
|
|
||||||
"subscribeNow": "Подписаться сейчас",
|
|
||||||
"shortcuts": "Ярлыки",
|
|
||||||
"adBlock": "Блокировка рекламы",
|
|
||||||
"dnsUnlock": "Разблокировка DNS",
|
|
||||||
"contactUs": "Связаться с нами",
|
|
||||||
"others": "Прочее",
|
|
||||||
"logout": "Выйти",
|
|
||||||
"logoutConfirmTitle": "Выйти",
|
|
||||||
"logoutConfirmMessage": "Вы уверены, что хотите выйти?",
|
|
||||||
"logoutCancel": "Отмена",
|
|
||||||
"vpnWebsite": "Сайт VPN",
|
|
||||||
"telegram": "Telegram",
|
|
||||||
"mail": "Email",
|
|
||||||
"phone": "Телефон",
|
|
||||||
"customerService": "Служба поддержки",
|
|
||||||
"workOrder": "Создать заявку",
|
|
||||||
"pleaseLogin": "Пожалуйста, войдите",
|
|
||||||
"subscriptionValid": "Подписка активна",
|
|
||||||
"startTime": "Время начала:",
|
|
||||||
"expireTime": "Срок действия:",
|
|
||||||
"loginNow": "Войти сейчас",
|
|
||||||
"trialPeriod": "Добро пожаловать в пробную версию Premium",
|
|
||||||
"remainingTime": "Осталось времени",
|
|
||||||
"trialExpired": "Пробный период истёк, соединение разорвано",
|
|
||||||
"subscriptionExpired": "Подписка истекла, соединение разорвано",
|
|
||||||
"switchSubscription": "Сменить подписку",
|
|
||||||
"resetTrafficTitle": "Сброс трафика",
|
|
||||||
"resetTrafficMessage": "Пример сброса трафика месячного плана: сброс трафика следующего цикла ежемесячно, и срок действия подписки будет перенесен с {currentTime} на {newTime}",
|
|
||||||
"reset": "Сбросить",
|
|
||||||
"trafficUsage": "Использовано: {used} / {total}",
|
|
||||||
"trafficProgress": {
|
|
||||||
"title": "Использование трафика",
|
|
||||||
"unlimited": "Безлимитный трафик",
|
|
||||||
"limited": "Использованный трафик"
|
|
||||||
},
|
|
||||||
"deviceLimit": "Лимит устройств: {count}",
|
|
||||||
"copySuccess": "Скопировано успешно",
|
|
||||||
"notAvailable": "Недоступно",
|
|
||||||
"willBeDeleted": "Будет удалено",
|
|
||||||
"deleteAccountWarning": "Удаление аккаунта необратимо. После удаления аккаунта вы не сможете использовать все функции. Продолжить?",
|
|
||||||
"requestDelete": "Запросить удаление",
|
|
||||||
"trialStatus": "Статус пробного периода",
|
|
||||||
"trialing": "Пробный период",
|
|
||||||
"trialEndMessage": "После окончания пробного периода использование будет невозможно",
|
|
||||||
"lastDaySubscriptionStatus": "Подписка скоро истечет",
|
|
||||||
"lastDaySubscriptionMessage": "Скоро истечет",
|
|
||||||
"subscriptionEndMessage": "После окончания подписки использование будет невозможно",
|
|
||||||
"trialTimeWithDays": "{days}д {hours}ч {minutes}м {seconds}с",
|
|
||||||
"trialTimeWithHours": "{hours}ч {minutes}м {seconds}с",
|
|
||||||
"trialTimeWithMinutes": "{minutes}м {seconds}с",
|
|
||||||
"refreshLatency": "Обновить задержку",
|
|
||||||
"testLatency": "Тест задержки",
|
|
||||||
"testing": "Тестирование задержки",
|
|
||||||
"refreshLatencyDesc": "Обновить задержку всех узлов",
|
|
||||||
"testAllNodesLatency": "Тест сетевой задержки всех узлов",
|
|
||||||
"autoSelect": "Автоматический выбор",
|
|
||||||
"selected": "Выбрано"
|
|
||||||
},
|
|
||||||
"setting": {
|
|
||||||
"title": "Настройки",
|
|
||||||
"countrySelector": "Выбрать страну",
|
|
||||||
"vpnConnection": "VPN-подключение",
|
|
||||||
"general": "Общие",
|
|
||||||
"autoConnect": "Автоподключение",
|
|
||||||
"routeRule": "Правила маршрутизации",
|
|
||||||
"appearance": "Внешний вид",
|
|
||||||
"notifications": "Уведомления",
|
|
||||||
"helpImprove": "Помогите нам улучшить",
|
|
||||||
"helpImproveSubtitle": "Подзаголовок помощи в улучшении",
|
|
||||||
"requestDeleteAccount": "Запросить удаление аккаунта",
|
|
||||||
"goToDelete": "Перейти к удалению",
|
|
||||||
"rateUs": "Оцените нас в App Store",
|
|
||||||
"iosRating": "Оценка iOS",
|
|
||||||
"version": "Версия",
|
|
||||||
"switchLanguage": "Сменить язык",
|
|
||||||
"system": "Система",
|
|
||||||
"light": "Светлая",
|
|
||||||
"dark": "Тёмная",
|
|
||||||
"vpnModeSmart": "Умный режим",
|
|
||||||
"mode": "Исходящий режим",
|
|
||||||
"connectionTypeGlobal": "Глобальный прокси",
|
|
||||||
"connectionTypeGlobalRemark": "При включении весь трафик проходит через прокси",
|
|
||||||
"connectionTypeRule": "Умный прокси",
|
|
||||||
"connectionTypeRuleRemark": "Когда [Исходящий режим] установлен на [Умный прокси], система автоматически разделяет внутренний и международный трафик в соответствии с выбранной страной: внутренние IP/домены подключаются напрямую, а зарубежные запросы проходят через прокси",
|
|
||||||
"connectionTypeDirect": "Прямое подключение",
|
|
||||||
"connectionTypeDirectRemark": "При включении весь трафик обходит прокси",
|
|
||||||
"smartMode": "Умный режим",
|
|
||||||
"secureMode": "Безопасный режим"
|
|
||||||
},
|
|
||||||
"statistics": {
|
|
||||||
"title": "Статистика",
|
|
||||||
"vpnStatus": "Статус VPN",
|
|
||||||
"ipAddress": "IP-адрес",
|
|
||||||
"connectionTime": "Время подключения",
|
|
||||||
"protocol": "Протокол",
|
|
||||||
"weeklyProtectionTime": "Время защиты за неделю",
|
|
||||||
"currentStreak": "Текущая серия",
|
|
||||||
"highestStreak": "Рекорд",
|
|
||||||
"longestConnection": "Самое долгое подключение",
|
|
||||||
"days": "{days} дн.",
|
|
||||||
"daysOfWeek": {
|
|
||||||
"monday": "Пн",
|
|
||||||
"tuesday": "Вт",
|
|
||||||
"wednesday": "Ср",
|
|
||||||
"thursday": "Чт",
|
|
||||||
"friday": "Пт",
|
|
||||||
"saturday": "Сб",
|
|
||||||
"sunday": "Вс"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"message": {
|
|
||||||
"title": "Уведомления",
|
|
||||||
"system": "Системные сообщения",
|
|
||||||
"promotion": "Рекламные сообщения"
|
|
||||||
},
|
|
||||||
"invite": {
|
|
||||||
"title": "Пригласить друзей",
|
|
||||||
"progress": "Прогресс приглашений",
|
|
||||||
"inviteStats": "Статистика приглашений",
|
|
||||||
"registers": "Зарегистрировано",
|
|
||||||
"totalCommission": "Общая комиссия",
|
|
||||||
"rewardDetails": "Детали вознаграждения >",
|
|
||||||
"steps": "Шаги Приглашения",
|
|
||||||
"inviteFriend": "Пригласить Друзей",
|
|
||||||
"acceptInvite": "Друзья принимают приглашение",
|
|
||||||
"getReward": "Получить Вознаграждение",
|
|
||||||
"shareLink": "Поделиться Ссылкой",
|
|
||||||
"shareQR": "Поделиться QR-кодом",
|
|
||||||
"rules": "Правила Приглашения",
|
|
||||||
"rule1": "1. Вы можете приглашать друзей присоединиться к нам, поделившись своей уникальной ссылкой или кодом приглашения.",
|
|
||||||
"rule2": "2. После того, как друзья завершат регистрацию и войдут в систему, вознаграждения за приглашение будут автоматически зачислены на ваш счет.",
|
|
||||||
"pending": "В Ожидании",
|
|
||||||
"processing": "В Обработке",
|
|
||||||
"success": "Успешно",
|
|
||||||
"expired": "Истекло",
|
|
||||||
"myInviteCode": "Мой Код Приглашения",
|
|
||||||
"inviteCodeCopied": "Код приглашения скопирован в буфер обмена",
|
|
||||||
"close": "Закрыть",
|
|
||||||
"saveQRCode": "Сохранить QR-код",
|
|
||||||
"qrCodeSaved": "QR-код сохранен",
|
|
||||||
"copiedToClipboard": "Скопировано в буфер обмена",
|
|
||||||
"getInviteCodeFailed": "Не удалось получить код приглашения, попробуйте позже",
|
|
||||||
"generateQRCodeFailed": "Не удалось сгенерировать QR-код, попробуйте позже",
|
|
||||||
"generateShareLinkFailed": "Не удалось сгенерировать ссылку для общего доступа, попробуйте позже"
|
|
||||||
},
|
|
||||||
"purchaseMembership": {
|
|
||||||
"purchasePackage": "Купить Пакет",
|
|
||||||
"noData": "Нет доступных пакетов",
|
|
||||||
"myAccount": "Мой Аккаунт",
|
|
||||||
"selectPackage": "Выбрать Пакет",
|
|
||||||
"packageDescription": "Описание Пакета",
|
|
||||||
"paymentMethod": "Способ Оплаты",
|
|
||||||
"cancelAnytime": "Вы можете отменить в любое время в приложении",
|
|
||||||
"startSubscription": "Начать Подписку",
|
|
||||||
"subscriptionPrivacyInfo": "Информация о Подписке и Конфиденциальности",
|
|
||||||
"month": "{months} Месяц(ев)",
|
|
||||||
"year": "{years} Год(а)",
|
|
||||||
"day": "{days} день",
|
|
||||||
"unlimitedTraffic": "Безлимитный трафик",
|
|
||||||
"unlimitedDevices": "Безлимитные устройства",
|
|
||||||
"devices": "{count} устройств",
|
|
||||||
"trafficLimit": "Ограничение трафика",
|
|
||||||
"deviceLimit": "Лимит устройств: {count}",
|
|
||||||
"features": "Функции пакета",
|
|
||||||
"expand": "Развернуть",
|
|
||||||
"collapse": "Свернуть",
|
|
||||||
"confirmPurchase": "Подтвердить покупку",
|
|
||||||
"confirmPurchaseDesc": "Вы уверены, что хотите приобрести этот пакет?"
|
|
||||||
},
|
|
||||||
"orderStatus": {
|
|
||||||
"title": "Статус заказа",
|
|
||||||
"pending": {
|
|
||||||
"title": "Ожидание оплаты",
|
|
||||||
"description": "Пожалуйста, завершите оплату"
|
|
||||||
},
|
|
||||||
"paid": {
|
|
||||||
"title": "Оплата получена",
|
|
||||||
"description": "Обработка вашего заказа"
|
|
||||||
},
|
|
||||||
"success": {
|
|
||||||
"title": "Поздравляем! Оплата успешна",
|
|
||||||
"description": "Ваш пакет успешно приобретен"
|
|
||||||
},
|
|
||||||
"closed": {
|
|
||||||
"title": "Заказ закрыт",
|
|
||||||
"description": "Пожалуйста, сделайте новый заказ"
|
|
||||||
},
|
|
||||||
"failed": {
|
|
||||||
"title": "Ошибка оплаты",
|
|
||||||
"description": "Пожалуйста, попробуйте оплату снова"
|
|
||||||
},
|
|
||||||
"unknown": {
|
|
||||||
"title": "Неизвестный статус",
|
|
||||||
"description": "Пожалуйста, свяжитесь со службой поддержки"
|
|
||||||
},
|
|
||||||
"checkFailed": {
|
|
||||||
"title": "Ошибка проверки",
|
|
||||||
"description": "Пожалуйста, попробуйте позже"
|
|
||||||
},
|
|
||||||
"initial": {
|
|
||||||
"title": "Обработка оплаты",
|
|
||||||
"description": "Пожалуйста, подождите, пока мы обрабатываем вашу оплату"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"home": {
|
|
||||||
"welcome": "Добро пожаловать в Hi快VPN",
|
|
||||||
"disconnected": "Не подключено",
|
|
||||||
"connecting": "Подключение",
|
|
||||||
"connected": "Подключено",
|
|
||||||
"disconnecting": "Отключение",
|
|
||||||
"currentConnectionTitle": "Текущее подключение",
|
|
||||||
"switchNode": "Сменить узел",
|
|
||||||
"timeout": "Тайм-аут",
|
|
||||||
"loading": "Загрузка...",
|
|
||||||
"error": "Ошибка загрузки",
|
|
||||||
"checkNetwork": "Проверьте подключение к сети и повторите попытку",
|
|
||||||
"retry": "Повторить",
|
|
||||||
"connectionSectionTitle": "Способ подключения",
|
|
||||||
"dedicatedServers": "Выделенные серверы",
|
|
||||||
"countryRegion": "Страна/Регион",
|
|
||||||
"serverListTitle": "Группы выделенных серверов",
|
|
||||||
"nodeListTitle": "Все узлы",
|
|
||||||
"countryListTitle": "Список стран/регионов",
|
|
||||||
"noServers": "Нет доступных серверов",
|
|
||||||
"noNodes": "Нет доступных узлов",
|
|
||||||
"noRegions": "Нет доступных регионов",
|
|
||||||
"subscriptionDescription": "Подпишитесь для доступа к глобальной высокоскоростной сети",
|
|
||||||
"subscribe": "Подписаться сейчас",
|
|
||||||
"trialPeriod": "Добро пожаловать в пробную версию Premium",
|
|
||||||
"remainingTime": "Осталось времени",
|
|
||||||
"trialExpired": "Пробный период истёк, соединение разорвано",
|
|
||||||
"subscriptionExpired": "Подписка истекла, соединение разорвано",
|
|
||||||
"subscriptionUpdated": "Подписка обновлена",
|
|
||||||
"subscriptionUpdatedMessage": "Ваша информация о подписке обновлена, пожалуйста, обновите страницу для просмотра последнего статуса",
|
|
||||||
"trialStatus": "Статус пробного периода",
|
|
||||||
"trialing": "Пробный период",
|
|
||||||
"trialEndMessage": "После окончания пробного периода сервис будет недоступен",
|
|
||||||
"lastDaySubscriptionStatus": "Подписка скоро истекает",
|
|
||||||
"lastDaySubscriptionMessage": "Скоро истекает",
|
|
||||||
"subscriptionEndMessage": "После окончания подписки сервис будет недоступен",
|
|
||||||
"trialTimeWithDays": "{days}д {hours}ч {minutes}м {seconds}с",
|
|
||||||
"trialTimeWithHours": "{hours}ч {minutes}м {seconds}с",
|
|
||||||
"trialTimeWithMinutes": "{minutes}м {seconds}с",
|
|
||||||
"testLatency": "Тест задержки",
|
|
||||||
"testing": "Тестирование задержки",
|
|
||||||
"refreshLatency": "Обновить задержку",
|
|
||||||
"refreshLatencyDesc": "Обновить задержку всех узлов",
|
|
||||||
"testAllNodesLatency": "Тест сетевой задержки всех узлов",
|
|
||||||
"autoSelect": "Автоматический выбор",
|
|
||||||
"selected": "Выбрано"
|
|
||||||
},
|
|
||||||
"dialog": {
|
|
||||||
"confirm": "Подтвердить",
|
|
||||||
"cancel": "Отмена",
|
|
||||||
"ok": "OK",
|
|
||||||
"iKnow": "Я понял"
|
|
||||||
},
|
|
||||||
"update": {
|
|
||||||
"title": "Доступна новая версия",
|
|
||||||
"content": "Хотите обновить сейчас?",
|
|
||||||
"updateNow": "Обновить сейчас",
|
|
||||||
"later": "Позже",
|
|
||||||
"defaultContent": "1. Оптимизация производительности приложения\n2. Исправление известных проблем\n3. Улучшение пользовательского опыта"
|
|
||||||
},
|
|
||||||
"country": {
|
|
||||||
"cn": "Китай",
|
|
||||||
"ir": "Иран",
|
|
||||||
"af": "Афганистан",
|
|
||||||
"ru": "Россия",
|
|
||||||
"id": "Индонезия",
|
|
||||||
"tr": "Турция",
|
|
||||||
"br": "Бразилия"
|
|
||||||
},
|
|
||||||
"error": {
|
|
||||||
"200": "Успех",
|
|
||||||
"500": "Внутренняя ошибка сервера",
|
|
||||||
"10001": "Ошибка запроса базы данных",
|
|
||||||
"10002": "Ошибка обновления базы данных",
|
|
||||||
"10003": "Ошибка вставки в базу данных",
|
|
||||||
"10004": "Ошибка удаления из базы данных",
|
|
||||||
"20001": "Пользователь уже существует",
|
|
||||||
"20002": "Пользователь не существует",
|
|
||||||
"20003": "Ошибка пароля пользователя",
|
|
||||||
"20004": "Пользователь отключен",
|
|
||||||
"20005": "Недостаточно средств",
|
|
||||||
"20006": "Регистрация остановлена",
|
|
||||||
"20007": "Telegram не привязан",
|
|
||||||
"20008": "Пользователь не привязал метод OAuth",
|
|
||||||
"20009": "Ошибка кода приглашения",
|
|
||||||
"30001": "Узел уже существует",
|
|
||||||
"30002": "Узел не существует",
|
|
||||||
"30003": "Группа узлов уже существует",
|
|
||||||
"30004": "Группа узлов не существует",
|
|
||||||
"30005": "Группа узлов не пуста",
|
|
||||||
"400": "Ошибка параметра",
|
|
||||||
"40002": "Токен пользователя пуст",
|
|
||||||
"40003": "Токен пользователя недействителен",
|
|
||||||
"40004": "Срок действия токена пользователя истек",
|
|
||||||
"40005": "Недопустимый доступ",
|
|
||||||
"401": "Слишком много запросов",
|
|
||||||
"50001": "Купон не существует",
|
|
||||||
"50002": "Купон был использован",
|
|
||||||
"50003": "Купон не совпадает",
|
|
||||||
"60001": "Подписка истекла",
|
|
||||||
"60002": "Подписка недоступна",
|
|
||||||
"60003": "У пользователя уже есть подписка",
|
|
||||||
"60004": "Подписка уже использована",
|
|
||||||
"60005": "Режим одной подписки превышает лимит",
|
|
||||||
"60006": "Лимит квоты подписки",
|
|
||||||
"70001": "Ошибка кода подтверждения",
|
|
||||||
"80001": "Ошибка постановки в очередь",
|
|
||||||
"90001": "Режим отладки включен",
|
|
||||||
"90002": "Ошибка отправки SMS",
|
|
||||||
"90003": "SMS не включены",
|
|
||||||
"90004": "Электронная почта не включена",
|
|
||||||
"90005": "Неподдерживаемый метод входа",
|
|
||||||
"90006": "Аутентификатор не поддерживает этот метод",
|
|
||||||
"90007": "Код телефонного региона пуст",
|
|
||||||
"90008": "Пароль пуст",
|
|
||||||
"90009": "Код региона пуст",
|
|
||||||
"90010": "Требуется пароль или код подтверждения",
|
|
||||||
"90011": "Электронная почта уже существует",
|
|
||||||
"90012": "Телефон уже существует",
|
|
||||||
"90013": "Устройство уже существует",
|
|
||||||
"90014": "Ошибка номера телефона",
|
|
||||||
"90015": "Этот аккаунт достиг лимита отправки на сегодня",
|
|
||||||
"90017": "Устройство не существует",
|
|
||||||
"90018": "ID пользователя не совпадает",
|
|
||||||
"61001": "Заказ не существует",
|
|
||||||
"61002": "Способ оплаты не найден",
|
|
||||||
"61003": "Ошибка статуса заказа",
|
|
||||||
"61004": "Недостаточный период сброса",
|
|
||||||
"61005": "Существует неиспользованный трафик"
|
|
||||||
},
|
|
||||||
"tray": {
|
|
||||||
"open_dashboard": "Открыть панель",
|
|
||||||
"copy_to_terminal": "Копировать в терминал",
|
|
||||||
"exit_app": "Выйти из приложения"
|
|
||||||
},
|
|
||||||
"splash": {
|
|
||||||
"appName": "Hi快VPN",
|
|
||||||
"slogan": "Высокоскоростная глобальная сеть",
|
|
||||||
"initializing": "Инициализация...",
|
|
||||||
"networkConnectionFailure": "Ошибка подключения к сети, проверьте и повторите попытку",
|
|
||||||
"retry": "Повторить",
|
|
||||||
"networkPermissionFailed": "Не удалось получить разрешение на использование сети",
|
|
||||||
"initializationFailed": "Ошибка инициализации"
|
|
||||||
},
|
|
||||||
"network": {
|
|
||||||
"status": {
|
|
||||||
"connected": "Подключено",
|
|
||||||
"disconnected": "Отключено",
|
|
||||||
"connecting": "Подключение...",
|
|
||||||
"disconnecting": "Отключение...",
|
|
||||||
"reconnecting": "Переподключение...",
|
|
||||||
"failed": "Ошибка подключения"
|
|
||||||
},
|
|
||||||
"permission": {
|
|
||||||
"title": "Разрешение сети",
|
|
||||||
"description": "Требуется разрешение на использование сети для предоставления VPN-сервиса",
|
|
||||||
"goToSettings": "Перейти в настройки",
|
|
||||||
"cancel": "Отмена"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -56,6 +56,7 @@
|
|||||||
"enterEmail": "请输入电子邮箱",
|
"enterEmail": "请输入电子邮箱",
|
||||||
"enterCode": "请输入验证码",
|
"enterCode": "请输入验证码",
|
||||||
"enterPassword": "请输入密码",
|
"enterPassword": "请输入密码",
|
||||||
|
"enterPasswordForPhone": "请输入密码 (密码登录)",
|
||||||
"reenterPassword": "请再次输入密码",
|
"reenterPassword": "请再次输入密码",
|
||||||
"forgotPassword": "忘记密码",
|
"forgotPassword": "忘记密码",
|
||||||
"codeLogin": "验证码登录",
|
"codeLogin": "验证码登录",
|
||||||
@@ -65,6 +66,8 @@
|
|||||||
"privacyPolicy": "隐私政策",
|
"privacyPolicy": "隐私政策",
|
||||||
"next": "下一步",
|
"next": "下一步",
|
||||||
"registerNow": "立即注册",
|
"registerNow": "立即注册",
|
||||||
|
"registerAccount": "注册账号",
|
||||||
|
"clickToRegister": "点我注册",
|
||||||
"setAndLogin": "设置并登录",
|
"setAndLogin": "设置并登录",
|
||||||
"enterAccount": "请输入账户",
|
"enterAccount": "请输入账户",
|
||||||
"passwordMismatch": "两次密码输入不一致",
|
"passwordMismatch": "两次密码输入不一致",
|
||||||
@@ -72,7 +75,9 @@
|
|||||||
"codeSentCountdown": "验证码已发送 {seconds}s",
|
"codeSentCountdown": "验证码已发送 {seconds}s",
|
||||||
"and": "和",
|
"and": "和",
|
||||||
"enterInviteCode": "请输入邀请码",
|
"enterInviteCode": "请输入邀请码",
|
||||||
"registerSuccess": "注册成功"
|
"registerSuccess": "注册成功",
|
||||||
|
"search": "搜索",
|
||||||
|
"selectOtherRegion": "选择其他地区"
|
||||||
},
|
},
|
||||||
"failure": {
|
"failure": {
|
||||||
"unexpected": "意外错误",
|
"unexpected": "意外错误",
|
||||||
@@ -234,7 +239,8 @@
|
|||||||
"friday": "周\n五",
|
"friday": "周\n五",
|
||||||
"saturday": "周\n六",
|
"saturday": "周\n六",
|
||||||
"sunday": "周\n日"
|
"sunday": "周\n日"
|
||||||
}
|
},
|
||||||
|
"processTrafficFailed": "处理流量日志数据失败"
|
||||||
},
|
},
|
||||||
"message": {
|
"message": {
|
||||||
"title": "通知",
|
"title": "通知",
|
||||||
@@ -264,6 +270,7 @@
|
|||||||
"myInviteCode": "我的邀请码",
|
"myInviteCode": "我的邀请码",
|
||||||
"inviteCodeCopied": "邀请码已复制到剪贴板",
|
"inviteCodeCopied": "邀请码已复制到剪贴板",
|
||||||
"close": "关闭",
|
"close": "关闭",
|
||||||
|
"pleaseLoginFirst": "请先登录后查看邀请码",
|
||||||
"saveQRCode": "保存二维码",
|
"saveQRCode": "保存二维码",
|
||||||
"qrCodeSaved": "二维码已保存",
|
"qrCodeSaved": "二维码已保存",
|
||||||
"copiedToClipboard": "已复制到剪贴板",
|
"copiedToClipboard": "已复制到剪贴板",
|
||||||
@@ -383,6 +390,7 @@
|
|||||||
"initializing": "正在初始化...",
|
"initializing": "正在初始化...",
|
||||||
"networkConnectionFailure": "网络连接失败,请检查并重试",
|
"networkConnectionFailure": "网络连接失败,请检查并重试",
|
||||||
"retry": "重试",
|
"retry": "重试",
|
||||||
|
"skip": "跳过",
|
||||||
"networkPermissionFailed": "获取网络权限失败",
|
"networkPermissionFailed": "获取网络权限失败",
|
||||||
"initializationFailed": "初始化失败"
|
"initializationFailed": "初始化失败"
|
||||||
},
|
},
|
||||||
@@ -483,5 +491,33 @@
|
|||||||
"open_dashboard": "打开面板",
|
"open_dashboard": "打开面板",
|
||||||
"copy_to_terminal": "复制到终端",
|
"copy_to_terminal": "复制到终端",
|
||||||
"exit_app": "退出应用"
|
"exit_app": "退出应用"
|
||||||
|
},
|
||||||
|
"crisp": {
|
||||||
|
"initializingSystem": "正在初始化客服系统...",
|
||||||
|
"initFailed": "客服系统初始化失败"
|
||||||
|
},
|
||||||
|
"common": {
|
||||||
|
"retry": "重试",
|
||||||
|
"tryBrowser": "尝试使用浏览器打开",
|
||||||
|
"cannotOpenBrowser": "无法打开浏览器",
|
||||||
|
"openLinkFailed": "打开链接失败,请稍后重试",
|
||||||
|
"cannotOpenTelegram": "无法打开Telegram链接"
|
||||||
|
},
|
||||||
|
"subscribe": {
|
||||||
|
"pleaseSelectFirst": "请先选择订阅",
|
||||||
|
"resetPeriodFailed": "重置订阅周期失败",
|
||||||
|
"resetPeriodSuccess": "重置订阅周期成功"
|
||||||
|
},
|
||||||
|
"purchase": {
|
||||||
|
"noAvailablePlans": "没有可用的套餐"
|
||||||
|
},
|
||||||
|
"payment": {
|
||||||
|
"cannotOpenLink": "无法打开支付链接",
|
||||||
|
"linkEmpty": "支付链接为空",
|
||||||
|
"unsupportedType": "不支持的支付类型"
|
||||||
|
},
|
||||||
|
"account": {
|
||||||
|
"accountRequired": "账号不能为空",
|
||||||
|
"deleteSuccess": "删除账号成功"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -9,6 +9,7 @@
|
|||||||
"enterEmail": "請輸入電子郵箱",
|
"enterEmail": "請輸入電子郵箱",
|
||||||
"enterCode": "請輸入驗證碼",
|
"enterCode": "請輸入驗證碼",
|
||||||
"enterPassword": "請輸入密碼",
|
"enterPassword": "請輸入密碼",
|
||||||
|
"enterPasswordForPhone": "請輸入密碼 (密碼登錄)",
|
||||||
"reenterPassword": "請再次輸入密碼",
|
"reenterPassword": "請再次輸入密碼",
|
||||||
"forgotPassword": "忘記密碼",
|
"forgotPassword": "忘記密碼",
|
||||||
"codeLogin": "驗證碼登錄",
|
"codeLogin": "驗證碼登錄",
|
||||||
@@ -18,6 +19,8 @@
|
|||||||
"privacyPolicy": "隱私政策",
|
"privacyPolicy": "隱私政策",
|
||||||
"next": "下一步",
|
"next": "下一步",
|
||||||
"registerNow": "立即註冊",
|
"registerNow": "立即註冊",
|
||||||
|
"registerAccount": "註冊賬號",
|
||||||
|
"clickToRegister": "點我註冊",
|
||||||
"setAndLogin": "設置並登錄",
|
"setAndLogin": "設置並登錄",
|
||||||
"enterAccount": "請輸入賬戶",
|
"enterAccount": "請輸入賬戶",
|
||||||
"passwordMismatch": "兩次密碼輸入不一致",
|
"passwordMismatch": "兩次密碼輸入不一致",
|
||||||
@@ -25,7 +28,9 @@
|
|||||||
"codeSentCountdown": "驗證碼已發送 {seconds}s",
|
"codeSentCountdown": "驗證碼已發送 {seconds}s",
|
||||||
"and": "和",
|
"and": "和",
|
||||||
"enterInviteCode": "請輸入邀請碼(選填)",
|
"enterInviteCode": "請輸入邀請碼(選填)",
|
||||||
"registerSuccess": "註冊成功"
|
"registerSuccess": "註冊成功",
|
||||||
|
"search": "搜尋",
|
||||||
|
"selectOtherRegion": "選擇其他地區"
|
||||||
},
|
},
|
||||||
"failure": {
|
"failure": {
|
||||||
"unexpected": "意外錯誤",
|
"unexpected": "意外錯誤",
|
||||||
@@ -172,7 +177,8 @@
|
|||||||
"friday": "週\n五",
|
"friday": "週\n五",
|
||||||
"saturday": "週\n六",
|
"saturday": "週\n六",
|
||||||
"sunday": "週\n日"
|
"sunday": "週\n日"
|
||||||
}
|
},
|
||||||
|
"processTrafficFailed": "處理流量日誌資料失敗"
|
||||||
},
|
},
|
||||||
"message": {
|
"message": {
|
||||||
"title": "通知",
|
"title": "通知",
|
||||||
@@ -448,6 +454,7 @@
|
|||||||
"initializing": "正在初始化...",
|
"initializing": "正在初始化...",
|
||||||
"networkConnectionFailure": "網絡連接失敗,請檢查並重試",
|
"networkConnectionFailure": "網絡連接失敗,請檢查並重試",
|
||||||
"retry": "重試",
|
"retry": "重試",
|
||||||
|
"skip": "跳過",
|
||||||
"networkPermissionFailed": "獲取網絡權限失敗",
|
"networkPermissionFailed": "獲取網絡權限失敗",
|
||||||
"initializationFailed": "初始化失敗"
|
"initializationFailed": "初始化失敗"
|
||||||
},
|
},
|
||||||
@@ -466,5 +473,33 @@
|
|||||||
"goToSettings": "前往設置",
|
"goToSettings": "前往設置",
|
||||||
"cancel": "取消"
|
"cancel": "取消"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"crisp": {
|
||||||
|
"initializingSystem": "正在初始化客服系統...",
|
||||||
|
"initFailed": "客服系統初始化失敗"
|
||||||
|
},
|
||||||
|
"common": {
|
||||||
|
"retry": "重試",
|
||||||
|
"tryBrowser": "嘗試使用瀏覽器開啟",
|
||||||
|
"cannotOpenBrowser": "無法開啟瀏覽器",
|
||||||
|
"openLinkFailed": "開啟連結失敗,請稍後重試",
|
||||||
|
"cannotOpenTelegram": "無法開啟Telegram連結"
|
||||||
|
},
|
||||||
|
"subscribe": {
|
||||||
|
"pleaseSelectFirst": "請先選擇訂閱",
|
||||||
|
"resetPeriodFailed": "重置訂閱週期失敗",
|
||||||
|
"resetPeriodSuccess": "重置訂閱週期成功"
|
||||||
|
},
|
||||||
|
"purchase": {
|
||||||
|
"noAvailablePlans": "沒有可用的套餐"
|
||||||
|
},
|
||||||
|
"payment": {
|
||||||
|
"cannotOpenLink": "無法開啟支付連結",
|
||||||
|
"linkEmpty": "支付連結為空",
|
||||||
|
"unsupportedType": "不支援的支付類型"
|
||||||
|
},
|
||||||
|
"account": {
|
||||||
|
"accountRequired": "帳號不能為空",
|
||||||
|
"deleteSuccess": "刪除帳號成功"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,426 +0,0 @@
|
|||||||
{
|
|
||||||
"login": {
|
|
||||||
"welcome": "歡迎使用 Hi快VPN!",
|
|
||||||
"verifyPhone": "驗證您的手機號",
|
|
||||||
"verifyEmail": "驗證您的郵箱",
|
|
||||||
"codeSent": "已向 {account} 發送6位數代碼。請在接下來的 30 分鐘內輸入。",
|
|
||||||
"back": "返回",
|
|
||||||
"enterEmailOrPhone": "輸入郵箱或者手機號",
|
|
||||||
"enterCode": "請輸入驗證碼",
|
|
||||||
"enterPassword": "請輸入密碼",
|
|
||||||
"reenterPassword": "請再次輸入密碼",
|
|
||||||
"forgotPassword": "忘記密碼",
|
|
||||||
"codeLogin": "驗證碼登錄",
|
|
||||||
"passwordLogin": "密碼登錄",
|
|
||||||
"agreeTerms": "登錄/創建賬戶,即表示我同意",
|
|
||||||
"termsOfService": "服務條款",
|
|
||||||
"privacyPolicy": "隱私政策",
|
|
||||||
"next": "下一步",
|
|
||||||
"registerNow": "立即註冊",
|
|
||||||
"setAndLogin": "設置並登錄",
|
|
||||||
"enterAccount": "請輸入賬戶",
|
|
||||||
"passwordMismatch": "兩次密碼輸入不一致",
|
|
||||||
"sendCode": "發送驗證碼",
|
|
||||||
"codeSentCountdown": "驗證碼已發送 {seconds}s",
|
|
||||||
"and": "和",
|
|
||||||
"enterInviteCode": "請輸入邀請碼(選填)",
|
|
||||||
"registerSuccess": "註冊成功"
|
|
||||||
},
|
|
||||||
"failure": {
|
|
||||||
"unexpected": "意外錯誤",
|
|
||||||
"clash": {
|
|
||||||
"unexpected": "意外錯誤",
|
|
||||||
"core": "Clash 錯誤 ${reason}"
|
|
||||||
},
|
|
||||||
"singbox": {
|
|
||||||
"unexpected": "意外服務錯誤",
|
|
||||||
"serviceNotRunning": "服務未運行",
|
|
||||||
"missingPrivilege": "缺少權限",
|
|
||||||
"missingPrivilegeMsg": "VPN 模式需要管理員權限。以管理員身份重新啟動應用程序或更改服務模式",
|
|
||||||
"missingGeoAssets": "缺失 GEO 資源文件",
|
|
||||||
"missingGeoAssetsMsg": "缺失 GEO 資源文件。請考慮更改激活的資源文件或在設置中下載所選資源文件。",
|
|
||||||
"invalidConfigOptions": "配置選項無效",
|
|
||||||
"invalidConfig": "無效配置",
|
|
||||||
"create": "服務創建錯誤",
|
|
||||||
"start": "服務啟動錯誤"
|
|
||||||
},
|
|
||||||
"connectivity": {
|
|
||||||
"unexpected": "意外失敗",
|
|
||||||
"missingVpnPermission": "缺少 VPN 權限",
|
|
||||||
"missingNotificationPermission": "缺少通知權限",
|
|
||||||
"core": "核心錯誤"
|
|
||||||
},
|
|
||||||
"profiles": {
|
|
||||||
"unexpected": "意外錯誤",
|
|
||||||
"notFound": "未找到配置文件",
|
|
||||||
"invalidConfig": "無效配置",
|
|
||||||
"invalidUrl": "網址無效"
|
|
||||||
},
|
|
||||||
"connection": {
|
|
||||||
"unexpected": "意外連接錯誤",
|
|
||||||
"timeout": "連接超時",
|
|
||||||
"badResponse": "錯誤響應",
|
|
||||||
"connectionError": "連接錯誤",
|
|
||||||
"badCertificate": "證書無效"
|
|
||||||
},
|
|
||||||
"geoAssets": {
|
|
||||||
"unexpected": "意外錯誤",
|
|
||||||
"notUpdate": "無可用更新",
|
|
||||||
"activeNotFound": "未找到激活的 GEO 資源文件"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"userInfo": {
|
|
||||||
"title": "我的信息",
|
|
||||||
"bindingTip": "未綁定郵箱/手機號",
|
|
||||||
"myAccount": "我的賬號",
|
|
||||||
"balance": "餘額",
|
|
||||||
"noValidSubscription": "您沒有有效的訂閱",
|
|
||||||
"subscribeNow": "立即訂閱",
|
|
||||||
"shortcuts": "快捷鍵",
|
|
||||||
"adBlock": "廣告攔截",
|
|
||||||
"dnsUnlock": "DNS 解鎖",
|
|
||||||
"contactUs": "聯繫我們",
|
|
||||||
"others": "其他",
|
|
||||||
"logout": "退出登錄",
|
|
||||||
"logoutConfirmTitle": "退出登錄",
|
|
||||||
"logoutConfirmMessage": "確定要退出登錄嗎?",
|
|
||||||
"logoutCancel": "取消",
|
|
||||||
"vpnWebsite": "VPN 官網",
|
|
||||||
"telegram": "Telegram",
|
|
||||||
"mail": "郵箱",
|
|
||||||
"phone": "電話",
|
|
||||||
"customerService": "人工客服",
|
|
||||||
"workOrder": "填寫工單",
|
|
||||||
"pleaseLogin": "請先登錄賬號",
|
|
||||||
"subscriptionValid": "訂閱有效",
|
|
||||||
"startTime": "開始時間:",
|
|
||||||
"expireTime": "到期時間:",
|
|
||||||
"loginNow": "立即登錄",
|
|
||||||
"trialPeriod": "歡迎使用高級試用版",
|
|
||||||
"remainingTime": "剩餘時間",
|
|
||||||
"trialExpired": "試用期已結束,連接已斷開",
|
|
||||||
"subscriptionExpired": "訂閱已過期,連接已斷開",
|
|
||||||
"copySuccess": "複製成功",
|
|
||||||
"notAvailable": "暫無",
|
|
||||||
"willBeDeleted": "將被刪除",
|
|
||||||
"deleteAccountWarning": "賬號刪除是永久性的。一旦您的賬號被刪除,您將無法使用任何功能。是否繼續?",
|
|
||||||
"requestDelete": "請求刪除",
|
|
||||||
"switchSubscription": "切換訂閱",
|
|
||||||
"resetTrafficTitle": "重置流量",
|
|
||||||
"resetTrafficMessage": "月付套餐流量重置示例:將下一個週期的流量按月重置,訂閱有效期將從{currentTime}提前至{newTime}",
|
|
||||||
"reset": "重置",
|
|
||||||
"trafficUsage": "已用: {used} / {total}",
|
|
||||||
"trafficProgress": {
|
|
||||||
"title": "流量使用情況",
|
|
||||||
"unlimited": "不限流量",
|
|
||||||
"limited": "已用流量"
|
|
||||||
},
|
|
||||||
"deviceLimit": "設備限制: {count}"
|
|
||||||
},
|
|
||||||
"setting": {
|
|
||||||
"title": "設置",
|
|
||||||
"vpnConnection": "VPN連接",
|
|
||||||
"general": "通用",
|
|
||||||
"autoConnect": "自動連接",
|
|
||||||
"routeRule": "路由規則",
|
|
||||||
"countrySelector": "選擇國家",
|
|
||||||
"appearance": "外觀",
|
|
||||||
"notifications": "通知",
|
|
||||||
"helpImprove": "幫助我們改進",
|
|
||||||
"helpImproveSubtitle": "幫助我們改進的副標題",
|
|
||||||
"requestDeleteAccount": "請求刪除賬號",
|
|
||||||
"goToDelete": "去刪除",
|
|
||||||
"rateUs": "在 App Store 上為我們評分",
|
|
||||||
"iosRating": "iOS評分",
|
|
||||||
"version": "版本",
|
|
||||||
"switchLanguage": "切換語言",
|
|
||||||
"system": "系統",
|
|
||||||
"light": "淺色",
|
|
||||||
"dark": "深色",
|
|
||||||
"vpnModeSmart": "智能模式",
|
|
||||||
"mode": "出站模式",
|
|
||||||
"connectionTypeGlobal": "全域代理",
|
|
||||||
"connectionTypeGlobalRemark": "啟用後,所有流量均通過代理伺服器轉發",
|
|
||||||
"connectionTypeRule": "智能代理",
|
|
||||||
"connectionTypeRuleRemark": "當[出站模式]設置為[智能代理]時,根據所選國家,系統自動分流:國內IP/域名直連,境外請求透過代理訪問",
|
|
||||||
"connectionTypeDirect": "直連",
|
|
||||||
"connectionTypeDirectRemark": "啟用後,所有流量均不經代理直接訪問",
|
|
||||||
"smartMode": "智能模式",
|
|
||||||
"secureMode": "安全模式",
|
|
||||||
"deviceLimit": "設備限制: {count}"
|
|
||||||
},
|
|
||||||
"statistics": {
|
|
||||||
"title": "統計",
|
|
||||||
"vpnStatus": "VPN 狀態",
|
|
||||||
"ipAddress": "IP地址",
|
|
||||||
"connectionTime": "連接時間",
|
|
||||||
"protocol": "協議",
|
|
||||||
"weeklyProtectionTime": "每週保護時間",
|
|
||||||
"currentStreak": "當前連續記錄",
|
|
||||||
"highestStreak": "最高記錄",
|
|
||||||
"longestConnection": "最長連接時間",
|
|
||||||
"days": "{days}天",
|
|
||||||
"daysOfWeek": {
|
|
||||||
"monday": "週\n一",
|
|
||||||
"tuesday": "週\n二",
|
|
||||||
"wednesday": "週\n三",
|
|
||||||
"thursday": "週\n四",
|
|
||||||
"friday": "週\n五",
|
|
||||||
"saturday": "週\n六",
|
|
||||||
"sunday": "週\n日"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"message": {
|
|
||||||
"title": "通知",
|
|
||||||
"system": "系統消息",
|
|
||||||
"promotion": "促銷消息"
|
|
||||||
},
|
|
||||||
"invite": {
|
|
||||||
"title": "邀請好友",
|
|
||||||
"progress": "邀請進度",
|
|
||||||
"inviteStats": "邀請統計",
|
|
||||||
"registers": "已註冊",
|
|
||||||
"totalCommission": "總佣金",
|
|
||||||
"rewardDetails": "獎勵明細 >",
|
|
||||||
"steps": "邀請步驟",
|
|
||||||
"inviteFriend": "邀請好友",
|
|
||||||
"acceptInvite": "好友接受邀請\n下單並註冊",
|
|
||||||
"getReward": "獲得獎勵",
|
|
||||||
"shareLink": "分享連結",
|
|
||||||
"shareQR": "分享二維碼",
|
|
||||||
"rules": "邀請規則",
|
|
||||||
"rule1": "1、您可以通過分享專屬邀請連結或邀請碼給好友,邀請他們加入我們。",
|
|
||||||
"rule2": "2、好友完成註冊並登錄後,邀請獎勵將自動發放至您的賬戶。",
|
|
||||||
"pending": "待下載",
|
|
||||||
"processing": "在路上",
|
|
||||||
"success": "已成功",
|
|
||||||
"expired": "已失效",
|
|
||||||
"myInviteCode": "我的邀請碼",
|
|
||||||
"inviteCodeCopied": "邀請碼已複製到剪貼板",
|
|
||||||
"close": "關閉",
|
|
||||||
"saveQRCode": "保存二維碼",
|
|
||||||
"qrCodeSaved": "二維碼已保存",
|
|
||||||
"copiedToClipboard": "已複製到剪貼板",
|
|
||||||
"getInviteCodeFailed": "獲取邀請碼失敗,請稍後重試",
|
|
||||||
"generateQRCodeFailed": "生成二維碼失敗,請稍後重試",
|
|
||||||
"generateShareLinkFailed": "生成分享連結失敗,請稍後重試"
|
|
||||||
},
|
|
||||||
"purchaseMembership": {
|
|
||||||
"purchasePackage": "購買套餐",
|
|
||||||
"noData": "暫無可用套餐",
|
|
||||||
"myAccount": "我的賬號",
|
|
||||||
"selectPackage": "選擇套餐",
|
|
||||||
"packageDescription": "套餐描述",
|
|
||||||
"paymentMethod": "支付方式",
|
|
||||||
"cancelAnytime": "您可以隨時在APP上取消",
|
|
||||||
"startSubscription": "開始訂閱",
|
|
||||||
"renewNow": "立即續訂",
|
|
||||||
"month": "{months}個月",
|
|
||||||
"year": "{years}年",
|
|
||||||
"day": "{days}天",
|
|
||||||
"unlimitedTraffic": "不限流量",
|
|
||||||
"unlimitedDevices": "不限設備",
|
|
||||||
"devices": "{count}台",
|
|
||||||
"trafficLimit": "流量限制",
|
|
||||||
"deviceLimit": "設備限制",
|
|
||||||
"features": "套餐特性",
|
|
||||||
"expand": "展開",
|
|
||||||
"collapse": "收起",
|
|
||||||
"confirmPurchase": "確認購買",
|
|
||||||
"confirmPurchaseDesc": "您確定要購買此套餐嗎?"
|
|
||||||
},
|
|
||||||
"home": {
|
|
||||||
"welcome": "歡迎使用 Hi快VPN",
|
|
||||||
"disconnected": "已斷開連接",
|
|
||||||
"connecting": "正在連接",
|
|
||||||
"connected": "已連接",
|
|
||||||
"disconnecting": "正在斷開連接",
|
|
||||||
"currentConnectionTitle": "當前連接",
|
|
||||||
"switchNode": "切換節點",
|
|
||||||
"timeout": "超時",
|
|
||||||
"loading": "載入中...",
|
|
||||||
"error": "載入失敗",
|
|
||||||
"checkNetwork": "請檢查網絡連接並重試",
|
|
||||||
"retry": "重試",
|
|
||||||
"connectionSectionTitle": "連接方式",
|
|
||||||
"dedicatedServers": "專用伺服器",
|
|
||||||
"countryRegion": "國家/地區",
|
|
||||||
"serverListTitle": "專用伺服器群組",
|
|
||||||
"nodeListTitle": "所有節點",
|
|
||||||
"countryListTitle": "國家/地區列表",
|
|
||||||
"noServers": "暫無可用伺服器",
|
|
||||||
"noNodes": "暫無可用節點",
|
|
||||||
"noRegions": "暫無可用地區",
|
|
||||||
"subscriptionDescription": "訂閱會員,暢享全球高速網絡",
|
|
||||||
"subscribe": "立即訂閱",
|
|
||||||
"trialPeriod": "歡迎使用 Premium 試用版",
|
|
||||||
"remainingTime": "剩餘時間",
|
|
||||||
"trialExpired": "試用期已結束,已斷開連接",
|
|
||||||
"subscriptionExpired": "訂閱已過期,已斷開連接",
|
|
||||||
"subscriptionUpdated": "訂閱已更新",
|
|
||||||
"subscriptionUpdatedMessage": "您的訂閱信息已更新,請刷新頁面查看最新狀態",
|
|
||||||
"trialStatus": "試用狀態",
|
|
||||||
"trialing": "試用中",
|
|
||||||
"trialEndMessage": "試用期結束後將無法使用",
|
|
||||||
"lastDaySubscriptionStatus": "訂閱即將到期",
|
|
||||||
"lastDaySubscriptionMessage": "即將到期",
|
|
||||||
"subscriptionEndMessage": "訂閱到期後將無法使用",
|
|
||||||
"trialTimeWithDays": "{days}天 {hours}時 {minutes}分 {seconds}秒",
|
|
||||||
"trialTimeWithHours": "{hours}時 {minutes}分 {seconds}秒",
|
|
||||||
"trialTimeWithMinutes": "{minutes}分 {seconds}秒",
|
|
||||||
"refreshLatency": "刷新延遲",
|
|
||||||
"testLatency": "測試延遲",
|
|
||||||
"testing": "正在測試延遲",
|
|
||||||
"refreshLatencyDesc": "刷新所有節點的延遲",
|
|
||||||
"testAllNodesLatency": "測試所有節點的網絡延遲",
|
|
||||||
"autoSelect": "自動選擇",
|
|
||||||
"selected": "已選擇"
|
|
||||||
},
|
|
||||||
"dialog": {
|
|
||||||
"confirm": "確認",
|
|
||||||
"cancel": "取消",
|
|
||||||
"ok": "我知道了"
|
|
||||||
},
|
|
||||||
"update": {
|
|
||||||
"title": "發現新版本",
|
|
||||||
"content": "是否立即更新?",
|
|
||||||
"updateNow": "立即更新",
|
|
||||||
"updateLater": "稍後",
|
|
||||||
"defaultContent": "1. 優化應用性能\n2. 修復已知問題\n3. 改進用戶體驗"
|
|
||||||
},
|
|
||||||
"orderStatus": {
|
|
||||||
"title": "訂單狀態",
|
|
||||||
"pending": {
|
|
||||||
"title": "待支付",
|
|
||||||
"description": "請完成支付"
|
|
||||||
},
|
|
||||||
"paid": {
|
|
||||||
"title": "已支付",
|
|
||||||
"description": "正在處理您的訂單"
|
|
||||||
},
|
|
||||||
"success": {
|
|
||||||
"title": "恭喜你!支付成功",
|
|
||||||
"description": "您的套餐已經購買成功了"
|
|
||||||
},
|
|
||||||
"closed": {
|
|
||||||
"title": "訂單已關閉",
|
|
||||||
"description": "請重新下單"
|
|
||||||
},
|
|
||||||
"failed": {
|
|
||||||
"title": "支付失敗",
|
|
||||||
"description": "請重新嘗試支付"
|
|
||||||
},
|
|
||||||
"unknown": {
|
|
||||||
"title": "未知狀態",
|
|
||||||
"description": "請聯繫客服"
|
|
||||||
},
|
|
||||||
"checkFailed": {
|
|
||||||
"title": "檢查失敗",
|
|
||||||
"description": "請稍後重試"
|
|
||||||
},
|
|
||||||
"initial": {
|
|
||||||
"title": "支付中",
|
|
||||||
"description": "請稍候,正在處理您的支付"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"country": {
|
|
||||||
"cn": "中國",
|
|
||||||
"ir": "伊朗",
|
|
||||||
"af": "阿富汗",
|
|
||||||
"ru": "俄羅斯",
|
|
||||||
"id": "印尼",
|
|
||||||
"tr": "土耳其",
|
|
||||||
"br": "巴西"
|
|
||||||
},
|
|
||||||
"error": {
|
|
||||||
"200": "成功",
|
|
||||||
"500": "服務器內部錯誤",
|
|
||||||
"10001": "數據庫查詢錯誤",
|
|
||||||
"10002": "數據庫更新錯誤",
|
|
||||||
"10003": "數據庫插入錯誤",
|
|
||||||
"10004": "數據庫刪除錯誤",
|
|
||||||
"20001": "用戶已存在",
|
|
||||||
"20002": "用戶不存在",
|
|
||||||
"20003": "用戶密碼錯誤",
|
|
||||||
"20004": "用戶已被禁用",
|
|
||||||
"20005": "餘額不足",
|
|
||||||
"20006": "註冊已暫停",
|
|
||||||
"20007": "未綁定 Telegram",
|
|
||||||
"20008": "用戶未綁定 OAuth",
|
|
||||||
"20009": "邀請碼錯誤",
|
|
||||||
"30001": "節點已存在",
|
|
||||||
"30002": "節點不存在",
|
|
||||||
"30003": "節點群組已存在",
|
|
||||||
"30004": "節點群組不存在",
|
|
||||||
"30005": "節點群組不為空",
|
|
||||||
"400": "參數錯誤",
|
|
||||||
"40002": "用戶令牌為空",
|
|
||||||
"40003": "用戶令牌無效",
|
|
||||||
"40004": "用戶令牌已過期",
|
|
||||||
"40005": "未登錄",
|
|
||||||
"401": "請求過多",
|
|
||||||
"50001": "優惠券不存在",
|
|
||||||
"50002": "優惠券已使用",
|
|
||||||
"50003": "優惠券不匹配",
|
|
||||||
"60001": "訂閱已過期",
|
|
||||||
"60002": "訂閱不可用",
|
|
||||||
"60003": "用戶已有訂閱",
|
|
||||||
"60004": "訂閱已使用",
|
|
||||||
"60005": "單次訂閱模式超出限制",
|
|
||||||
"60006": "訂閱配額限制",
|
|
||||||
"70001": "驗證碼錯誤",
|
|
||||||
"80001": "加入隊列錯誤",
|
|
||||||
"90001": "調試模式已啟用",
|
|
||||||
"90002": "發送短信錯誤",
|
|
||||||
"90003": "短信功能未啟用",
|
|
||||||
"90004": "郵件功能未啟用",
|
|
||||||
"90005": "不支持的登錄方式",
|
|
||||||
"90006": "驗證器不支持此方式",
|
|
||||||
"90007": "電話國家代碼為空",
|
|
||||||
"90008": "密碼為空",
|
|
||||||
"90009": "國家代碼為空",
|
|
||||||
"90010": "需要密碼或驗證碼",
|
|
||||||
"90011": "郵箱已存在",
|
|
||||||
"90012": "手機號已存在",
|
|
||||||
"90013": "設備已存在",
|
|
||||||
"90014": "手機號錯誤",
|
|
||||||
"90015": "該賬號今日已達到發送限制",
|
|
||||||
"90017": "設備不存在",
|
|
||||||
"90018": "用戶 ID 不匹配",
|
|
||||||
"61001": "訂閱不存在",
|
|
||||||
"61002": "未找到支付方式",
|
|
||||||
"61003": "訂閱狀態錯誤",
|
|
||||||
"61004": "重置期不足",
|
|
||||||
"61005": "存在未使用流量"
|
|
||||||
},
|
|
||||||
"tray": {
|
|
||||||
"open_dashboard": "打開面板",
|
|
||||||
"copy_to_terminal": "複製到終端",
|
|
||||||
"exit_app": "退出應用"
|
|
||||||
},
|
|
||||||
"splash": {
|
|
||||||
"appName": "Hi快VPN",
|
|
||||||
"slogan": "暢享全球高速網絡",
|
|
||||||
"initializing": "正在初始化...",
|
|
||||||
"networkConnectionFailure": "網絡連接失敗,請檢查並重試",
|
|
||||||
"retry": "重試",
|
|
||||||
"networkPermissionFailed": "獲取網絡權限失敗",
|
|
||||||
"initializationFailed": "初始化失敗"
|
|
||||||
},
|
|
||||||
"network": {
|
|
||||||
"status": {
|
|
||||||
"connected": "已連接",
|
|
||||||
"disconnected": "已斷開連接",
|
|
||||||
"connecting": "正在連接...",
|
|
||||||
"disconnecting": "正在斷開連接...",
|
|
||||||
"reconnecting": "正在重新連接...",
|
|
||||||
"failed": "連接失敗"
|
|
||||||
},
|
|
||||||
"permission": {
|
|
||||||
"title": "網絡權限",
|
|
||||||
"description": "需要網絡權限以提供 VPN 服務",
|
|
||||||
"goToSettings": "前往設置",
|
|
||||||
"cancel": "取消"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,427 +0,0 @@
|
|||||||
{
|
|
||||||
"login": {
|
|
||||||
"welcome": "歡迎使用 Hi快VPN!",
|
|
||||||
"verifyPhone": "驗證您的手機號",
|
|
||||||
"verifyEmail": "驗證您的郵箱",
|
|
||||||
"codeSent": "已向 {account} 發送6位數代碼。請在接下來的 30 分鐘內輸入。",
|
|
||||||
"back": "返回",
|
|
||||||
"enterEmailOrPhone": "輸入郵箱或者手機號",
|
|
||||||
"enterEmail": "Please enter email address",
|
|
||||||
"enterCode": "請輸入驗證碼",
|
|
||||||
"enterPassword": "請輸入密碼",
|
|
||||||
"reenterPassword": "請再次輸入密碼",
|
|
||||||
"forgotPassword": "忘記密碼",
|
|
||||||
"codeLogin": "驗證碼登錄",
|
|
||||||
"passwordLogin": "密碼登錄",
|
|
||||||
"agreeTerms": "登錄/創建賬戶,即表示我同意",
|
|
||||||
"termsOfService": "服務條款",
|
|
||||||
"privacyPolicy": "隱私政策",
|
|
||||||
"next": "下一步",
|
|
||||||
"registerNow": "立即註冊",
|
|
||||||
"setAndLogin": "設置並登錄",
|
|
||||||
"enterAccount": "請輸入賬戶",
|
|
||||||
"passwordMismatch": "兩次密碼輸入不一致",
|
|
||||||
"sendCode": "發送驗證碼",
|
|
||||||
"codeSentCountdown": "驗證碼已發送 {seconds}s",
|
|
||||||
"and": "和",
|
|
||||||
"enterInviteCode": "請輸入邀請碼(選填)",
|
|
||||||
"registerSuccess": "註冊成功"
|
|
||||||
},
|
|
||||||
"failure": {
|
|
||||||
"unexpected": "意外錯誤",
|
|
||||||
"clash": {
|
|
||||||
"unexpected": "意外錯誤",
|
|
||||||
"core": "Clash 錯誤 ${reason}"
|
|
||||||
},
|
|
||||||
"singbox": {
|
|
||||||
"unexpected": "意外服務錯誤",
|
|
||||||
"serviceNotRunning": "服務未運行",
|
|
||||||
"missingPrivilege": "缺少權限",
|
|
||||||
"missingPrivilegeMsg": "VPN 模式需要管理員權限。以管理員身份重新啟動應用程序或更改服務模式",
|
|
||||||
"missingGeoAssets": "缺失 GEO 資源文件",
|
|
||||||
"missingGeoAssetsMsg": "缺失 GEO 資源文件。請考慮更改激活的資源文件或在設置中下載所選資源文件。",
|
|
||||||
"invalidConfigOptions": "配置選項無效",
|
|
||||||
"invalidConfig": "無效配置",
|
|
||||||
"create": "服務創建錯誤",
|
|
||||||
"start": "服務啟動錯誤"
|
|
||||||
},
|
|
||||||
"connectivity": {
|
|
||||||
"unexpected": "意外失敗",
|
|
||||||
"missingVpnPermission": "缺少 VPN 權限",
|
|
||||||
"missingNotificationPermission": "缺少通知權限",
|
|
||||||
"core": "核心錯誤"
|
|
||||||
},
|
|
||||||
"profiles": {
|
|
||||||
"unexpected": "意外錯誤",
|
|
||||||
"notFound": "未找到配置文件",
|
|
||||||
"invalidConfig": "無效配置",
|
|
||||||
"invalidUrl": "網址無效"
|
|
||||||
},
|
|
||||||
"connection": {
|
|
||||||
"unexpected": "意外連接錯誤",
|
|
||||||
"timeout": "連接超時",
|
|
||||||
"badResponse": "錯誤響應",
|
|
||||||
"connectionError": "連接錯誤",
|
|
||||||
"badCertificate": "證書無效"
|
|
||||||
},
|
|
||||||
"geoAssets": {
|
|
||||||
"unexpected": "意外錯誤",
|
|
||||||
"notUpdate": "無可用更新",
|
|
||||||
"activeNotFound": "未找到激活的 GEO 資源文件"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"userInfo": {
|
|
||||||
"title": "我的信息",
|
|
||||||
"bindingTip": "未綁定郵箱/手機號",
|
|
||||||
"myAccount": "我的賬號",
|
|
||||||
"balance": "餘額",
|
|
||||||
"noValidSubscription": "您沒有有效的訂閱",
|
|
||||||
"subscribeNow": "立即訂閱",
|
|
||||||
"shortcuts": "快捷鍵",
|
|
||||||
"adBlock": "廣告攔截",
|
|
||||||
"dnsUnlock": "DNS 解鎖",
|
|
||||||
"contactUs": "聯繫我們",
|
|
||||||
"others": "其他",
|
|
||||||
"logout": "退出登錄",
|
|
||||||
"logoutConfirmTitle": "退出登錄",
|
|
||||||
"logoutConfirmMessage": "確定要退出登錄嗎?",
|
|
||||||
"logoutCancel": "取消",
|
|
||||||
"vpnWebsite": "VPN 官網",
|
|
||||||
"telegram": "Telegram",
|
|
||||||
"mail": "郵箱",
|
|
||||||
"phone": "電話",
|
|
||||||
"customerService": "人工客服",
|
|
||||||
"workOrder": "填寫工單",
|
|
||||||
"pleaseLogin": "請先登錄賬號",
|
|
||||||
"subscriptionValid": "訂閱有效",
|
|
||||||
"startTime": "開始時間:",
|
|
||||||
"expireTime": "到期時間:",
|
|
||||||
"loginNow": "立即登錄",
|
|
||||||
"trialPeriod": "歡迎使用高級試用版",
|
|
||||||
"remainingTime": "剩餘時間",
|
|
||||||
"trialExpired": "試用期已結束,連接已斷開",
|
|
||||||
"subscriptionExpired": "訂閱已過期,連接已斷開",
|
|
||||||
"copySuccess": "複製成功",
|
|
||||||
"notAvailable": "暫無",
|
|
||||||
"willBeDeleted": "將被刪除",
|
|
||||||
"deleteAccountWarning": "賬號刪除是永久性的。一旦您的賬號被刪除,您將無法使用任何功能。是否繼續?",
|
|
||||||
"requestDelete": "請求刪除",
|
|
||||||
"switchSubscription": "切換訂閱",
|
|
||||||
"resetTrafficTitle": "重置流量",
|
|
||||||
"resetTrafficMessage": "月付套餐流量重置示例:將下一個週期的流量按月重置,訂閱有效期將從{currentTime}提前至{newTime}",
|
|
||||||
"reset": "重置",
|
|
||||||
"trafficUsage": "已用: {used} / {total}",
|
|
||||||
"trafficProgress": {
|
|
||||||
"title": "流量使用情況",
|
|
||||||
"unlimited": "不限流量",
|
|
||||||
"limited": "已用流量"
|
|
||||||
},
|
|
||||||
"deviceLimit": "設備限制: {count}"
|
|
||||||
},
|
|
||||||
"setting": {
|
|
||||||
"title": "設置",
|
|
||||||
"vpnConnection": "VPN連接",
|
|
||||||
"general": "通用",
|
|
||||||
"autoConnect": "自動連接",
|
|
||||||
"routeRule": "路由規則",
|
|
||||||
"countrySelector": "選擇國家",
|
|
||||||
"appearance": "外觀",
|
|
||||||
"notifications": "通知",
|
|
||||||
"helpImprove": "幫助我們改進",
|
|
||||||
"helpImproveSubtitle": "幫助我們改進的副標題",
|
|
||||||
"requestDeleteAccount": "請求刪除賬號",
|
|
||||||
"goToDelete": "去刪除",
|
|
||||||
"rateUs": "在 App Store 上為我們評分",
|
|
||||||
"iosRating": "iOS評分",
|
|
||||||
"version": "版本",
|
|
||||||
"switchLanguage": "切換語言",
|
|
||||||
"system": "系統",
|
|
||||||
"light": "淺色",
|
|
||||||
"dark": "深色",
|
|
||||||
"vpnModeSmart": "智能模式",
|
|
||||||
"mode": "出站模式",
|
|
||||||
"connectionTypeGlobal": "全域代理",
|
|
||||||
"connectionTypeGlobalRemark": "啟用後,所有流量均通過代理伺服器轉發",
|
|
||||||
"connectionTypeRule": "智能代理",
|
|
||||||
"connectionTypeRuleRemark": "當[出站模式]設置為[智能代理]時,根據所選國家,系統自動分流:國內IP/域名直連,境外請求透過代理訪問",
|
|
||||||
"connectionTypeDirect": "直連",
|
|
||||||
"connectionTypeDirectRemark": "啟用後,所有流量均不經代理直接訪問",
|
|
||||||
"smartMode": "智能模式",
|
|
||||||
"secureMode": "安全模式",
|
|
||||||
"deviceLimit": "設備限制: {count}"
|
|
||||||
},
|
|
||||||
"statistics": {
|
|
||||||
"title": "統計",
|
|
||||||
"vpnStatus": "VPN 狀態",
|
|
||||||
"ipAddress": "IP地址",
|
|
||||||
"connectionTime": "連接時間",
|
|
||||||
"protocol": "協議",
|
|
||||||
"weeklyProtectionTime": "每週保護時間",
|
|
||||||
"currentStreak": "當前連續記錄",
|
|
||||||
"highestStreak": "最高記錄",
|
|
||||||
"longestConnection": "最長連接時間",
|
|
||||||
"days": "{days}天",
|
|
||||||
"daysOfWeek": {
|
|
||||||
"monday": "週\n一",
|
|
||||||
"tuesday": "週\n二",
|
|
||||||
"wednesday": "週\n三",
|
|
||||||
"thursday": "週\n四",
|
|
||||||
"friday": "週\n五",
|
|
||||||
"saturday": "週\n六",
|
|
||||||
"sunday": "週\n日"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"message": {
|
|
||||||
"title": "通知",
|
|
||||||
"system": "系統消息",
|
|
||||||
"promotion": "促銷消息"
|
|
||||||
},
|
|
||||||
"invite": {
|
|
||||||
"title": "邀請好友",
|
|
||||||
"progress": "邀請進度",
|
|
||||||
"inviteStats": "邀請統計",
|
|
||||||
"registers": "已註冊",
|
|
||||||
"totalCommission": "總佣金",
|
|
||||||
"rewardDetails": "獎勵明細 >",
|
|
||||||
"steps": "邀請步驟",
|
|
||||||
"inviteFriend": "邀請好友",
|
|
||||||
"acceptInvite": "好友接受邀請\n下單並註冊",
|
|
||||||
"getReward": "獲得獎勵",
|
|
||||||
"shareLink": "分享連結",
|
|
||||||
"shareQR": "分享二維碼",
|
|
||||||
"rules": "邀請規則",
|
|
||||||
"rule1": "1、您可以通過分享專屬邀請連結或邀請碼給好友,邀請他們加入我們。",
|
|
||||||
"rule2": "2、好友完成註冊並登錄後,邀請獎勵將自動發放至您的賬戶。",
|
|
||||||
"pending": "待下載",
|
|
||||||
"processing": "在路上",
|
|
||||||
"success": "已成功",
|
|
||||||
"expired": "已失效",
|
|
||||||
"myInviteCode": "我的邀請碼",
|
|
||||||
"inviteCodeCopied": "邀請碼已複製到剪貼板",
|
|
||||||
"close": "關閉",
|
|
||||||
"saveQRCode": "保存二維碼",
|
|
||||||
"qrCodeSaved": "二維碼已保存",
|
|
||||||
"copiedToClipboard": "已複製到剪貼板",
|
|
||||||
"getInviteCodeFailed": "獲取邀請碼失敗,請稍後重試",
|
|
||||||
"generateQRCodeFailed": "生成二維碼失敗,請稍後重試",
|
|
||||||
"generateShareLinkFailed": "生成分享連結失敗,請稍後重試"
|
|
||||||
},
|
|
||||||
"purchaseMembership": {
|
|
||||||
"purchasePackage": "購買套餐",
|
|
||||||
"noData": "暫無可用套餐",
|
|
||||||
"myAccount": "我的賬號",
|
|
||||||
"selectPackage": "選擇套餐",
|
|
||||||
"packageDescription": "套餐描述",
|
|
||||||
"paymentMethod": "支付方式",
|
|
||||||
"cancelAnytime": "您可以隨時在APP上取消",
|
|
||||||
"startSubscription": "開始訂閱",
|
|
||||||
"renewNow": "立即續訂",
|
|
||||||
"month": "{months}個月",
|
|
||||||
"year": "{years}年",
|
|
||||||
"day": "{days}天",
|
|
||||||
"unlimitedTraffic": "不限流量",
|
|
||||||
"unlimitedDevices": "不限設備",
|
|
||||||
"devices": "{count}台",
|
|
||||||
"trafficLimit": "流量限制",
|
|
||||||
"deviceLimit": "設備限制",
|
|
||||||
"features": "套餐特性",
|
|
||||||
"expand": "展開",
|
|
||||||
"collapse": "收起",
|
|
||||||
"confirmPurchase": "確認購買",
|
|
||||||
"confirmPurchaseDesc": "您確定要購買此套餐嗎?"
|
|
||||||
},
|
|
||||||
"home": {
|
|
||||||
"welcome": "歡迎使用 Hi快VPN",
|
|
||||||
"disconnected": "已斷開連接",
|
|
||||||
"connecting": "正在連接",
|
|
||||||
"connected": "已連接",
|
|
||||||
"disconnecting": "正在斷開連接",
|
|
||||||
"currentConnectionTitle": "當前連接",
|
|
||||||
"switchNode": "切換節點",
|
|
||||||
"timeout": "超時",
|
|
||||||
"loading": "載入中...",
|
|
||||||
"error": "載入失敗",
|
|
||||||
"checkNetwork": "請檢查網絡連接並重試",
|
|
||||||
"retry": "重試",
|
|
||||||
"connectionSectionTitle": "連接方式",
|
|
||||||
"dedicatedServers": "專用伺服器",
|
|
||||||
"countryRegion": "國家/地區",
|
|
||||||
"serverListTitle": "專用伺服器群組",
|
|
||||||
"nodeListTitle": "所有節點",
|
|
||||||
"countryListTitle": "國家/地區列表",
|
|
||||||
"noServers": "暫無可用伺服器",
|
|
||||||
"noNodes": "暫無可用節點",
|
|
||||||
"noRegions": "暫無可用地區",
|
|
||||||
"subscriptionDescription": "訂閱會員,暢享全球高速網絡",
|
|
||||||
"subscribe": "立即訂閱",
|
|
||||||
"trialPeriod": "歡迎使用 Premium 試用版",
|
|
||||||
"remainingTime": "剩餘時間",
|
|
||||||
"trialExpired": "試用期已結束,已斷開連接",
|
|
||||||
"subscriptionExpired": "訂閱已過期,已斷開連接",
|
|
||||||
"subscriptionUpdated": "訂閱已更新",
|
|
||||||
"subscriptionUpdatedMessage": "您的訂閱信息已更新,請刷新頁面查看最新狀態",
|
|
||||||
"trialStatus": "試用狀態",
|
|
||||||
"trialing": "試用中",
|
|
||||||
"trialEndMessage": "試用期結束後將無法使用",
|
|
||||||
"lastDaySubscriptionStatus": "訂閱即將到期",
|
|
||||||
"lastDaySubscriptionMessage": "即將到期",
|
|
||||||
"subscriptionEndMessage": "訂閱到期後將無法使用",
|
|
||||||
"trialTimeWithDays": "{days}天 {hours}時 {minutes}分 {seconds}秒",
|
|
||||||
"trialTimeWithHours": "{hours}時 {minutes}分 {seconds}秒",
|
|
||||||
"trialTimeWithMinutes": "{minutes}分 {seconds}秒",
|
|
||||||
"refreshLatency": "刷新延遲",
|
|
||||||
"testLatency": "測試延遲",
|
|
||||||
"testing": "正在測試延遲",
|
|
||||||
"refreshLatencyDesc": "刷新所有節點的延遲",
|
|
||||||
"testAllNodesLatency": "測試所有節點的網絡延遲",
|
|
||||||
"autoSelect": "自動選擇",
|
|
||||||
"selected": "已選擇"
|
|
||||||
},
|
|
||||||
"dialog": {
|
|
||||||
"confirm": "確認",
|
|
||||||
"cancel": "取消",
|
|
||||||
"ok": "我知道了"
|
|
||||||
},
|
|
||||||
"update": {
|
|
||||||
"title": "發現新版本",
|
|
||||||
"content": "是否立即更新?",
|
|
||||||
"updateNow": "立即更新",
|
|
||||||
"updateLater": "稍後",
|
|
||||||
"defaultContent": "1. 優化應用性能\n2. 修復已知問題\n3. 改進用戶體驗"
|
|
||||||
},
|
|
||||||
"orderStatus": {
|
|
||||||
"title": "訂單狀態",
|
|
||||||
"pending": {
|
|
||||||
"title": "待支付",
|
|
||||||
"description": "請完成支付"
|
|
||||||
},
|
|
||||||
"paid": {
|
|
||||||
"title": "已支付",
|
|
||||||
"description": "正在處理您的訂單"
|
|
||||||
},
|
|
||||||
"success": {
|
|
||||||
"title": "恭喜你!支付成功",
|
|
||||||
"description": "您的套餐已經購買成功了"
|
|
||||||
},
|
|
||||||
"closed": {
|
|
||||||
"title": "訂單已關閉",
|
|
||||||
"description": "請重新下單"
|
|
||||||
},
|
|
||||||
"failed": {
|
|
||||||
"title": "支付失敗",
|
|
||||||
"description": "請重新嘗試支付"
|
|
||||||
},
|
|
||||||
"unknown": {
|
|
||||||
"title": "未知狀態",
|
|
||||||
"description": "請聯繫客服"
|
|
||||||
},
|
|
||||||
"checkFailed": {
|
|
||||||
"title": "檢查失敗",
|
|
||||||
"description": "請稍後重試"
|
|
||||||
},
|
|
||||||
"initial": {
|
|
||||||
"title": "支付中",
|
|
||||||
"description": "請稍候,正在處理您的支付"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"country": {
|
|
||||||
"cn": "中國",
|
|
||||||
"ir": "伊朗",
|
|
||||||
"af": "阿富汗",
|
|
||||||
"ru": "俄羅斯",
|
|
||||||
"id": "印尼",
|
|
||||||
"tr": "土耳其",
|
|
||||||
"br": "巴西"
|
|
||||||
},
|
|
||||||
"error": {
|
|
||||||
"200": "成功",
|
|
||||||
"500": "服務器內部錯誤",
|
|
||||||
"10001": "數據庫查詢錯誤",
|
|
||||||
"10002": "數據庫更新錯誤",
|
|
||||||
"10003": "數據庫插入錯誤",
|
|
||||||
"10004": "數據庫刪除錯誤",
|
|
||||||
"20001": "用戶已存在",
|
|
||||||
"20002": "用戶不存在",
|
|
||||||
"20003": "用戶密碼錯誤",
|
|
||||||
"20004": "用戶已被禁用",
|
|
||||||
"20005": "餘額不足",
|
|
||||||
"20006": "註冊已暫停",
|
|
||||||
"20007": "未綁定 Telegram",
|
|
||||||
"20008": "用戶未綁定 OAuth",
|
|
||||||
"20009": "邀請碼錯誤",
|
|
||||||
"30001": "節點已存在",
|
|
||||||
"30002": "節點不存在",
|
|
||||||
"30003": "節點群組已存在",
|
|
||||||
"30004": "節點群組不存在",
|
|
||||||
"30005": "節點群組不為空",
|
|
||||||
"400": "參數錯誤",
|
|
||||||
"40002": "用戶令牌為空",
|
|
||||||
"40003": "用戶令牌無效",
|
|
||||||
"40004": "用戶令牌已過期",
|
|
||||||
"40005": "未登錄",
|
|
||||||
"401": "請求過多",
|
|
||||||
"50001": "優惠券不存在",
|
|
||||||
"50002": "優惠券已使用",
|
|
||||||
"50003": "優惠券不匹配",
|
|
||||||
"60001": "訂閱已過期",
|
|
||||||
"60002": "訂閱不可用",
|
|
||||||
"60003": "用戶已有訂閱",
|
|
||||||
"60004": "訂閱已使用",
|
|
||||||
"60005": "單次訂閱模式超出限制",
|
|
||||||
"60006": "訂閱配額限制",
|
|
||||||
"70001": "驗證碼錯誤",
|
|
||||||
"80001": "加入隊列錯誤",
|
|
||||||
"90001": "調試模式已啟用",
|
|
||||||
"90002": "發送短信錯誤",
|
|
||||||
"90003": "短信功能未啟用",
|
|
||||||
"90004": "郵件功能未啟用",
|
|
||||||
"90005": "不支持的登錄方式",
|
|
||||||
"90006": "驗證器不支持此方式",
|
|
||||||
"90007": "電話國家代碼為空",
|
|
||||||
"90008": "密碼為空",
|
|
||||||
"90009": "國家代碼為空",
|
|
||||||
"90010": "需要密碼或驗證碼",
|
|
||||||
"90011": "郵箱已存在",
|
|
||||||
"90012": "手機號已存在",
|
|
||||||
"90013": "設備已存在",
|
|
||||||
"90014": "手機號錯誤",
|
|
||||||
"90015": "該賬號今日已達到發送限制",
|
|
||||||
"90017": "設備不存在",
|
|
||||||
"90018": "用戶 ID 不匹配",
|
|
||||||
"61001": "訂閱不存在",
|
|
||||||
"61002": "未找到支付方式",
|
|
||||||
"61003": "訂閱狀態錯誤",
|
|
||||||
"61004": "重置期不足",
|
|
||||||
"61005": "存在未使用流量"
|
|
||||||
},
|
|
||||||
"tray": {
|
|
||||||
"open_dashboard": "打開面板",
|
|
||||||
"copy_to_terminal": "複製到終端",
|
|
||||||
"exit_app": "退出應用"
|
|
||||||
},
|
|
||||||
"splash": {
|
|
||||||
"appName": "Hi快VPN",
|
|
||||||
"slogan": "暢享全球高速網絡",
|
|
||||||
"initializing": "正在初始化...",
|
|
||||||
"networkConnectionFailure": "網絡連接失敗,請檢查並重試",
|
|
||||||
"retry": "重試",
|
|
||||||
"networkPermissionFailed": "獲取網絡權限失敗",
|
|
||||||
"initializationFailed": "初始化失敗"
|
|
||||||
},
|
|
||||||
"network": {
|
|
||||||
"status": {
|
|
||||||
"connected": "已連接",
|
|
||||||
"disconnected": "已斷開連接",
|
|
||||||
"connecting": "正在連接...",
|
|
||||||
"disconnecting": "正在斷開連接...",
|
|
||||||
"reconnecting": "正在重新連接...",
|
|
||||||
"failed": "連接失敗"
|
|
||||||
},
|
|
||||||
"permission": {
|
|
||||||
"title": "網絡權限",
|
|
||||||
"description": "需要網絡權限以提供 VPN 服務",
|
|
||||||
"goToSettings": "前往設置",
|
|
||||||
"cancel": "取消"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
@echo off
|
||||||
|
echo 📋 复制 libcore 文件...
|
||||||
|
|
||||||
|
:: 创建目标目录
|
||||||
|
mkdir libcore\bin >nul 2>&1
|
||||||
|
|
||||||
|
:: 查找并复制 HiddifyCli.exe,重命名为 HiFastVPNCli.exe
|
||||||
|
for /r %%f in (HiddifyCli.exe) do (
|
||||||
|
if exist "%%f" (
|
||||||
|
echo ✅ 找到 HiddifyCli.exe: %%f
|
||||||
|
echo 📝 复制并重命名为 HiFastVPNCli.exe
|
||||||
|
copy "%%f" libcore\bin\HiFastVPNCli.exe
|
||||||
|
echo ✅ 重命名完成
|
||||||
|
goto :dll
|
||||||
|
)
|
||||||
|
)
|
||||||
|
echo ⚠️ 未找到 HiddifyCli.exe
|
||||||
|
:dll
|
||||||
|
|
||||||
|
:: 复制 libcore.dll
|
||||||
|
for /r %%f in (libcore.dll) do (
|
||||||
|
if exist "%%f" (
|
||||||
|
echo ✅ 找到 libcore.dll: %%f
|
||||||
|
copy "%%f" libcore\bin\libcore.dll
|
||||||
|
goto :verify
|
||||||
|
)
|
||||||
|
)
|
||||||
|
echo ⚠️ 未找到 libcore.dll
|
||||||
|
:verify
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo 📄 验证文件:
|
||||||
|
if exist libcore\bin (
|
||||||
|
dir libcore\bin
|
||||||
|
if exist libcore\bin\HiFastVPNCli.exe (
|
||||||
|
if exist libcore\bin\libcore.dll (
|
||||||
|
echo ✅ 验证成功:所有文件已正确复制
|
||||||
|
exit /b 0
|
||||||
|
) else (
|
||||||
|
echo ❌ 验证失败:libcore.dll 不存在
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
) else (
|
||||||
|
echo ❌ 验证失败:HiFastVPNCli.exe 不存在
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
) else (
|
||||||
|
echo ⚠️ libcore\bin 目录不存在
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
@echo off
|
||||||
|
REM Fix NuGet installation using Chocolatey
|
||||||
|
|
||||||
|
echo Installing NuGet via Chocolatey...
|
||||||
|
|
||||||
|
REM Check if Chocolatey is available
|
||||||
|
where choco >nul 2>nul
|
||||||
|
if %errorlevel% neq 0 (
|
||||||
|
echo Chocolatey not found, installing Chocolatey first...
|
||||||
|
powershell -Command "Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))"
|
||||||
|
)
|
||||||
|
|
||||||
|
echo Installing NuGet via Chocolatey...
|
||||||
|
choco install nuget.commandline -y
|
||||||
|
|
||||||
|
if %errorlevel% equ 0 (
|
||||||
|
echo SUCCESS: NuGet installed via Chocolatey
|
||||||
|
echo Updating PATH...
|
||||||
|
set PATH=C:\ProgramData\chocolatey\bin;%PATH%
|
||||||
|
setx PATH "C:\ProgramData\chocolatey\bin;%PATH%"
|
||||||
|
|
||||||
|
echo Verifying installation...
|
||||||
|
nuget help | findstr "NuGet"
|
||||||
|
|
||||||
|
if %errorlevel% equ 0 (
|
||||||
|
echo NuGet is working correctly!
|
||||||
|
) else (
|
||||||
|
echo WARNING: NuGet installed but not accessible
|
||||||
|
)
|
||||||
|
) else (
|
||||||
|
echo ERROR: NuGet installation failed
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
pause
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
# NuGet 安装脚本 - 解决 SSL 问题
|
||||||
|
Write-Host "=== 安装 NuGet ===" -ForegroundColor Green
|
||||||
|
|
||||||
|
# 设置 TLS 1.2
|
||||||
|
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||||
|
|
||||||
|
# 检查是否已安装
|
||||||
|
$nugetExists = Get-Command nuget -ErrorAction SilentlyContinue
|
||||||
|
if ($nugetExists) {
|
||||||
|
Write-Host "NuGet 已安装: $($nugetExists.Source)" -ForegroundColor Green
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# 下载 NuGet
|
||||||
|
Write-Host "下载 NuGet CLI..." -ForegroundColor Yellow
|
||||||
|
$downloadUrls = @(
|
||||||
|
"https://dist.nuget.org/win-x86-commandline/latest/nuget.exe",
|
||||||
|
"https://dist.nuget.org/win-x86-commandline/v6.7.0/nuget.exe",
|
||||||
|
"http://dist.nuget.org/win-x86-commandline/v6.7.0/nuget.exe"
|
||||||
|
)
|
||||||
|
|
||||||
|
$downloaded = $false
|
||||||
|
foreach ($url in $downloadUrls) {
|
||||||
|
try {
|
||||||
|
Write-Host "尝试下载: $url"
|
||||||
|
$webClient = New-Object System.Net.WebClient
|
||||||
|
$webClient.DownloadFile($url, "C:\nuget.exe")
|
||||||
|
$downloaded = $true
|
||||||
|
Write-Host "下载成功!" -ForegroundColor Green
|
||||||
|
break
|
||||||
|
} catch {
|
||||||
|
Write-Host "下载失败: $($_.Exception.Message)" -ForegroundColor Red
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (-not $downloaded) {
|
||||||
|
Write-Host "所有下载都失败了,尝试使用 Chocolatey..." -ForegroundColor Yellow
|
||||||
|
try {
|
||||||
|
choco install nuget.commandline -y
|
||||||
|
if (Get-Command nuget -ErrorAction SilentlyContinue) {
|
||||||
|
Write-Host "通过 Chocolatey 安装成功!" -ForegroundColor Green
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
Write-Host "Chocolatey 安装也失败了: $($_.Exception.Message)" -ForegroundColor Red
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "NuGet 安装失败,但继续构建..." -ForegroundColor Yellow
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
|
# 验证安装
|
||||||
|
if (Test-Path "C:\nuget.exe") {
|
||||||
|
$env:PATH = "C:\;$env:PATH"
|
||||||
|
Write-Host "NuGet 安装完成" -ForegroundColor Green
|
||||||
|
|
||||||
|
# 测试
|
||||||
|
try {
|
||||||
|
$version = & "C:\nuget.exe" help | Select-String -Pattern "NuGet Version" | Select-Object -First 1
|
||||||
|
Write-Host "版本信息: $version" -ForegroundColor Green
|
||||||
|
} catch {
|
||||||
|
Write-Host "NuGet 可用,但版本检查失败" -ForegroundColor Yellow
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Write-Host "NuGet 文件不存在" -ForegroundColor Red
|
||||||
|
}
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
# Windows 构建修复脚本
|
||||||
|
# 以管理员身份运行
|
||||||
|
|
||||||
|
Write-Host "=== Windows Flutter 构建修复 ===" -ForegroundColor Green
|
||||||
|
|
||||||
|
# 1. 安装 NuGet
|
||||||
|
Write-Host "`n1. 安装 NuGet..." -ForegroundColor Yellow
|
||||||
|
$nugetPath = "C:\nuget.exe"
|
||||||
|
if (-not (Test-Path $nugetPath)) {
|
||||||
|
try {
|
||||||
|
Write-Host "下载 NuGet..."
|
||||||
|
Invoke-WebRequest -Uri "https://dist.nuget.org/win-x86-commandline/latest/nuget.exe" -OutFile $nugetPath
|
||||||
|
$env:PATH = "C:\;$env:PATH"
|
||||||
|
Write-Host "NuGet 安装成功" -ForegroundColor Green
|
||||||
|
} catch {
|
||||||
|
Write-Host "NuGet 下载失败: $_" -ForegroundColor Red
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Write-Host "NuGet 已存在" -ForegroundColor Green
|
||||||
|
}
|
||||||
|
|
||||||
|
# 2. 启用长路径支持
|
||||||
|
Write-Host "`n2. 启用长路径支持..." -ForegroundColor Yellow
|
||||||
|
try {
|
||||||
|
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -Type DWORD -Force
|
||||||
|
Write-Host "长路径支持已启用" -ForegroundColor Green
|
||||||
|
} catch {
|
||||||
|
Write-Host "长路径设置失败: $_" -ForegroundColor Red
|
||||||
|
}
|
||||||
|
|
||||||
|
# 3. 清理构建缓存
|
||||||
|
Write-Host "`n3. 清理构建缓存..." -ForegroundColor Yellow
|
||||||
|
if (Test-Path "build") {
|
||||||
|
Remove-Item -Path "build" -Recurse -Force
|
||||||
|
Write-Host "Build 目录已清理" -ForegroundColor Green
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Test-Path "windows") {
|
||||||
|
Remove-Item -Path "windows" -Recurse -Force
|
||||||
|
Write-Host "Windows 目录已清理" -ForegroundColor Green
|
||||||
|
}
|
||||||
|
|
||||||
|
# 4. 重新创建 Windows 项目
|
||||||
|
Write-Host "`n4. 重新创建 Windows 项目..." -ForegroundColor Yellow
|
||||||
|
flutter create --platforms=windows .
|
||||||
|
|
||||||
|
# 5. 获取依赖
|
||||||
|
Write-Host "`n5. 获取依赖..." -ForegroundColor Yellow
|
||||||
|
flutter pub get
|
||||||
|
|
||||||
|
# 6. 构建 Debug 版本
|
||||||
|
Write-Host "`n6. 构建 Debug 版本..." -ForegroundColor Yellow
|
||||||
|
flutter build windows
|
||||||
|
|
||||||
|
if ($LASTEXITCODE -eq 0) {
|
||||||
|
Write-Host "`n=== 构建成功! ===" -ForegroundColor Green
|
||||||
|
Write-Host "输出目录: build\windows\runner\Debug\" -ForegroundColor Cyan
|
||||||
|
} else {
|
||||||
|
Write-Host "`n=== 构建失败 ===" -ForegroundColor Red
|
||||||
|
Write-Host "请检查错误信息并尝试手动修复" -ForegroundColor Red
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Host "`n修复完成!" -ForegroundColor Green
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
@echo off
|
||||||
|
:: This script checks for and installs all necessary tools for building and packaging the Flutter application on Windows.
|
||||||
|
|
||||||
|
:: 1. Check for Administrator Privileges
|
||||||
|
net session >nul 2>&1
|
||||||
|
if %errorLevel% == 0 (
|
||||||
|
echo Administrator privileges detected. Continuing...
|
||||||
|
) else (
|
||||||
|
echo Requesting Administrator privileges to install tools...
|
||||||
|
powershell -Command "Start-Process cmd.exe -ArgumentList '/c %~s0' -Verb RunAs" >nul 2>&1
|
||||||
|
exit /b
|
||||||
|
)
|
||||||
|
|
||||||
|
:: 2. Check for and Install Chocolatey
|
||||||
|
echo.
|
||||||
|
echo === Checking for Chocolatey ===
|
||||||
|
where choco >nul 2>&1
|
||||||
|
if %errorlevel% equ 0 (
|
||||||
|
echo Chocolatey is already installed.
|
||||||
|
) else (
|
||||||
|
echo Chocolatey not found. Installing now...
|
||||||
|
powershell -NoProfile -ExecutionPolicy Bypass -Command "[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))"
|
||||||
|
if %errorlevel% neq 0 (
|
||||||
|
echo ERROR: Failed to install Chocolatey. Please install it manually from https://chocolatey.org
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
echo Chocolatey installed successfully.
|
||||||
|
:: Add Chocolatey to the PATH for the current session
|
||||||
|
set "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
|
||||||
|
)
|
||||||
|
|
||||||
|
:: 3. Install Required Tools via Chocolatey
|
||||||
|
echo.
|
||||||
|
echo === Installing Build Tools (7-Zip and Enigma Virtual Box) ===
|
||||||
|
|
||||||
|
:: Install 7-Zip
|
||||||
|
echo Installing 7-Zip...
|
||||||
|
choco install 7zip -y
|
||||||
|
if %errorlevel% neq 0 (
|
||||||
|
echo ERROR: Failed to install 7-Zip.
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
echo 7-Zip installed successfully.
|
||||||
|
|
||||||
|
:: Install Enigma Virtual Box
|
||||||
|
echo Installing Enigma Virtual Box...
|
||||||
|
choco install enigma-virtual-box -y
|
||||||
|
if %errorlevel% neq 0 (
|
||||||
|
echo ERROR: Failed to install Enigma Virtual Box.
|
||||||
|
pause
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
echo Enigma Virtual Box installed successfully.
|
||||||
|
|
||||||
|
|
||||||
|
echo.
|
||||||
|
echo =======================================================
|
||||||
|
echo All required build tools have been installed.
|
||||||
|
echo You can now use 'package_windows_single_exe.ps1' to build your single-file executable.
|
||||||
|
echo =======================================================
|
||||||
|
echo.
|
||||||
|
pause
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
@echo off
|
||||||
|
REM Simple Flutter installer for Windows Gitea Runner
|
||||||
|
|
||||||
|
echo Installing Flutter for Windows...
|
||||||
|
|
||||||
|
REM Create flutter directory
|
||||||
|
mkdir C:\flutter 2>nul
|
||||||
|
|
||||||
|
REM Download Flutter stable version
|
||||||
|
echo Downloading Flutter...
|
||||||
|
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://storage.googleapis.com/flutter_infra_release/releases/stable/windows/flutter_windows_3.24.5-stable.zip', 'C:\flutter.zip')"
|
||||||
|
|
||||||
|
if %errorlevel% neq 0 (
|
||||||
|
echo Download failed, trying alternative...
|
||||||
|
powershell -Command "Invoke-WebRequest -Uri 'https://storage.googleapis.com/flutter_infra_release/releases/stable/windows/flutter_windows_3.24.5-stable.zip' -OutFile 'C:\flutter.zip'"
|
||||||
|
)
|
||||||
|
|
||||||
|
REM Extract Flutter
|
||||||
|
echo Extracting Flutter...
|
||||||
|
powershell -Command "Expand-Archive -Path 'C:\flutter.zip' -DestinationPath 'C:\' -Force"
|
||||||
|
|
||||||
|
REM Set PATH
|
||||||
|
echo Setting PATH...
|
||||||
|
set PATH=C:\flutter\bin;%PATH%
|
||||||
|
setx PATH "C:\flutter\bin;%PATH%"
|
||||||
|
|
||||||
|
REM Clean up
|
||||||
|
del C:\flutter.zip
|
||||||
|
|
||||||
|
REM Verify installation
|
||||||
|
echo Verifying Flutter installation...
|
||||||
|
C:\flutter\bin\flutter --version
|
||||||
|
|
||||||
|
if %errorlevel% equ 0 (
|
||||||
|
echo SUCCESS: Flutter installed successfully
|
||||||
|
echo Running flutter doctor...
|
||||||
|
C:\flutter\bin\flutter doctor
|
||||||
|
) else (
|
||||||
|
echo ERROR: Flutter installation failed
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
echo Flutter installation complete!
|
||||||
|
pause
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
@echo off
|
||||||
|
REM Simple NuGet installer for Windows
|
||||||
|
|
||||||
|
echo Installing NuGet...
|
||||||
|
|
||||||
|
REM Check if NuGet exists
|
||||||
|
where nuget >nul 2>nul
|
||||||
|
if %errorlevel% == 0 (
|
||||||
|
echo NuGet already installed
|
||||||
|
nuget help | findstr "NuGet"
|
||||||
|
pause
|
||||||
|
exit /b 0
|
||||||
|
)
|
||||||
|
|
||||||
|
REM Download NuGet using PowerShell
|
||||||
|
echo Downloading NuGet CLI...
|
||||||
|
powershell -Command "(New-Object Net.WebClient).DownloadFile('http://dist.nuget.org/win-x86-commandline/v6.7.0/nuget.exe', 'C:\nuget.exe')"
|
||||||
|
|
||||||
|
if %errorlevel% neq 0 (
|
||||||
|
echo Download failed, trying alternative...
|
||||||
|
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://dist.nuget.org/win-x86-commandline/v6.7.0/nuget.exe', 'C:\nuget.exe')"
|
||||||
|
)
|
||||||
|
|
||||||
|
REM Add to PATH
|
||||||
|
set PATH=C:\;%PATH%
|
||||||
|
setx PATH "C:\;%PATH%"
|
||||||
|
|
||||||
|
REM Verify installation
|
||||||
|
echo Verifying NuGet installation...
|
||||||
|
C:\nuget.exe help | findstr "NuGet"
|
||||||
|
|
||||||
|
if %errorlevel% equ 0 (
|
||||||
|
echo SUCCESS: NuGet installed successfully
|
||||||
|
) else (
|
||||||
|
echo ERROR: NuGet installation failed
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
pause
|
||||||
@@ -5,6 +5,6 @@
|
|||||||
// Created by GFWFighter on 7/24/1402 AP.
|
// Created by GFWFighter on 7/24/1402 AP.
|
||||||
//
|
//
|
||||||
|
|
||||||
BASE_BUNDLE_IDENTIFIER=app.baer.com
|
BASE_BUNDLE_IDENTIFIER=app.hi.com
|
||||||
SERVICE_IDENTIFIER=com.baer.app
|
SERVICE_IDENTIFIER=com.hi.app
|
||||||
DEVELOPMENT_TEAM=3UR892FAP3
|
DEVELOPMENT_TEAM=3UR892FAP3
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<true/>
|
<true/>
|
||||||
<key>com.apple.security.application-groups</key>
|
<key>com.apple.security.application-groups</key>
|
||||||
<array>
|
<array>
|
||||||
<string>group.app.baer.com</string>
|
<string>group.app.hi.com</string>
|
||||||
</array>
|
</array>
|
||||||
<key>com.apple.security.network.client</key>
|
<key>com.apple.security.network.client</key>
|
||||||
<true/>
|
<true/>
|
||||||
|
|||||||
@@ -75,21 +75,21 @@ EXTERNAL SOURCES:
|
|||||||
:path: ".symlinks/plugins/webview_flutter_wkwebview/darwin"
|
:path: ".symlinks/plugins/webview_flutter_wkwebview/darwin"
|
||||||
|
|
||||||
SPEC CHECKSUMS:
|
SPEC CHECKSUMS:
|
||||||
connectivity_plus: 481668c94744c30c53b8895afb39159d1e619bdf
|
connectivity_plus: bf0076dd84a130856aa636df1c71ccaff908fa1d
|
||||||
device_info_plus: 21fcca2080fbcd348be798aa36c3e5ed849eefbe
|
device_info_plus: bf2e3232933866d73fe290f2942f2156cdd10342
|
||||||
EasyPermissionX: ff4c438f6ee80488f873b4cb921e32d982523067
|
EasyPermissionX: ff4c438f6ee80488f873b4cb921e32d982523067
|
||||||
Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467
|
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
|
||||||
flutter_inappwebview_ios: b89ba3482b96fb25e00c967aae065701b66e9b99
|
flutter_inappwebview_ios: 6f63631e2c62a7c350263b13fa5427aedefe81d4
|
||||||
flutter_udid: f7c3884e6ec2951efe4f9de082257fc77c4d15e9
|
flutter_udid: b2417673f287ee62817a1de3d1643f47b9f508ab
|
||||||
OrderedSet: e539b66b644ff081c73a262d24ad552a69be3a94
|
OrderedSet: e539b66b644ff081c73a262d24ad552a69be3a94
|
||||||
package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499
|
package_info_plus: c0502532a26c7662a62a356cebe2692ec5fe4ec4
|
||||||
path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564
|
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
|
||||||
permission_handler_apple: 4ed2196e43d0651e8ff7ca3483a069d469701f2d
|
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
|
||||||
ReachabilitySwift: 32793e867593cfc1177f5d16491e3a197d2fccda
|
ReachabilitySwift: 32793e867593cfc1177f5d16491e3a197d2fccda
|
||||||
SAMKeychain: 483e1c9f32984d50ca961e26818a534283b4cd5c
|
SAMKeychain: 483e1c9f32984d50ca961e26818a534283b4cd5c
|
||||||
url_launcher_ios: 694010445543906933d732453a59da0a173ae33d
|
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
|
||||||
webview_flutter_wkwebview: 1821ceac936eba6f7984d89a9f3bcb4dea99ebb2
|
webview_flutter_wkwebview: a4af96a051138e28e29f60101d094683b9f82188
|
||||||
|
|
||||||
PODFILE CHECKSUM: 579a354deb8d6fdc55c12799569018594328642e
|
PODFILE CHECKSUM: 579a354deb8d6fdc55c12799569018594328642e
|
||||||
|
|
||||||
COCOAPODS: 1.16.2
|
COCOAPODS: 1.15.2
|
||||||
|
|||||||
@@ -814,11 +814,9 @@
|
|||||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||||
CODE_SIGN_ENTITLEMENTS = PacketTunnel/PacketTunnelRelease.entitlements;
|
CODE_SIGN_ENTITLEMENTS = PacketTunnel/PacketTunnelRelease.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CODE_SIGN_STYLE = Manual;
|
|
||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
DEVELOPMENT_TEAM = "";
|
DEVELOPMENT_TEAM = Q5PC7SNX27;
|
||||||
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 3UR892FAP3;
|
|
||||||
ENABLE_USER_SCRIPT_SANDBOXING = YES;
|
ENABLE_USER_SCRIPT_SANDBOXING = YES;
|
||||||
EXCLUDED_ARCHS = armv7;
|
EXCLUDED_ARCHS = armv7;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu17;
|
GCC_C_LANGUAGE_STANDARD = gnu17;
|
||||||
@@ -844,7 +842,6 @@
|
|||||||
PRODUCT_BUNDLE_IDENTIFIER = "$(BASE_BUNDLE_IDENTIFIER).PacketTunnel";
|
PRODUCT_BUNDLE_IDENTIFIER = "$(BASE_BUNDLE_IDENTIFIER).PacketTunnel";
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = hitoPacketTunnel;
|
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
SUPPORTS_MACCATALYST = NO;
|
SUPPORTS_MACCATALYST = NO;
|
||||||
@@ -868,11 +865,9 @@
|
|||||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||||
CODE_SIGN_ENTITLEMENTS = PacketTunnel/HiddifyPacketTunnel.entitlements;
|
CODE_SIGN_ENTITLEMENTS = PacketTunnel/HiddifyPacketTunnel.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CODE_SIGN_STYLE = Manual;
|
|
||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
DEVELOPMENT_TEAM = "";
|
DEVELOPMENT_TEAM = Q5PC7SNX27;
|
||||||
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 3UR892FAP3;
|
|
||||||
ENABLE_USER_SCRIPT_SANDBOXING = YES;
|
ENABLE_USER_SCRIPT_SANDBOXING = YES;
|
||||||
EXCLUDED_ARCHS = armv7;
|
EXCLUDED_ARCHS = armv7;
|
||||||
GCC_C_LANGUAGE_STANDARD = gnu17;
|
GCC_C_LANGUAGE_STANDARD = gnu17;
|
||||||
@@ -898,7 +893,6 @@
|
|||||||
PRODUCT_BUNDLE_IDENTIFIER = "$(BASE_BUNDLE_IDENTIFIER).PacketTunnel";
|
PRODUCT_BUNDLE_IDENTIFIER = "$(BASE_BUNDLE_IDENTIFIER).PacketTunnel";
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = hitoPacketTunnel;
|
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
SUPPORTS_MACCATALYST = NO;
|
SUPPORTS_MACCATALYST = NO;
|
||||||
@@ -986,6 +980,7 @@
|
|||||||
"EXCLUDED_ARCHS[sdk=iphoneos*]" = armv7;
|
"EXCLUDED_ARCHS[sdk=iphoneos*]" = armv7;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
|
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 16.6;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(PROJECT_DIR)/build/ios/framework/$(CONFIGURATION)",
|
"$(PROJECT_DIR)/build/ios/framework/$(CONFIGURATION)",
|
||||||
"$(PROJECT_DIR)/../build/ios/framework/$(CONFIGURATION)",
|
"$(PROJECT_DIR)/../build/ios/framework/$(CONFIGURATION)",
|
||||||
@@ -1216,6 +1211,7 @@
|
|||||||
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "i386 arm64";
|
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = "i386 arm64";
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
|
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 16.6;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(PROJECT_DIR)/build/ios/framework/$(CONFIGURATION)",
|
"$(PROJECT_DIR)/build/ios/framework/$(CONFIGURATION)",
|
||||||
"$(PROJECT_DIR)/../build/ios/framework/$(CONFIGURATION)",
|
"$(PROJECT_DIR)/../build/ios/framework/$(CONFIGURATION)",
|
||||||
@@ -1261,15 +1257,14 @@
|
|||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = Runner/RunnerRelease.entitlements;
|
CODE_SIGN_ENTITLEMENTS = Runner/RunnerRelease.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CODE_SIGN_STYLE = Manual;
|
|
||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
DEVELOPMENT_TEAM = "";
|
DEVELOPMENT_TEAM = Q5PC7SNX27;
|
||||||
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 3UR892FAP3;
|
|
||||||
ENABLE_BITCODE = NO;
|
ENABLE_BITCODE = NO;
|
||||||
"EXCLUDED_ARCHS[sdk=iphoneos*]" = armv7;
|
"EXCLUDED_ARCHS[sdk=iphoneos*]" = armv7;
|
||||||
INFOPLIST_FILE = Runner/Info.plist;
|
INFOPLIST_FILE = Runner/Info.plist;
|
||||||
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
|
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 16.6;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(PROJECT_DIR)/build/ios/framework/$(CONFIGURATION)",
|
"$(PROJECT_DIR)/build/ios/framework/$(CONFIGURATION)",
|
||||||
"$(PROJECT_DIR)/../build/ios/framework/$(CONFIGURATION)",
|
"$(PROJECT_DIR)/../build/ios/framework/$(CONFIGURATION)",
|
||||||
@@ -1295,7 +1290,6 @@
|
|||||||
PRODUCT_BUNDLE_IDENTIFIER = "$(BASE_BUNDLE_IDENTIFIER)";
|
PRODUCT_BUNDLE_IDENTIFIER = "$(BASE_BUNDLE_IDENTIFIER)";
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||||
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = rls;
|
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
SUPPORTS_MACCATALYST = NO;
|
SUPPORTS_MACCATALYST = NO;
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 3.8 KiB |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 69 B After Width: | Height: | Size: 844 KiB |
|
Before Width: | Height: | Size: 6.8 KiB After Width: | Height: | Size: 3.2 KiB |
@@ -9,7 +9,7 @@
|
|||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||||
<key>CFBundleDisplayName</key>
|
<key>CFBundleDisplayName</key>
|
||||||
<string>BearVPN</string>
|
<string>Hi快VPN</string>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>$(EXECUTABLE_NAME)</string>
|
<string>$(EXECUTABLE_NAME)</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
@@ -30,10 +30,10 @@
|
|||||||
<key>CFBundleTypeRole</key>
|
<key>CFBundleTypeRole</key>
|
||||||
<string>Editor</string>
|
<string>Editor</string>
|
||||||
<key>CFBundleURLName</key>
|
<key>CFBundleURLName</key>
|
||||||
<string>com.BearVPN.ios</string>
|
<string>com.hi.ios</string>
|
||||||
<key>CFBundleURLSchemes</key>
|
<key>CFBundleURLSchemes</key>
|
||||||
<array>
|
<array>
|
||||||
<string>hiddify</string>
|
<string>HiFastVPN</string>
|
||||||
</array>
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<true/>
|
<true/>
|
||||||
<key>com.apple.security.application-groups</key>
|
<key>com.apple.security.application-groups</key>
|
||||||
<array>
|
<array>
|
||||||
<string>group.$(BASE_BUNDLE_IDENTIFIER)</string>
|
<string>group.app.hi.com</string>
|
||||||
</array>
|
</array>
|
||||||
<key>com.apple.security.network.client</key>
|
<key>com.apple.security.network.client</key>
|
||||||
<true/>
|
<true/>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<true/>
|
<true/>
|
||||||
<key>com.apple.security.application-groups</key>
|
<key>com.apple.security.application-groups</key>
|
||||||
<array>
|
<array>
|
||||||
<string>group.app.baer.com</string>
|
<string>group.app.hi.com</string>
|
||||||
</array>
|
</array>
|
||||||
<key>com.apple.security.network.client</key>
|
<key>com.apple.security.network.client</key>
|
||||||
<true/>
|
<true/>
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ class VPNManager: ObservableObject {
|
|||||||
`protocol`.providerBundleIdentifier = Bundle.main.baseBundleIdentifier + ".PacketTunnel"
|
`protocol`.providerBundleIdentifier = Bundle.main.baseBundleIdentifier + ".PacketTunnel"
|
||||||
`protocol`.serverAddress = "localhost"
|
`protocol`.serverAddress = "localhost"
|
||||||
newManager.protocolConfiguration = `protocol`
|
newManager.protocolConfiguration = `protocol`
|
||||||
newManager.localizedDescription = "BearVPN"
|
newManager.localizedDescription = "HiFastVPN"
|
||||||
try await newManager.saveToPreferences()
|
try await newManager.saveToPreferences()
|
||||||
try await newManager.loadFromPreferences()
|
try await newManager.loadFromPreferences()
|
||||||
self.manager = newManager
|
self.manager = newManager
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import '../utils/kr_update_util.dart';
|
|||||||
import '../utils/kr_secure_storage.dart';
|
import '../utils/kr_secure_storage.dart';
|
||||||
import '../utils/kr_log_util.dart';
|
import '../utils/kr_log_util.dart';
|
||||||
import '../services/singbox_imp/kr_sing_box_imp.dart';
|
import '../services/singbox_imp/kr_sing_box_imp.dart';
|
||||||
|
import '../utils/kr_init_log_collector.dart'; // 🔧 新增:导入日志收集器
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
@@ -1081,21 +1082,141 @@ class KRDomain {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 从本地加载域名
|
/// 从本地加载域名(方案1:加载后验证可用性)
|
||||||
static Future<void> kr_loadBaseDomain() async {
|
static Future<void> kr_loadBaseDomain() async {
|
||||||
|
KRLogUtil.kr_i('📂 开始从 Hive 加载域名配置', tag: 'KRDomain');
|
||||||
|
final startTime = DateTime.now();
|
||||||
|
|
||||||
|
try {
|
||||||
|
// 🔧 Android 15 关键修复:添加总体超时保护(15秒)
|
||||||
|
await Future.any([
|
||||||
|
_executeLoadAndVerify(),
|
||||||
|
Future.delayed(const Duration(seconds: 15), () {
|
||||||
|
throw TimeoutException('域名加载和验证总超时(15秒)');
|
||||||
|
}),
|
||||||
|
]);
|
||||||
|
} on TimeoutException catch (e) {
|
||||||
|
final duration = DateTime.now().difference(startTime).inSeconds;
|
||||||
|
KRLogUtil.kr_e('⏱️ 域名加载验证超时($duration 秒): $e', tag: 'KRDomain');
|
||||||
|
// 超时时使用默认域名
|
||||||
|
if (kr_baseDomains.isNotEmpty) {
|
||||||
|
kr_currentDomain = kr_baseDomains[0];
|
||||||
|
KRLogUtil.kr_w('⚠️ 超时后使用默认域名: $kr_currentDomain', tag: 'KRDomain');
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
final duration = DateTime.now().difference(startTime).inSeconds;
|
||||||
|
KRLogUtil.kr_e('❌ 域名加载异常($duration 秒): $e', tag: 'KRDomain');
|
||||||
|
// 异常时使用默认域名
|
||||||
|
if (kr_baseDomains.isNotEmpty) {
|
||||||
|
kr_currentDomain = kr_baseDomains[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
final totalDuration = DateTime.now().difference(startTime).inMilliseconds;
|
||||||
|
KRLogUtil.kr_i('✅ 域名加载完成,耗时: ${totalDuration}ms,当前域名: $kr_currentDomain', tag: 'KRDomain');
|
||||||
|
}
|
||||||
|
|
||||||
|
/// 执行域名加载和验证
|
||||||
|
static Future<void> _executeLoadAndVerify() async {
|
||||||
// 加载域名列表
|
// 加载域名列表
|
||||||
String? savedDomains = await _storage.kr_readData(key: kr_domainsKey);
|
String? savedDomains = await _storage.kr_readData(key: kr_domainsKey);
|
||||||
if (savedDomains != null) {
|
if (savedDomains != null && savedDomains.isNotEmpty) {
|
||||||
kr_baseDomains = savedDomains.split(',');
|
kr_baseDomains = savedDomains.split(',').where((d) => d.isNotEmpty).toList();
|
||||||
|
KRLogUtil.kr_i('📋 从 Hive 加载的域名列表: $kr_baseDomains', tag: 'KRDomain');
|
||||||
|
} else {
|
||||||
|
KRLogUtil.kr_w('⚠️ Hive 中没有保存的域名列表,使用默认配置', tag: 'KRDomain');
|
||||||
}
|
}
|
||||||
|
|
||||||
// 加载当前域名
|
// 加载当前域名
|
||||||
String? savedDomain = await _storage.kr_readData(key: kr_domainKey);
|
String? savedDomain = await _storage.kr_readData(key: kr_domainKey);
|
||||||
if (savedDomain != null && kr_baseDomains.contains(savedDomain)) {
|
KRLogUtil.kr_i('📌 从 Hive 加载的当前域名: $savedDomain', tag: 'KRDomain');
|
||||||
kr_currentDomain = savedDomain;
|
|
||||||
|
if (savedDomain != null && savedDomain.isNotEmpty && kr_baseDomains.contains(savedDomain)) {
|
||||||
|
// 🔧 Android 15 关键修复:验证 Hive 缓存的域名是否仍然可用
|
||||||
|
KRLogUtil.kr_i('🔍 验证 Hive 缓存域名的可用性: $savedDomain', tag: 'KRDomain');
|
||||||
|
|
||||||
|
try {
|
||||||
|
// 快速验证(3 秒超时)
|
||||||
|
bool isAvailable = await kr_fastCheckDomainAvailability(savedDomain).timeout(
|
||||||
|
const Duration(seconds: 3),
|
||||||
|
onTimeout: () {
|
||||||
|
KRLogUtil.kr_w('⏱️ 域名验证超时(3秒),视为不可用', tag: 'KRDomain');
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
if (isAvailable) {
|
||||||
|
kr_currentDomain = savedDomain;
|
||||||
|
KRLogUtil.kr_i('✅ Hive 缓存域名验证通过,继续使用: $kr_currentDomain', tag: 'KRDomain');
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
KRLogUtil.kr_w('❌ Hive 缓存域名不可用: $savedDomain,需要切换', tag: 'KRDomain');
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
KRLogUtil.kr_e('❌ 域名验证异常: $e,需要切换', tag: 'KRDomain');
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if (savedDomain == null || savedDomain.isEmpty) {
|
||||||
|
KRLogUtil.kr_w('⚠️ Hive 中没有保存的当前域名', tag: 'KRDomain');
|
||||||
|
} else {
|
||||||
|
KRLogUtil.kr_w('⚠️ Hive 缓存的域名 $savedDomain 不在域名列表中', tag: 'KRDomain');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 🔧 Android 15 增强:Hive 域名验证失败,自动选择可用域名
|
||||||
|
KRLogUtil.kr_i('🔄 Hive 域名不可用,开始选择可用域名...', tag: 'KRDomain');
|
||||||
|
|
||||||
|
// 尝试从域名列表中找到可用的域名(每个最多 3 秒)
|
||||||
|
for (String domain in kr_baseDomains) {
|
||||||
|
try {
|
||||||
|
KRLogUtil.kr_i('🧪 测试域名: $domain', tag: 'KRDomain');
|
||||||
|
bool isAvailable = await kr_fastCheckDomainAvailability(domain).timeout(
|
||||||
|
const Duration(seconds: 3),
|
||||||
|
onTimeout: () {
|
||||||
|
KRLogUtil.kr_w('⏱️ 域名 $domain 验证超时(3秒)', tag: 'KRDomain');
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
if (isAvailable) {
|
||||||
|
kr_currentDomain = domain;
|
||||||
|
await kr_saveCurrentDomain();
|
||||||
|
KRLogUtil.kr_i('✅ 找到可用域名: $kr_currentDomain,已保存到 Hive', tag: 'KRDomain');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
KRLogUtil.kr_w('⚠️ 域名 $domain 验证异常: $e', tag: 'KRDomain');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 如果所有主域名都不可用,快速尝试备用域名(5秒总超时)
|
||||||
|
KRLogUtil.kr_w('⚠️ 所有主域名都不可用,尝试备用域名...', tag: 'KRDomain');
|
||||||
|
try {
|
||||||
|
String? backupDomain = await kr_tryLocalBackupDomains().timeout(
|
||||||
|
const Duration(seconds: 5),
|
||||||
|
onTimeout: () {
|
||||||
|
KRLogUtil.kr_w('⏱️ 备用域名获取超时', tag: 'KRDomain');
|
||||||
|
return null;
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
if (backupDomain != null) {
|
||||||
|
kr_currentDomain = backupDomain;
|
||||||
|
await kr_saveCurrentDomain();
|
||||||
|
KRLogUtil.kr_i('✅ 使用备用域名: $kr_currentDomain', tag: 'KRDomain');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
KRLogUtil.kr_w('⚠️ 备用域名获取异常: $e', tag: 'KRDomain');
|
||||||
|
}
|
||||||
|
|
||||||
|
// 最后的兜底:使用列表中的第一个域名(即使不可用)
|
||||||
|
if (kr_baseDomains.isNotEmpty) {
|
||||||
kr_currentDomain = kr_baseDomains[0];
|
kr_currentDomain = kr_baseDomains[0];
|
||||||
await kr_saveCurrentDomain();
|
await kr_saveCurrentDomain();
|
||||||
|
KRLogUtil.kr_w('⚠️ 无法验证任何域名,使用默认域名: $kr_currentDomain', tag: 'KRDomain');
|
||||||
|
} else {
|
||||||
|
KRLogUtil.kr_e('❌ 没有可用的域名配置!', tag: 'KRDomain');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1123,6 +1244,19 @@ class KRDomain {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class AppConfig {
|
class AppConfig {
|
||||||
|
/// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
|
/// 初始化日志收集开关
|
||||||
|
/// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
|
|
||||||
|
/// 🔧 全局开关:是否启用初始化日志收集
|
||||||
|
/// true:将所有初始化日志写入文件,方便问题诊断
|
||||||
|
/// false:关闭日志收集,减少 I/O 操作
|
||||||
|
///
|
||||||
|
/// 建议:
|
||||||
|
/// - 测试版本、Beta 版本:设置为 true
|
||||||
|
/// - 正式生产版本:根据需要设置为 false(或在遇到问题时临时开启)
|
||||||
|
static const bool enableInitLogCollection = false;
|
||||||
|
|
||||||
/// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
/// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
/// 加密密钥配置
|
/// 加密密钥配置
|
||||||
/// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
/// ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
@@ -1204,10 +1338,17 @@ class AppConfig {
|
|||||||
|
|
||||||
KRUpdateApplication? kr_update_application;
|
KRUpdateApplication? kr_update_application;
|
||||||
|
|
||||||
|
// 🔧 新增:日志收集器实例
|
||||||
|
final _initLog = KRInitLogCollector();
|
||||||
|
|
||||||
Future<void> initConfig({
|
Future<void> initConfig({
|
||||||
Future<void> Function()? onSuccess,
|
Future<void> Function()? onSuccess,
|
||||||
}) async {
|
}) async {
|
||||||
|
_initLog.logSeparator();
|
||||||
|
_initLog.log('🌐 开始应用配置初始化(域名加载)', tag: 'Domain');
|
||||||
|
|
||||||
if (_isInitializing) {
|
if (_isInitializing) {
|
||||||
|
_initLog.logWarning('配置初始化已在进行中,跳过重复调用', tag: 'Domain');
|
||||||
KRLogUtil.kr_w('配置初始化已在进行中,跳过重复调用', tag: 'AppConfig');
|
KRLogUtil.kr_w('配置初始化已在进行中,跳过重复调用', tag: 'AppConfig');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1215,10 +1356,13 @@ class AppConfig {
|
|||||||
_isInitializing = true;
|
_isInitializing = true;
|
||||||
try {
|
try {
|
||||||
// 🔧 修复6:启动时优先加载上次成功的域名
|
// 🔧 修复6:启动时优先加载上次成功的域名
|
||||||
|
_initLog.log('开始加载基础域名配置', tag: 'Domain');
|
||||||
await KRDomain.kr_loadBaseDomain();
|
await KRDomain.kr_loadBaseDomain();
|
||||||
|
_initLog.logSuccess('当前使用域名: ${KRDomain.kr_currentDomain}', tag: 'Domain');
|
||||||
KRLogUtil.kr_i('📍 当前使用域名: ${KRDomain.kr_currentDomain}', tag: 'AppConfig');
|
KRLogUtil.kr_i('📍 当前使用域名: ${KRDomain.kr_currentDomain}', tag: 'AppConfig');
|
||||||
|
|
||||||
// 所有模式都走正常的配置请求流程
|
// 所有模式都走正常的配置请求流程
|
||||||
|
_initLog.log('开始配置请求流程(包含重试机制)', tag: 'Domain');
|
||||||
KRLogUtil.kr_i('🚀 开始配置初始化', tag: 'AppConfig');
|
KRLogUtil.kr_i('🚀 开始配置初始化', tag: 'AppConfig');
|
||||||
await _startAutoRetry(onSuccess);
|
await _startAutoRetry(onSuccess);
|
||||||
} finally {
|
} finally {
|
||||||
@@ -1269,24 +1413,32 @@ class AppConfig {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_initLog.log('发起配置请求 API (尝试 $totalAttempts/$maxTotalAttempts)', tag: 'Domain');
|
||||||
final result = await _kr_userApi.kr_config();
|
final result = await _kr_userApi.kr_config();
|
||||||
result.fold(
|
result.fold(
|
||||||
(error) async {
|
(error) async {
|
||||||
|
_initLog.logError('配置请求失败 (重试 $currentRetryCount/$kr_maxRetryCount)', tag: 'Domain', error: error);
|
||||||
KRLogUtil.kr_e('配置初始化失败: $error', tag: 'AppConfig');
|
KRLogUtil.kr_e('配置初始化失败: $error', tag: 'AppConfig');
|
||||||
currentRetryCount++;
|
currentRetryCount++;
|
||||||
|
|
||||||
// 计算重试延迟时间
|
// 计算重试延迟时间
|
||||||
final retryDelay = (kr_retryInterval * pow(kr_backoffFactor, currentRetryCount)).toInt();
|
final retryDelay = (kr_retryInterval * pow(kr_backoffFactor, currentRetryCount)).toInt();
|
||||||
|
final actualDelay = max(retryDelay, 100);
|
||||||
|
_initLog.log('将在 ${actualDelay}ms 后重试', tag: 'Domain');
|
||||||
|
|
||||||
// 尝试切换域名
|
// 尝试切换域名
|
||||||
|
_initLog.log('尝试切换到下一个备用域名', tag: 'Domain');
|
||||||
await KRDomain.kr_switchToNextDomain();
|
await KRDomain.kr_switchToNextDomain();
|
||||||
|
_initLog.log('当前域名: ${KRDomain.kr_currentDomain}', tag: 'Domain');
|
||||||
|
|
||||||
// 等待后重试,至少延迟100ms避免立即重试
|
// 等待后重试
|
||||||
final actualDelay = max(retryDelay, 100);
|
|
||||||
await Future.delayed(Duration(milliseconds: actualDelay));
|
await Future.delayed(Duration(milliseconds: actualDelay));
|
||||||
await executeConfigRequest();
|
await executeConfigRequest();
|
||||||
},
|
},
|
||||||
(config) async {
|
(config) async {
|
||||||
|
_initLog.logSuccess('配置请求成功!', tag: 'Domain');
|
||||||
|
_initLog.log('网站ID: ${config.kr_website_id}', tag: 'Domain');
|
||||||
|
_initLog.log('官网: ${config.kr_official_website}', tag: 'Domain');
|
||||||
_retryTimer?.cancel();
|
_retryTimer?.cancel();
|
||||||
currentRetryCount = 0;
|
currentRetryCount = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import 'dart:convert';
|
|||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
import '../response/kr_node_list.dart';
|
import '../response/kr_node_list.dart';
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
|
|
||||||
/// 表示出站项的模型类
|
/// 表示出站项的模型类
|
||||||
class KROutboundItem {
|
class KROutboundItem {
|
||||||
@@ -50,14 +51,18 @@ class KROutboundItem {
|
|||||||
// 🔧 优先使用直接字段构建配置(新API格式)
|
// 🔧 优先使用直接字段构建配置(新API格式)
|
||||||
// 判断条件:如果有 port 和 serverAddr,说明是新格式
|
// 判断条件:如果有 port 和 serverAddr,说明是新格式
|
||||||
if (nodeListItem.port > 0 && nodeListItem.serverAddr.isNotEmpty) {
|
if (nodeListItem.port > 0 && nodeListItem.serverAddr.isNotEmpty) {
|
||||||
print('ℹ️ 节点 ${nodeListItem.name} 使用直接字段构建配置');
|
if (kDebugMode) {
|
||||||
|
print('ℹ️ 节点 ${nodeListItem.name} 使用直接字段构建配置');
|
||||||
|
}
|
||||||
_buildConfigFromFields(nodeListItem);
|
_buildConfigFromFields(nodeListItem);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 兜底:尝试解析 config 字段(旧API格式)
|
// 兜底:尝试解析 config 字段(旧API格式)
|
||||||
if (nodeListItem.config.isEmpty) {
|
if (nodeListItem.config.isEmpty) {
|
||||||
print('❌ 节点 ${nodeListItem.name} 缺少配置信息(无port或config)');
|
if (kDebugMode) {
|
||||||
|
print('❌ 节点 ${nodeListItem.name} 缺少配置信息(无port或config)');
|
||||||
|
}
|
||||||
config = {};
|
config = {};
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -66,8 +71,12 @@ class KROutboundItem {
|
|||||||
try {
|
try {
|
||||||
json = jsonDecode(nodeListItem.config) as Map<String, dynamic>;
|
json = jsonDecode(nodeListItem.config) as Map<String, dynamic>;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('❌ 节点 ${nodeListItem.name} 的 config 解析失败: $e,尝试使用直接字段');
|
if (kDebugMode) {
|
||||||
print('📄 Config 内容: ${nodeListItem.config}');
|
print('❌ 节点 ${nodeListItem.name} 的 config 解析失败: $e,尝试使用直接字段');
|
||||||
|
}
|
||||||
|
if (kDebugMode) {
|
||||||
|
print('📄 Config 内容: ${nodeListItem.config}');
|
||||||
|
}
|
||||||
_buildConfigFromFields(nodeListItem);
|
_buildConfigFromFields(nodeListItem);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -237,14 +246,30 @@ class KROutboundItem {
|
|||||||
|
|
||||||
/// 直接从节点字段构建配置(新API格式)
|
/// 直接从节点字段构建配置(新API格式)
|
||||||
void _buildConfigFromFields(KrNodeListItem nodeListItem) {
|
void _buildConfigFromFields(KrNodeListItem nodeListItem) {
|
||||||
print('🔧 开始构建节点配置 - 协议: ${nodeListItem.protocol}, 名称: ${nodeListItem.name}');
|
if (kDebugMode) {
|
||||||
print('📋 节点详细信息:');
|
print('🔧 开始构建节点配置 - 协议: ${nodeListItem.protocol}, 名称: ${nodeListItem.name}');
|
||||||
print(' - serverAddr: ${nodeListItem.serverAddr}');
|
}
|
||||||
print(' - port: ${nodeListItem.port}');
|
if (kDebugMode) {
|
||||||
print(' - uuid: ${nodeListItem.uuid}');
|
print('📋 节点详细信息:');
|
||||||
print(' - method: ${nodeListItem.method}');
|
}
|
||||||
print(' - config: ${nodeListItem.config}');
|
if (kDebugMode) {
|
||||||
print(' - protocols: ${nodeListItem.protocols}');
|
print(' - serverAddr: ${nodeListItem.serverAddr}');
|
||||||
|
}
|
||||||
|
if (kDebugMode) {
|
||||||
|
print(' - port: ${nodeListItem.port}');
|
||||||
|
}
|
||||||
|
if (kDebugMode) {
|
||||||
|
print(' - uuid: ${nodeListItem.uuid}');
|
||||||
|
}
|
||||||
|
if (kDebugMode) {
|
||||||
|
print(' - method: ${nodeListItem.method}');
|
||||||
|
}
|
||||||
|
if (kDebugMode) {
|
||||||
|
print(' - config: ${nodeListItem.config}');
|
||||||
|
}
|
||||||
|
if (kDebugMode) {
|
||||||
|
print(' - protocols: ${nodeListItem.protocols}');
|
||||||
|
}
|
||||||
|
|
||||||
// 🔧 尝试从 config 字段解析 transport 配置
|
// 🔧 尝试从 config 字段解析 transport 配置
|
||||||
Map<String, dynamic>? transportConfig;
|
Map<String, dynamic>? transportConfig;
|
||||||
@@ -254,7 +279,9 @@ class KROutboundItem {
|
|||||||
if (nodeListItem.protocols.isNotEmpty) {
|
if (nodeListItem.protocols.isNotEmpty) {
|
||||||
try {
|
try {
|
||||||
final protocolsList = jsonDecode(nodeListItem.protocols) as List;
|
final protocolsList = jsonDecode(nodeListItem.protocols) as List;
|
||||||
print('📄 解析到 protocols 数组,共 ${protocolsList.length} 个协议');
|
if (kDebugMode) {
|
||||||
|
print('📄 解析到 protocols 数组,共 ${protocolsList.length} 个协议');
|
||||||
|
}
|
||||||
|
|
||||||
// 查找匹配当前协议类型的配置
|
// 查找匹配当前协议类型的配置
|
||||||
Map<String, dynamic>? matchedProtocol;
|
Map<String, dynamic>? matchedProtocol;
|
||||||
@@ -263,14 +290,18 @@ class KROutboundItem {
|
|||||||
final type = protocolMap['type']?.toString().toLowerCase() ?? '';
|
final type = protocolMap['type']?.toString().toLowerCase() ?? '';
|
||||||
final enable = protocolMap['enable'] ?? true;
|
final enable = protocolMap['enable'] ?? true;
|
||||||
|
|
||||||
print(' 📋 协议: type=$type, enable=$enable');
|
if (kDebugMode) {
|
||||||
|
print(' 📋 协议: type=$type, enable=$enable');
|
||||||
|
}
|
||||||
|
|
||||||
// 匹配协议类型(注意 hysteria 和 hysteria2 都匹配 hysteria)
|
// 匹配协议类型(注意 hysteria 和 hysteria2 都匹配 hysteria)
|
||||||
if (type == nodeListItem.protocol.toLowerCase() ||
|
if (type == nodeListItem.protocol.toLowerCase() ||
|
||||||
(nodeListItem.protocol == 'hysteria' && type == 'hysteria2') ||
|
(nodeListItem.protocol == 'hysteria' && type == 'hysteria2') ||
|
||||||
(nodeListItem.protocol == 'hysteria2' && type == 'hysteria')) {
|
(nodeListItem.protocol == 'hysteria2' && type == 'hysteria')) {
|
||||||
matchedProtocol = protocolMap;
|
matchedProtocol = protocolMap;
|
||||||
print(' ✅ 找到匹配的协议配置: $type');
|
if (kDebugMode) {
|
||||||
|
print(' ✅ 找到匹配的协议配置: $type');
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -279,7 +310,9 @@ class KROutboundItem {
|
|||||||
// 提取 transport 配置
|
// 提取 transport 配置
|
||||||
if (matchedProtocol['network'] != null || matchedProtocol['transport'] != null) {
|
if (matchedProtocol['network'] != null || matchedProtocol['transport'] != null) {
|
||||||
final network = matchedProtocol['network'] ?? matchedProtocol['transport'];
|
final network = matchedProtocol['network'] ?? matchedProtocol['transport'];
|
||||||
print(' 📡 传输协议: $network');
|
if (kDebugMode) {
|
||||||
|
print(' 📡 传输协议: $network');
|
||||||
|
}
|
||||||
|
|
||||||
if (network == 'ws' || network == 'websocket') {
|
if (network == 'ws' || network == 'websocket') {
|
||||||
transportConfig = {
|
transportConfig = {
|
||||||
@@ -290,20 +323,26 @@ class KROutboundItem {
|
|||||||
if (host != null && host.toString().isNotEmpty) {
|
if (host != null && host.toString().isNotEmpty) {
|
||||||
transportConfig['headers'] = {'Host': host.toString()};
|
transportConfig['headers'] = {'Host': host.toString()};
|
||||||
}
|
}
|
||||||
print(' ✅ WebSocket transport: $transportConfig');
|
if (kDebugMode) {
|
||||||
|
print(' ✅ WebSocket transport: $transportConfig');
|
||||||
|
}
|
||||||
} else if (network == 'grpc') {
|
} else if (network == 'grpc') {
|
||||||
transportConfig = {
|
transportConfig = {
|
||||||
'type': 'grpc',
|
'type': 'grpc',
|
||||||
'service_name': matchedProtocol['grpc_service_name'] ?? matchedProtocol['service_name'] ?? '',
|
'service_name': matchedProtocol['grpc_service_name'] ?? matchedProtocol['service_name'] ?? '',
|
||||||
};
|
};
|
||||||
print(' ✅ gRPC transport: $transportConfig');
|
if (kDebugMode) {
|
||||||
|
print(' ✅ gRPC transport: $transportConfig');
|
||||||
|
}
|
||||||
} else if (network == 'http' || network == 'h2') {
|
} else if (network == 'http' || network == 'h2') {
|
||||||
transportConfig = {
|
transportConfig = {
|
||||||
'type': 'http',
|
'type': 'http',
|
||||||
'host': [matchedProtocol['http_host'] ?? matchedProtocol['host'] ?? ''],
|
'host': [matchedProtocol['http_host'] ?? matchedProtocol['host'] ?? ''],
|
||||||
'path': matchedProtocol['http_path'] ?? matchedProtocol['path'] ?? '/',
|
'path': matchedProtocol['http_path'] ?? matchedProtocol['path'] ?? '/',
|
||||||
};
|
};
|
||||||
print(' ✅ HTTP transport: $transportConfig');
|
if (kDebugMode) {
|
||||||
|
print(' ✅ HTTP transport: $transportConfig');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -319,11 +358,15 @@ class KROutboundItem {
|
|||||||
'allow_insecure': matchedProtocol['allow_insecure'] ?? matchedProtocol['insecure'] ?? true,
|
'allow_insecure': matchedProtocol['allow_insecure'] ?? matchedProtocol['insecure'] ?? true,
|
||||||
'fingerprint': matchedProtocol['fingerprint'] ?? 'chrome',
|
'fingerprint': matchedProtocol['fingerprint'] ?? 'chrome',
|
||||||
};
|
};
|
||||||
print(' ✅ Security config: security=$security, tls_enabled=$tlsEnabled, config=$securityConfig');
|
if (kDebugMode) {
|
||||||
|
print(' ✅ Security config: security=$security, tls_enabled=$tlsEnabled, config=$securityConfig');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('⚠️ 解析 protocols 字段失败: $e');
|
if (kDebugMode) {
|
||||||
|
print('⚠️ 解析 protocols 字段失败: $e');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -331,21 +374,29 @@ class KROutboundItem {
|
|||||||
if (transportConfig == null && nodeListItem.config.isNotEmpty) {
|
if (transportConfig == null && nodeListItem.config.isNotEmpty) {
|
||||||
try {
|
try {
|
||||||
final configJson = jsonDecode(nodeListItem.config) as Map<String, dynamic>;
|
final configJson = jsonDecode(nodeListItem.config) as Map<String, dynamic>;
|
||||||
print('📄 解析到 config JSON: $configJson');
|
if (kDebugMode) {
|
||||||
|
print('📄 解析到 config JSON: $configJson');
|
||||||
|
}
|
||||||
|
|
||||||
// 提取 transport 配置
|
// 提取 transport 配置
|
||||||
if (configJson['transport'] != null && configJson['transport'] != 'tcp') {
|
if (configJson['transport'] != null && configJson['transport'] != 'tcp') {
|
||||||
transportConfig = _buildTransport(configJson);
|
transportConfig = _buildTransport(configJson);
|
||||||
print('✅ 从 config 找到 transport 配置: $transportConfig');
|
if (kDebugMode) {
|
||||||
|
print('✅ 从 config 找到 transport 配置: $transportConfig');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 提取 security_config
|
// 提取 security_config
|
||||||
if (configJson['security_config'] != null) {
|
if (configJson['security_config'] != null) {
|
||||||
securityConfig = configJson['security_config'] as Map<String, dynamic>;
|
securityConfig = configJson['security_config'] as Map<String, dynamic>;
|
||||||
print('✅ 从 config 找到 security_config: $securityConfig');
|
if (kDebugMode) {
|
||||||
|
print('✅ 从 config 找到 security_config: $securityConfig');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('⚠️ 解析 config 字段失败: $e');
|
if (kDebugMode) {
|
||||||
|
print('⚠️ 解析 config 字段失败: $e');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -364,9 +415,15 @@ class KROutboundItem {
|
|||||||
"method": finalMethod,
|
"method": finalMethod,
|
||||||
"password": nodeListItem.uuid
|
"password": nodeListItem.uuid
|
||||||
};
|
};
|
||||||
print('✅ Shadowsocks 节点配置构建成功: ${nodeListItem.name}');
|
if (kDebugMode) {
|
||||||
print('📄 使用加密方法: $finalMethod');
|
print('✅ Shadowsocks 节点配置构建成功: ${nodeListItem.name}');
|
||||||
print('📄 完整配置: $config');
|
}
|
||||||
|
if (kDebugMode) {
|
||||||
|
print('📄 使用加密方法: $finalMethod');
|
||||||
|
}
|
||||||
|
if (kDebugMode) {
|
||||||
|
print('📄 完整配置: $config');
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case "vless":
|
case "vless":
|
||||||
// 判断是否为域名(非IP地址)
|
// 判断是否为域名(非IP地址)
|
||||||
@@ -381,7 +438,9 @@ class KROutboundItem {
|
|||||||
|
|
||||||
// 🔧 关键修复:根据 security_config 判断是否启用 TLS
|
// 🔧 关键修复:根据 security_config 判断是否启用 TLS
|
||||||
final bool vlessTlsEnabled = securityConfig?['tls_enabled'] ?? false;
|
final bool vlessTlsEnabled = securityConfig?['tls_enabled'] ?? false;
|
||||||
print('🔐 VLESS TLS 状态: enabled=$vlessTlsEnabled');
|
if (kDebugMode) {
|
||||||
|
print('🔐 VLESS TLS 状态: enabled=$vlessTlsEnabled');
|
||||||
|
}
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
"type": "vless",
|
"type": "vless",
|
||||||
@@ -400,8 +459,12 @@ class KROutboundItem {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
print('✅ VLESS 节点配置构建成功: ${nodeListItem.name}');
|
if (kDebugMode) {
|
||||||
print('📄 完整配置: $config');
|
print('✅ VLESS 节点配置构建成功: ${nodeListItem.name}');
|
||||||
|
}
|
||||||
|
if (kDebugMode) {
|
||||||
|
print('📄 完整配置: $config');
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case "vmess":
|
case "vmess":
|
||||||
// 判断是否为域名(非IP地址)
|
// 判断是否为域名(非IP地址)
|
||||||
@@ -416,7 +479,9 @@ class KROutboundItem {
|
|||||||
|
|
||||||
// 🔧 关键修复:根据 security_config 判断是否启用 TLS
|
// 🔧 关键修复:根据 security_config 判断是否启用 TLS
|
||||||
final bool tlsEnabled = securityConfig?['tls_enabled'] ?? false;
|
final bool tlsEnabled = securityConfig?['tls_enabled'] ?? false;
|
||||||
print('🔐 TLS 状态: enabled=$tlsEnabled');
|
if (kDebugMode) {
|
||||||
|
print('🔐 TLS 状态: enabled=$tlsEnabled');
|
||||||
|
}
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
"type": "vmess",
|
"type": "vmess",
|
||||||
@@ -437,8 +502,12 @@ class KROutboundItem {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
print('✅ VMess 节点配置构建成功: ${nodeListItem.name}');
|
if (kDebugMode) {
|
||||||
print('📄 完整配置: $config');
|
print('✅ VMess 节点配置构建成功: ${nodeListItem.name}');
|
||||||
|
}
|
||||||
|
if (kDebugMode) {
|
||||||
|
print('📄 完整配置: $config');
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case "trojan":
|
case "trojan":
|
||||||
// 判断是否为域名(非IP地址)
|
// 判断是否为域名(非IP地址)
|
||||||
@@ -468,16 +537,28 @@ class KROutboundItem {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
print('✅ Trojan 节点配置构建成功: ${nodeListItem.name}');
|
if (kDebugMode) {
|
||||||
print('📄 完整配置: $config');
|
print('✅ Trojan 节点配置构建成功: ${nodeListItem.name}');
|
||||||
|
}
|
||||||
|
if (kDebugMode) {
|
||||||
|
print('📄 完整配置: $config');
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case "hysteria":
|
case "hysteria":
|
||||||
case "hysteria2":
|
case "hysteria2":
|
||||||
// 后端的 "hysteria" 实际上是 Hysteria2 协议
|
// 后端的 "hysteria" 实际上是 Hysteria2 协议
|
||||||
print('🔍 构建 Hysteria2 节点: ${nodeListItem.name}');
|
if (kDebugMode) {
|
||||||
print(' - serverAddr: ${nodeListItem.serverAddr}');
|
print('🔍 构建 Hysteria2 节点: ${nodeListItem.name}');
|
||||||
print(' - port: ${nodeListItem.port}');
|
}
|
||||||
print(' - uuid: ${nodeListItem.uuid}');
|
if (kDebugMode) {
|
||||||
|
print(' - serverAddr: ${nodeListItem.serverAddr}');
|
||||||
|
}
|
||||||
|
if (kDebugMode) {
|
||||||
|
print(' - port: ${nodeListItem.port}');
|
||||||
|
}
|
||||||
|
if (kDebugMode) {
|
||||||
|
print(' - uuid: ${nodeListItem.uuid}');
|
||||||
|
}
|
||||||
|
|
||||||
//判断是否为域名
|
//判断是否为域名
|
||||||
final bool isDomain = !RegExp(r'^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$')
|
final bool isDomain = !RegExp(r'^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$')
|
||||||
@@ -494,11 +575,17 @@ class KROutboundItem {
|
|||||||
if (isDomain) "server_name": nodeListItem.serverAddr,
|
if (isDomain) "server_name": nodeListItem.serverAddr,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
print('✅ Hysteria2 节点配置构建成功');
|
if (kDebugMode) {
|
||||||
print('📄 完整配置: ${jsonEncode(config)}');
|
print('✅ Hysteria2 节点配置构建成功');
|
||||||
|
}
|
||||||
|
if (kDebugMode) {
|
||||||
|
print('📄 完整配置: ${jsonEncode(config)}');
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
print('⚠️ 不支持的协议类型: ${nodeListItem.protocol}');
|
if (kDebugMode) {
|
||||||
|
print('⚠️ 不支持的协议类型: ${nodeListItem.protocol}');
|
||||||
|
}
|
||||||
config = {};
|
config = {};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import 'kr_group_outbound_list.dart';
|
|||||||
|
|
||||||
import '../response/kr_node_list.dart';
|
import '../response/kr_node_list.dart';
|
||||||
import 'kr_outbound_item.dart';
|
import 'kr_outbound_item.dart';
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
|
|
||||||
/// 表示出站项列表的模型类
|
/// 表示出站项列表的模型类
|
||||||
class KrOutboundsList {
|
class KrOutboundsList {
|
||||||
@@ -47,14 +48,24 @@ class KrOutboundsList {
|
|||||||
final KROutboundItem item = KROutboundItem(element);
|
final KROutboundItem item = KROutboundItem(element);
|
||||||
|
|
||||||
// 🔍 调试日志:验证 country 字段传递
|
// 🔍 调试日志:验证 country 字段传递
|
||||||
print('🗺️ 构建节点: name="${element.name}", tag="${item.tag}", country="${item.country}"');
|
if (kDebugMode) {
|
||||||
print(' - element.country: "${element.country}"');
|
print('🗺️ 构建节点: name="${element.name}", tag="${item.tag}", country="${item.country}"');
|
||||||
print(' - item.country: "${item.country}"');
|
}
|
||||||
print(' - country.isEmpty: ${item.country.isEmpty}');
|
if (kDebugMode) {
|
||||||
|
print(' - element.country: "${element.country}"');
|
||||||
|
}
|
||||||
|
if (kDebugMode) {
|
||||||
|
print(' - item.country: "${item.country}"');
|
||||||
|
}
|
||||||
|
if (kDebugMode) {
|
||||||
|
print(' - country.isEmpty: ${item.country.isEmpty}');
|
||||||
|
}
|
||||||
|
|
||||||
// 检查节点配置是否有效(必须包含 type 字段)
|
// 检查节点配置是否有效(必须包含 type 字段)
|
||||||
if (item.config.isEmpty || !item.config.containsKey('type')) {
|
if (item.config.isEmpty || !item.config.containsKey('type')) {
|
||||||
print('⚠️ 跳过无效节点: ${element.name},配置为空或缺少 type 字段');
|
if (kDebugMode) {
|
||||||
|
print('⚠️ 跳过无效节点: ${element.name},配置为空或缺少 type 字段');
|
||||||
|
}
|
||||||
continue; // 跳过无效节点
|
continue; // 跳过无效节点
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -72,7 +83,9 @@ class KrOutboundsList {
|
|||||||
|
|
||||||
configJsonList.add(item.config);
|
configJsonList.add(item.config);
|
||||||
keyList[item.tag] = item;
|
keyList[item.tag] = item;
|
||||||
print('✅ keyList["${item.tag}"] 已设置,country="${item.country}"');
|
if (kDebugMode) {
|
||||||
|
print('✅ keyList["${item.tag}"] 已设置,country="${item.country}"');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 将标签分组转换为 KRGroupOutboundList 并添加到 groupOutboundList
|
// 将标签分组转换为 KRGroupOutboundList 并添加到 groupOutboundList
|
||||||
|
|||||||
@@ -25,67 +25,20 @@ class HINodeListController extends GetxController {
|
|||||||
|
|
||||||
/// 更新连接类型
|
/// 更新连接类型
|
||||||
void kr_updateConnectionType(KRConnectionType type) {
|
void kr_updateConnectionType(KRConnectionType type) {
|
||||||
KRSingBoxImp.instance.kr_updateConnectionType(type);
|
if (KRSingBoxImp().kr_connectionType.value != type) {
|
||||||
KRLogUtil.kr_i('连接类型已更新为: $type', tag: 'HINodeListController');
|
KRSingBoxImp.instance.kr_updateConnectionType(type);
|
||||||
|
KRLogUtil.kr_i('连接类型已更新为: $type', tag: 'HINodeListController');
|
||||||
|
// 这里可以添加其他需要的逻辑
|
||||||
|
}
|
||||||
|
|
||||||
// 如果当前有选择的国家,触发重选检查
|
// 如果当前有选择的国家,触发重选检查
|
||||||
if (homeController.currentSelectedCountry.isNotEmpty) {
|
if (homeController.currentSelectedCountry.isNotEmpty) {
|
||||||
KRLogUtil.kr_i('连接类型更新后,检查是否需要重选节点', tag: 'HINodeListController');
|
KRLogUtil.kr_i('连接类型更新后,检查是否需要重选节点', tag: 'HINodeListController');
|
||||||
// 延迟一下让连接类型更新完成
|
// 延迟一下让连接类型更新完成
|
||||||
Future.delayed(const Duration(milliseconds: 500), () {
|
Future.delayed(const Duration(milliseconds: 500), () {
|
||||||
homeController.checkCountryReselection(KRSingBoxImp.instance.kr_activeGroups);
|
// homeController.checkCountryReselection(KRSingBoxImp.instance.kr_activeGroups);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 获取当前国家内的有效节点标签列表
|
|
||||||
List<String> getValidNodesInCurrentCountry() {
|
|
||||||
final country = homeController.currentSelectedCountry.value;
|
|
||||||
if (country.isEmpty) {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
|
|
||||||
final countryGroup = kr_subscribeService.countryOutboundList
|
|
||||||
.firstWhereOrNull((group) => group.country == country);
|
|
||||||
|
|
||||||
if (countryGroup == null) {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
|
|
||||||
return countryGroup.outboundList
|
|
||||||
.where((node) => node.urlTestDelay.value < 65535 && node.urlTestDelay.value > 0)
|
|
||||||
.map((node) => node.tag)
|
|
||||||
.toList();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 手动触发当前国家内的重选
|
|
||||||
void manualReselection() {
|
|
||||||
final country = homeController.currentSelectedCountry.value;
|
|
||||||
if (country.isEmpty) {
|
|
||||||
KRLogUtil.kr_w('没有选择国家,无法进行重选', tag: 'HINodeListController');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
KRLogUtil.kr_i('用户手动触发国家内重选', tag: 'HINodeListController');
|
|
||||||
homeController.performCountryReselection(country);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 获取当前国家内节点的延迟统计(委托给homeController)
|
|
||||||
Map<String, dynamic> getCurrentCountryLatencyStats() {
|
|
||||||
return homeController.getCurrentCountryNodeStats();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 启用/禁用动态重选功能(委托给homeController)
|
|
||||||
void setDynamicReselectionEnabled(bool enabled) {
|
|
||||||
homeController.setCountryReselectionEnabled(enabled);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// 获取动态重选状态信息
|
|
||||||
Map<String, dynamic> getDynamicReselectionStatus() {
|
|
||||||
return {
|
|
||||||
'enabled': homeController.isCountryReselectionEnabled.value,
|
|
||||||
'currentCountry': homeController.currentSelectedCountry.value,
|
|
||||||
'latencyThreshold': homeController.countryReselectionLatencyThreshold,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,32 +29,36 @@ class HINodeListView extends GetView<HINodeListController> {
|
|||||||
|
|
||||||
/// 获取用于显示的延迟值
|
/// 获取用于显示的延迟值
|
||||||
int _getDisplayDelay(HINodeListController controller, KROutboundItem item) {
|
int _getDisplayDelay(HINodeListController controller, KROutboundItem item) {
|
||||||
if (controller.homeController.kr_isConnected.value) {
|
return item.urlTestDelay.value;
|
||||||
return item.urlTestDelay.value;
|
// if (controller.homeController.kr_isConnected.value) {
|
||||||
}
|
//
|
||||||
if (!_fakeDelays.containsKey(item.tag)) {
|
// }
|
||||||
final random = Random();
|
// if (!_fakeDelays.containsKey(item.tag)) {
|
||||||
_fakeDelays[item.tag] = 30 + random.nextInt(71); // 30-100ms
|
// final random = Random();
|
||||||
}
|
// _fakeDelays[item.tag] = 30 + random.nextInt(71); // 30-100ms
|
||||||
return _fakeDelays[item.tag] ?? 0;
|
// }
|
||||||
|
// return _fakeDelays[item.tag] ?? 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 获取分组内最快节点的延迟值(单位:ms)
|
/// 获取分组内最快节点的延迟值(单位:ms)
|
||||||
/// 如果列表为空,返回 0
|
/// 如果列表为空,返回 0
|
||||||
int getFastestNodeDelay(
|
int getFastestNodeDelay(
|
||||||
HINodeListController controller, List<KROutboundItem> outboundList) {
|
HINodeListController controller,
|
||||||
|
List<KROutboundItem> outboundList,
|
||||||
|
) {
|
||||||
if (outboundList.isEmpty) return 0;
|
if (outboundList.isEmpty) return 0;
|
||||||
|
|
||||||
int fastestDelay = _getDisplayDelay(controller, outboundList.first);
|
// 过滤掉不可用节点(延迟标记为 65535 或负数)
|
||||||
|
final validNodes = outboundList.where((node) {
|
||||||
|
final delay = node.urlTestDelay.value;
|
||||||
|
return delay > 0 && delay < 65535;
|
||||||
|
}).toList();
|
||||||
|
|
||||||
for (final item in outboundList.skip(1)) {
|
if (validNodes.isEmpty) return 0;
|
||||||
final delay = _getDisplayDelay(controller, item);
|
|
||||||
if (delay < fastestDelay) {
|
|
||||||
fastestDelay = delay;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return fastestDelay;
|
// 返回最小延迟值
|
||||||
|
validNodes.sort((a, b) => a.urlTestDelay.value.compareTo(b.urlTestDelay.value));
|
||||||
|
return validNodes.first.urlTestDelay.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 找出延迟最低(最快)的节点对象
|
/// 找出延迟最低(最快)的节点对象
|
||||||
@@ -109,11 +113,19 @@ class HINodeListView extends GetView<HINodeListController> {
|
|||||||
_buildEmptyListPlaceholder(context, AppTranslations.kr_home.noRegions)
|
_buildEmptyListPlaceholder(context, AppTranslations.kr_home.noRegions)
|
||||||
else ...[
|
else ...[
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () {
|
// 🔧 修复:改为 async,等待节点切换完成后再关闭列表
|
||||||
controller.homeController.kr_selectNode('auto');
|
onTap: () async {
|
||||||
controller.homeController.kr_currentListStatus.value =
|
try {
|
||||||
KRHomeViewsListStatus.kr_none;
|
final success =
|
||||||
controller.homeController.kr_coutryText.value = 'auto';
|
await controller.homeController.kr_performNodeSwitch('auto');
|
||||||
|
if (success) {
|
||||||
|
controller.homeController.kr_currentListStatus.value =
|
||||||
|
KRHomeViewsListStatus.kr_none;
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
KRLogUtil.kr_e('Auto选项切换异常: $e',
|
||||||
|
tag: 'NodeListView');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
@@ -189,14 +201,7 @@ class HINodeListView extends GetView<HINodeListController> {
|
|||||||
return InkWell(
|
return InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
// 自动选择这个国家下的节点延迟中最快的
|
// 自动选择这个国家下的节点延迟中最快的
|
||||||
final item = findFastestNode(country.outboundList);
|
controller.homeController.onCountrySelected(country.country);
|
||||||
KRLogUtil.kr_i(item.tag);
|
|
||||||
print('item${item.toString()}');
|
|
||||||
controller.homeController.kr_selectNode(item.tag);
|
|
||||||
controller.homeController.kr_currentListStatus.value =
|
|
||||||
KRHomeViewsListStatus.kr_none;
|
|
||||||
controller.homeController.kr_coutryText.value = country.country;
|
|
||||||
|
|
||||||
},
|
},
|
||||||
child: _kr_buildCountryListItem(context, country: country),
|
child: _kr_buildCountryListItem(context, country: country),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import 'package:kaer_with_panels/app/services/kr_site_config_service.dart';
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import '../../../services/kr_device_info_service.dart';
|
import '../../../services/kr_device_info_service.dart';
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
|
|
||||||
/// Crisp 聊天控制器
|
/// Crisp 聊天控制器
|
||||||
class KRCrispController extends GetxController {
|
class KRCrispController extends GetxController {
|
||||||
@@ -47,7 +48,9 @@ class KRCrispController extends GetxController {
|
|||||||
kr_isInitialized.value = true;
|
kr_isInitialized.value = true;
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('初始化 Crisp 时出错: $e');
|
if (kDebugMode) {
|
||||||
|
print('初始化 Crisp 时出错: $e');
|
||||||
|
}
|
||||||
if (!_kr_isDisposed) {
|
if (!_kr_isDisposed) {
|
||||||
kr_isInitialized.value = false;
|
kr_isInitialized.value = false;
|
||||||
}
|
}
|
||||||
@@ -125,9 +128,13 @@ class KRCrispController extends GetxController {
|
|||||||
'device_id': deviceId,
|
'device_id': deviceId,
|
||||||
});
|
});
|
||||||
|
|
||||||
print('Crisp 初始化完成');
|
if (kDebugMode) {
|
||||||
|
print('Crisp 初始化完成');
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('初始化 Crisp 时出错: $e');
|
if (kDebugMode) {
|
||||||
|
print('初始化 Crisp 时出错: $e');
|
||||||
|
}
|
||||||
crispController = null;
|
crispController = null;
|
||||||
rethrow;
|
rethrow;
|
||||||
}
|
}
|
||||||
@@ -155,7 +162,9 @@ class KRCrispController extends GetxController {
|
|||||||
kr_isLoading.value = false;
|
kr_isLoading.value = false;
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('清理 Crisp 资源时出错: $e');
|
if (kDebugMode) {
|
||||||
|
print('清理 Crisp 资源时出错: $e');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class KRDeleteAccountController extends GetxController {
|
|||||||
Future<void> kr_sendCode() async {
|
Future<void> kr_sendCode() async {
|
||||||
final account = KRAppRunData.getInstance().kr_account.value;
|
final account = KRAppRunData.getInstance().kr_account.value;
|
||||||
if (account == null || account.isEmpty) {
|
if (account == null || account.isEmpty) {
|
||||||
KRCommonUtil.kr_showToast('账号不能为空');
|
KRCommonUtil.kr_showToast('account.accountRequired'.tr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -98,7 +98,7 @@ class KRDeleteAccountController extends GetxController {
|
|||||||
KRCommonUtil.kr_showToast(error.msg);
|
KRCommonUtil.kr_showToast(error.msg);
|
||||||
},
|
},
|
||||||
(success) {
|
(success) {
|
||||||
KRCommonUtil.kr_showToast('删除账号成功');
|
KRCommonUtil.kr_showToast('account.deleteSuccess'.tr);
|
||||||
KRAppRunData.getInstance().kr_loginOut();
|
KRAppRunData.getInstance().kr_loginOut();
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ class KRDeviceManagementView extends GetView<KRDeviceManagementController> {
|
|||||||
size: 64.w,
|
size: 64.w,
|
||||||
color: Theme.of(context).textTheme.bodySmall?.color,
|
color: Theme.of(context).textTheme.bodySmall?.color,
|
||||||
),
|
),
|
||||||
SizedBox(height: 16.w),
|
SizedBox(height: 16.h),
|
||||||
Text(
|
Text(
|
||||||
'暂无登录设备',
|
'暂无登录设备',
|
||||||
style: KrAppTextStyle(
|
style: KrAppTextStyle(
|
||||||
@@ -172,7 +172,7 @@ class KRDeviceManagementView extends GetView<KRDeviceManagementController> {
|
|||||||
Container(
|
Container(
|
||||||
padding: EdgeInsets.symmetric(
|
padding: EdgeInsets.symmetric(
|
||||||
horizontal: 8.w,
|
horizontal: 8.w,
|
||||||
vertical: 2.w,
|
vertical: 2.h,
|
||||||
),
|
),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.green.withOpacity(0.1),
|
color: Colors.green.withOpacity(0.1),
|
||||||
@@ -189,7 +189,7 @@ class KRDeviceManagementView extends GetView<KRDeviceManagementController> {
|
|||||||
],
|
],
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 4.w),
|
SizedBox(height: 4.h),
|
||||||
Text(
|
Text(
|
||||||
'ID: ${identifier.substring(0, identifier.length > 12 ? 12 : identifier.length)}...',
|
'ID: ${identifier.substring(0, identifier.length > 12 ? 12 : identifier.length)}...',
|
||||||
style: KrAppTextStyle(
|
style: KrAppTextStyle(
|
||||||
@@ -205,7 +205,7 @@ class KRDeviceManagementView extends GetView<KRDeviceManagementController> {
|
|||||||
onPressed: () => controller.deleteDevice(id),
|
onPressed: () => controller.deleteDevice(id),
|
||||||
style: TextButton.styleFrom(
|
style: TextButton.styleFrom(
|
||||||
foregroundColor: Theme.of(context).colorScheme.error,
|
foregroundColor: Theme.of(context).colorScheme.error,
|
||||||
padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 8.w),
|
padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 8.h),
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
'删除',
|
'删除',
|
||||||
@@ -219,9 +219,9 @@ class KRDeviceManagementView extends GetView<KRDeviceManagementController> {
|
|||||||
),
|
),
|
||||||
// 分隔线
|
// 分隔线
|
||||||
if (ip.isNotEmpty || lastLogin.isNotEmpty) ...[
|
if (ip.isNotEmpty || lastLogin.isNotEmpty) ...[
|
||||||
SizedBox(height: 12.w),
|
SizedBox(height: 12.h),
|
||||||
Divider(height: 1, color: Theme.of(context).dividerColor),
|
Divider(height: 1, color: Theme.of(context).dividerColor),
|
||||||
SizedBox(height: 12.w),
|
SizedBox(height: 12.h),
|
||||||
],
|
],
|
||||||
// 详细信息
|
// 详细信息
|
||||||
if (ip.isNotEmpty)
|
if (ip.isNotEmpty)
|
||||||
@@ -230,7 +230,7 @@ class KRDeviceManagementView extends GetView<KRDeviceManagementController> {
|
|||||||
'IP地址',
|
'IP地址',
|
||||||
ip,
|
ip,
|
||||||
),
|
),
|
||||||
if (ip.isNotEmpty && lastLogin.isNotEmpty) SizedBox(height: 8.w),
|
if (ip.isNotEmpty && lastLogin.isNotEmpty) SizedBox(height: 8.h),
|
||||||
if (lastLogin.isNotEmpty)
|
if (lastLogin.isNotEmpty)
|
||||||
_buildInfoRow(
|
_buildInfoRow(
|
||||||
context,
|
context,
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ import 'package:kaer_with_panels/app/widgets/kr_local_image.dart';
|
|||||||
import 'package:kaer_with_panels/app/widgets/dialogs/hi_dialog.dart';
|
import 'package:kaer_with_panels/app/widgets/dialogs/hi_dialog.dart';
|
||||||
import 'package:kaer_with_panels/app/widgets/kr_app_text_style.dart';
|
import 'package:kaer_with_panels/app/widgets/kr_app_text_style.dart';
|
||||||
import 'package:kaer_with_panels/app/services/global_overlay_service.dart';
|
import 'package:kaer_with_panels/app/services/global_overlay_service.dart';
|
||||||
|
import 'package:kaer_with_panels/app/services/singbox_imp/kr_sing_box_imp.dart';
|
||||||
|
import 'package:kaer_with_panels/singbox/model/singbox_status.dart';
|
||||||
|
|
||||||
/// ✅ 按钮组件(带多层呼吸同心圆动画)
|
/// ✅ 按钮组件(带多层呼吸同心圆动画)
|
||||||
class HIAnimatedConnectButton extends GetView<KRHomeController> {
|
class HIAnimatedConnectButton extends GetView<KRHomeController> {
|
||||||
@@ -20,9 +22,18 @@ class HIAnimatedConnectButton extends GetView<KRHomeController> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Obx(() {
|
return Obx(() {
|
||||||
final isConnected = controller.kr_isConnected.value;
|
|
||||||
final delay = controller.kr_currentNodeLatency.value;
|
final delay = controller.kr_currentNodeLatency.value;
|
||||||
print('当前连接情况$delay----$isConnected');
|
|
||||||
|
// 🔧 关键: 强制读取两个 observable 确保追踪
|
||||||
|
final _ = KRSingBoxImp.instance.kr_status.value; // 强制追踪
|
||||||
|
final isConnected = controller.kr_isConnected.value; // 使用 controller 的状态
|
||||||
|
|
||||||
|
// 再次读取状态用于判断
|
||||||
|
final status = KRSingBoxImp.instance.kr_status.value;
|
||||||
|
final isSwitching = status is SingboxStarting || status is SingboxStopping;
|
||||||
|
|
||||||
|
print('🔵 Switch UI 更新: status=${status.runtimeType}, isConnected=$isConnected, isSwitching=$isSwitching');
|
||||||
|
|
||||||
final isShow = isConnected; // delay == -1 || isConnected;
|
final isShow = isConnected; // delay == -1 || isConnected;
|
||||||
|
|
||||||
final Color buttonColor = Theme.of(context).primaryColor;
|
final Color buttonColor = Theme.of(context).primaryColor;
|
||||||
@@ -71,6 +82,10 @@ class HIAnimatedConnectButton extends GetView<KRHomeController> {
|
|||||||
clipBehavior: Clip.antiAlias,
|
clipBehavior: Clip.antiAlias,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
if(isSwitching) {
|
||||||
|
print('🔵 Switch UI 正在更新,切换中点击了按钮: status=${status.runtimeType}, isConnected=$isConnected, isSwitching=$isSwitching');
|
||||||
|
return;
|
||||||
|
}
|
||||||
final hasValidSubscription =
|
final hasValidSubscription =
|
||||||
controller.kr_subscribeService.kr_availableSubscribes.isNotEmpty;
|
controller.kr_subscribeService.kr_availableSubscribes.isNotEmpty;
|
||||||
if (hasValidSubscription) {
|
if (hasValidSubscription) {
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
||||||
import '../../../localization/app_translations.dart';
|
import '../../../localization/app_translations.dart';
|
||||||
import '../../../widgets/kr_app_text_style.dart';
|
import '../../../widgets/kr_app_text_style.dart';
|
||||||
import '../../../widgets/kr_loading_animation.dart';
|
import '../../../widgets/kr_loading_animation.dart';
|
||||||
@@ -50,81 +49,93 @@ class KRHomeBottomPanel extends GetView<KRHomeController> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget _kr_buildDefaultView(BuildContext context) {
|
Widget _kr_buildDefaultView(BuildContext context) {
|
||||||
// 使用 GetX 的 .obs 变量来避免重复访问
|
// 🔧 Android 15 增强:增加防御性检查,避免空指针
|
||||||
final hasValidSubscription =
|
bool hasValidSubscription = false;
|
||||||
controller.kr_subscribeService.kr_currentSubscribe.value != null;
|
bool isTrial = false;
|
||||||
final isTrial = controller.kr_subscribeService.kr_isTrial;
|
bool isLastDay = false;
|
||||||
final isLastDay = controller.kr_subscribeService.kr_isLastDayOfSubscription;
|
|
||||||
|
try {
|
||||||
|
hasValidSubscription = controller.kr_subscribeService.kr_currentSubscribe.value != null;
|
||||||
|
isTrial = controller.kr_subscribeService.kr_isTrial.value;
|
||||||
|
isLastDay = controller.kr_subscribeService.kr_isLastDayOfSubscription.value;
|
||||||
|
} catch (e) {
|
||||||
|
KRLogUtil.kr_e('获取订阅数据异常: $e', tag: 'HomeBottomPanel');
|
||||||
|
}
|
||||||
|
|
||||||
final isNotLoggedIn = controller.kr_currentViewStatus.value ==
|
final isNotLoggedIn = controller.kr_currentViewStatus.value ==
|
||||||
KRHomeViewsStatus.kr_notLoggedIn;
|
KRHomeViewsStatus.kr_notLoggedIn;
|
||||||
|
|
||||||
KRLogUtil.kr_i('构建默认视图', tag: 'HomeBottomPanel');
|
KRLogUtil.kr_i('=' * 60, tag: 'HomeBottomPanel');
|
||||||
|
KRLogUtil.kr_i('🎨 构建默认视图', tag: 'HomeBottomPanel');
|
||||||
KRLogUtil.kr_i('是否未登录: $isNotLoggedIn', tag: 'HomeBottomPanel');
|
KRLogUtil.kr_i('是否未登录: $isNotLoggedIn', tag: 'HomeBottomPanel');
|
||||||
KRLogUtil.kr_i('是否有有效订阅: $hasValidSubscription', tag: 'HomeBottomPanel');
|
KRLogUtil.kr_i('是否有有效订阅: $hasValidSubscription', tag: 'HomeBottomPanel');
|
||||||
KRLogUtil.kr_i('是否试用: ${isTrial.value}', tag: 'HomeBottomPanel');
|
KRLogUtil.kr_i('订阅列表数量: ${controller.kr_subscribeService.kr_availableSubscribes.length}', tag: 'HomeBottomPanel');
|
||||||
KRLogUtil.kr_i('当前高度: ${controller.kr_bottomPanelHeight.value}',
|
KRLogUtil.kr_i('当前选中订阅: ${controller.kr_subscribeService.kr_currentSubscribe.value?.name ?? "null"}', tag: 'HomeBottomPanel');
|
||||||
tag: 'HomeBottomPanel');
|
KRLogUtil.kr_i('是否试用: $isTrial', tag: 'HomeBottomPanel');
|
||||||
|
KRLogUtil.kr_i('当前高度: ${controller.kr_bottomPanelHeight.value}', tag: 'HomeBottomPanel');
|
||||||
|
|
||||||
|
// 🔧 新增:详细的 UI 渲染决策日志
|
||||||
|
if (hasValidSubscription) {
|
||||||
|
KRLogUtil.kr_i('✅ 将渲染: 连接信息卡片 (KRHomeConnectionInfoView)', tag: 'HomeBottomPanel');
|
||||||
|
} else {
|
||||||
|
KRLogUtil.kr_i('✅ 将渲染: 订阅卡片 (KRSubscriptionCard) - 开通会员界面', tag: 'HomeBottomPanel');
|
||||||
|
}
|
||||||
|
KRLogUtil.kr_i('=' * 60, tag: 'HomeBottomPanel');
|
||||||
|
|
||||||
|
// 🔧 关键修复:统一布局逻辑,确保无论登录状态如何都显示完整UI
|
||||||
return Column(
|
return Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
// 主要内容区域
|
// 主要内容区域 - 始终使用 Expanded + ScrollView 确保内容可见
|
||||||
if (isNotLoggedIn)
|
Expanded(
|
||||||
// 未登录状态下,使用 SingleChildScrollView 让内容自然撑开
|
child: SingleChildScrollView(
|
||||||
SingleChildScrollView(
|
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
// 🔧 核心修复:无论登录状态,都显示核心卡片(订阅或连接信息)
|
||||||
padding:
|
if (hasValidSubscription)
|
||||||
EdgeInsets.symmetric(horizontal: 16.w, vertical: 12.w),
|
// 已订阅:显示连接信息卡片
|
||||||
child: const KRHomeConnectionOptionsView(),
|
Builder(builder: (context) {
|
||||||
|
KRLogUtil.kr_i('🔹 渲染连接信息卡片,margin top: ${12}', tag: 'HomeBottomPanel');
|
||||||
|
return Container(
|
||||||
|
margin: EdgeInsets.only(top: 12),
|
||||||
|
child: const KRHomeConnectionInfoView(),
|
||||||
|
);
|
||||||
|
})
|
||||||
|
else
|
||||||
|
// 未订阅(包括未登录):始终显示订阅卡片
|
||||||
|
Builder(builder: (context) {
|
||||||
|
KRLogUtil.kr_i('🔹 渲染订阅卡片,margin: top=${12}, left=${12}, right=${12}', tag: 'HomeBottomPanel');
|
||||||
|
|
||||||
|
return Container(
|
||||||
|
margin: EdgeInsets.only(top: 12, left: 12, right: 12),
|
||||||
|
child: const KRSubscriptionCard(),
|
||||||
|
);
|
||||||
|
}),
|
||||||
|
|
||||||
|
// 2. 如果已订阅且是试用,展示试用卡片
|
||||||
|
if (hasValidSubscription && isTrial)
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 12),
|
||||||
|
child: const KRHomeTrialCard(),
|
||||||
|
),
|
||||||
|
|
||||||
|
// 3. 如果已订阅且是最后一天,展示最后一天卡片
|
||||||
|
if (hasValidSubscription && isLastDay && !isTrial)
|
||||||
|
Container(
|
||||||
|
margin: EdgeInsets.only(top: 12),
|
||||||
|
child: const KRHomeLastDayCard(),
|
||||||
|
),
|
||||||
|
|
||||||
|
// 4. 连接选项(分组和国家入口)- 始终显示
|
||||||
|
const Padding(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 12),
|
||||||
|
child: KRHomeConnectionOptionsView(),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)
|
|
||||||
else
|
|
||||||
// 已登录状态下,使用固定高度
|
|
||||||
Expanded(
|
|
||||||
child: SingleChildScrollView(
|
|
||||||
child: Column(
|
|
||||||
mainAxisSize: MainAxisSize.min,
|
|
||||||
children: [
|
|
||||||
// 1. 如果已订阅,展示当前连接卡片
|
|
||||||
if (hasValidSubscription)
|
|
||||||
Container(
|
|
||||||
margin: EdgeInsets.only(top: 12.h),
|
|
||||||
child: const KRHomeConnectionInfoView())
|
|
||||||
else
|
|
||||||
Container(
|
|
||||||
margin:
|
|
||||||
EdgeInsets.only(top: 12.h, left: 12.w, right: 12.w),
|
|
||||||
child: const KRSubscriptionCard()),
|
|
||||||
|
|
||||||
// 2. 如果已订阅且是试用,展示试用卡片
|
|
||||||
if (hasValidSubscription && isTrial.value)
|
|
||||||
Container(
|
|
||||||
margin: EdgeInsets.only(top: 12.h),
|
|
||||||
child: const KRHomeTrialCard(),
|
|
||||||
),
|
|
||||||
|
|
||||||
// 3. 如果已订阅且是最后一天,展示最后一天卡片
|
|
||||||
if (hasValidSubscription && isLastDay.value && !isTrial.value)
|
|
||||||
Container(
|
|
||||||
margin: EdgeInsets.only(top: 12.h),
|
|
||||||
child: const KRHomeLastDayCard(),
|
|
||||||
),
|
|
||||||
|
|
||||||
// 4. 连接选项(分组和国家入口)
|
|
||||||
Padding(
|
|
||||||
padding:
|
|
||||||
EdgeInsets.symmetric(horizontal: 16.w, vertical: 12.w),
|
|
||||||
child: const KRHomeConnectionOptionsView(),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -134,28 +145,67 @@ class KRHomeBottomPanel extends GetView<KRHomeController> {
|
|||||||
KRLogUtil.kr_i('当前高度: ${controller.kr_bottomPanelHeight.value}',
|
KRLogUtil.kr_i('当前高度: ${controller.kr_bottomPanelHeight.value}',
|
||||||
tag: 'HomeBottomPanel');
|
tag: 'HomeBottomPanel');
|
||||||
|
|
||||||
return Center(
|
// 🔧 Android 15 紧急修复:加载时显示完整的默认内容 + 加载指示器
|
||||||
child: CircularProgressIndicator(
|
// 而不是只显示一个转圈圈,避免用户看到空白面板
|
||||||
color: Colors.green,
|
return Stack(
|
||||||
strokeWidth: 2.0,
|
children: [
|
||||||
),
|
// 底层:显示默认内容(半透明)
|
||||||
|
Opacity(
|
||||||
|
opacity: 0.5,
|
||||||
|
child: _kr_buildDefaultView(Get.context!),
|
||||||
|
),
|
||||||
|
// 顶层:加载指示器
|
||||||
|
Center(
|
||||||
|
child: Container(
|
||||||
|
padding: EdgeInsets.all(16),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Get.context!.theme.cardColor,
|
||||||
|
borderRadius: BorderRadius.circular(12),
|
||||||
|
boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
color: Colors.black.withOpacity(0.1),
|
||||||
|
blurRadius: 10,
|
||||||
|
offset: const Offset(0, 2),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
CircularProgressIndicator(
|
||||||
|
color: Colors.green,
|
||||||
|
strokeWidth: 3.0,
|
||||||
|
),
|
||||||
|
SizedBox(height: 12),
|
||||||
|
Text(
|
||||||
|
'正在加载...',
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 14,
|
||||||
|
color: Get.context!.theme.textTheme.bodyMedium?.color,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _kr_buildErrorView(BuildContext context) {
|
Widget _kr_buildErrorView(BuildContext context) {
|
||||||
return Container(
|
return Container(
|
||||||
height: 200.w,
|
height: 200,
|
||||||
padding: EdgeInsets.all(16.w),
|
padding: EdgeInsets.all(16),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Icon(
|
Icon(
|
||||||
Icons.error_outline,
|
Icons.error_outline,
|
||||||
size: 48.w,
|
size: 48,
|
||||||
color: Theme.of(context).colorScheme.error,
|
color: Theme.of(context).colorScheme.error,
|
||||||
),
|
),
|
||||||
SizedBox(height: 16.w),
|
SizedBox(height: 16),
|
||||||
Text(
|
Text(
|
||||||
AppTranslations.kr_home.error,
|
AppTranslations.kr_home.error,
|
||||||
style: KrAppTextStyle(
|
style: KrAppTextStyle(
|
||||||
@@ -164,7 +214,7 @@ class KRHomeBottomPanel extends GetView<KRHomeController> {
|
|||||||
color: Theme.of(context).textTheme.bodyMedium?.color,
|
color: Theme.of(context).textTheme.bodyMedium?.color,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 8.w),
|
SizedBox(height: 8),
|
||||||
Text(
|
Text(
|
||||||
AppTranslations.kr_home.checkNetwork,
|
AppTranslations.kr_home.checkNetwork,
|
||||||
style: KrAppTextStyle(
|
style: KrAppTextStyle(
|
||||||
@@ -172,10 +222,10 @@ class KRHomeBottomPanel extends GetView<KRHomeController> {
|
|||||||
color: Theme.of(context).textTheme.bodySmall?.color,
|
color: Theme.of(context).textTheme.bodySmall?.color,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 24.w),
|
SizedBox(height: 24),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 200.w,
|
width: 200,
|
||||||
height: 44.h,
|
height: 44,
|
||||||
child: ElevatedButton(
|
child: ElevatedButton(
|
||||||
onPressed: () => controller.kr_refreshAll(),
|
onPressed: () => controller.kr_refreshAll(),
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
@@ -183,7 +233,7 @@ class KRHomeBottomPanel extends GetView<KRHomeController> {
|
|||||||
foregroundColor: Theme.of(context).colorScheme.onPrimary,
|
foregroundColor: Theme.of(context).colorScheme.onPrimary,
|
||||||
elevation: 0,
|
elevation: 0,
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(8.r),
|
borderRadius: BorderRadius.circular(8),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
||||||
import '../../../widgets/kr_simple_loading.dart';
|
import '../../../widgets/kr_simple_loading.dart';
|
||||||
import 'package:kaer_with_panels/app/widgets/kr_country_flag.dart';
|
import 'package:kaer_with_panels/app/widgets/kr_country_flag.dart';
|
||||||
import 'package:kaer_with_panels/app/widgets/kr_app_text_style.dart';
|
import 'package:kaer_with_panels/app/widgets/kr_app_text_style.dart';
|
||||||
@@ -10,6 +9,7 @@ import 'package:kaer_with_panels/app/services/singbox_imp/kr_sing_box_imp.dart';
|
|||||||
import 'package:kaer_with_panels/singbox/model/singbox_status.dart';
|
import 'package:kaer_with_panels/singbox/model/singbox_status.dart';
|
||||||
import '../controllers/kr_home_controller.dart';
|
import '../controllers/kr_home_controller.dart';
|
||||||
import '../models/kr_home_views_status.dart';
|
import '../models/kr_home_views_status.dart';
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
|
|
||||||
class KRHomeConnectionInfoView extends GetView<KRHomeController> {
|
class KRHomeConnectionInfoView extends GetView<KRHomeController> {
|
||||||
const KRHomeConnectionInfoView({super.key});
|
const KRHomeConnectionInfoView({super.key});
|
||||||
@@ -24,17 +24,17 @@ class KRHomeConnectionInfoView extends GetView<KRHomeController> {
|
|||||||
Widget _buildConnectCard(BuildContext context) {
|
Widget _buildConnectCard(BuildContext context) {
|
||||||
return Obx(() {
|
return Obx(() {
|
||||||
return Container(
|
return Container(
|
||||||
margin: EdgeInsets.symmetric(horizontal: 16.w),
|
margin: EdgeInsets.symmetric(horizontal: 16),
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: 116.w,
|
height: 116,
|
||||||
decoration: ShapeDecoration(
|
decoration: ShapeDecoration(
|
||||||
color: Theme.of(context).cardColor,
|
color: Theme.of(context).cardColor,
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(16.w),
|
borderRadius: BorderRadius.circular(16),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.all(14.w),
|
padding: EdgeInsets.all(14),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
@@ -65,7 +65,7 @@ class KRHomeConnectionInfoView extends GetView<KRHomeController> {
|
|||||||
),
|
),
|
||||||
Icon(
|
Icon(
|
||||||
Icons.arrow_forward_ios,
|
Icons.arrow_forward_ios,
|
||||||
size: 12.w,
|
size: 12,
|
||||||
color: Theme.of(context).textTheme.bodySmall?.color,
|
color: Theme.of(context).textTheme.bodySmall?.color,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -73,7 +73,7 @@ class KRHomeConnectionInfoView extends GetView<KRHomeController> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 10.w),
|
SizedBox(height: 10),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
@@ -82,12 +82,14 @@ class KRHomeConnectionInfoView extends GetView<KRHomeController> {
|
|||||||
// 🔧 修复:使用 Obx 包裹确保国旗响应式更新
|
// 🔧 修复:使用 Obx 包裹确保国旗响应式更新
|
||||||
Obx(() {
|
Obx(() {
|
||||||
final countryCode = controller.kr_getCurrentNodeCountry();
|
final countryCode = controller.kr_getCurrentNodeCountry();
|
||||||
print('🌍 ConnectionInfo 更新,国家代码: $countryCode');
|
if (kDebugMode) {
|
||||||
|
print('🌍 ConnectionInfo 更新,国家代码: $countryCode');
|
||||||
|
}
|
||||||
return KRCountryFlag(
|
return KRCountryFlag(
|
||||||
countryCode: countryCode,
|
countryCode: countryCode,
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
SizedBox(width: 10.w),
|
SizedBox(width: 10),
|
||||||
Column(
|
Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
@@ -99,12 +101,14 @@ class KRHomeConnectionInfoView extends GetView<KRHomeController> {
|
|||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 6.w),
|
SizedBox(height: 6),
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Obx(() {
|
Obx(() {
|
||||||
final delay = controller.kr_currentNodeLatency.value;
|
final delay = controller.kr_currentNodeLatency.value;
|
||||||
print('🔵 UI延迟显示更新: delay=$delay');
|
if (kDebugMode) {
|
||||||
|
print('🔵 UI延迟显示更新: delay=$delay');
|
||||||
|
}
|
||||||
|
|
||||||
// 获取延迟颜色
|
// 获取延迟颜色
|
||||||
Color getLatencyColor(int delay) {
|
Color getLatencyColor(int delay) {
|
||||||
@@ -142,10 +146,10 @@ class KRHomeConnectionInfoView extends GetView<KRHomeController> {
|
|||||||
children: [
|
children: [
|
||||||
KRSimpleLoading(
|
KRSimpleLoading(
|
||||||
color: Colors.green,
|
color: Colors.green,
|
||||||
size: 12.w,
|
size: 12,
|
||||||
duration: const Duration(milliseconds: 800),
|
duration: const Duration(milliseconds: 800),
|
||||||
),
|
),
|
||||||
SizedBox(width: 2.w),
|
SizedBox(width: 2),
|
||||||
Text(
|
Text(
|
||||||
AppTranslations.kr_home.connecting,
|
AppTranslations.kr_home.connecting,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
@@ -161,7 +165,7 @@ class KRHomeConnectionInfoView extends GetView<KRHomeController> {
|
|||||||
return Row(
|
return Row(
|
||||||
children: [
|
children: [
|
||||||
Icon(Icons.signal_cellular_alt,
|
Icon(Icons.signal_cellular_alt,
|
||||||
size: 12.w,
|
size: 12,
|
||||||
color: getLatencyColor(delay)),
|
color: getLatencyColor(delay)),
|
||||||
SizedBox(width: 2),
|
SizedBox(width: 2),
|
||||||
Text(
|
Text(
|
||||||
@@ -183,9 +187,9 @@ class KRHomeConnectionInfoView extends GetView<KRHomeController> {
|
|||||||
}
|
}
|
||||||
return Row(
|
return Row(
|
||||||
children: [
|
children: [
|
||||||
SizedBox(width: 10.w),
|
SizedBox(width: 10),
|
||||||
Icon(Icons.arrow_upward,
|
Icon(Icons.arrow_upward,
|
||||||
size: 12.w,
|
size: 12,
|
||||||
color: Theme.of(context).textTheme.bodySmall?.color),
|
color: Theme.of(context).textTheme.bodySmall?.color),
|
||||||
Text(
|
Text(
|
||||||
controller.kr_formatBytes(KRSingBoxImp.instance.kr_stats.value.uplink),
|
controller.kr_formatBytes(KRSingBoxImp.instance.kr_stats.value.uplink),
|
||||||
@@ -195,9 +199,9 @@ class KRHomeConnectionInfoView extends GetView<KRHomeController> {
|
|||||||
fontWeight: FontWeight.w400,
|
fontWeight: FontWeight.w400,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width: 10.w),
|
SizedBox(width: 10),
|
||||||
Icon(Icons.arrow_downward,
|
Icon(Icons.arrow_downward,
|
||||||
size: 12.w,
|
size: 12,
|
||||||
color: Theme.of(context).textTheme.bodySmall?.color),
|
color: Theme.of(context).textTheme.bodySmall?.color),
|
||||||
Text(
|
Text(
|
||||||
controller.kr_formatBytes(KRSingBoxImp.instance.kr_stats.value.downlink),
|
controller.kr_formatBytes(KRSingBoxImp.instance.kr_stats.value.downlink),
|
||||||
@@ -227,7 +231,9 @@ class KRHomeConnectionInfoView extends GetView<KRHomeController> {
|
|||||||
final isSwitching = status is SingboxStarting || status is SingboxStopping;
|
final isSwitching = status is SingboxStarting || status is SingboxStopping;
|
||||||
|
|
||||||
// 🔧 调试日志
|
// 🔧 调试日志
|
||||||
print('🔵 Switch UI 更新: status=${status.runtimeType}, isConnected=$isConnected, isSwitching=$isSwitching');
|
if (kDebugMode) {
|
||||||
|
print('🔵 Switch UI 更新: status=${status.runtimeType}, isConnected=$isConnected, isSwitching=$isSwitching');
|
||||||
|
}
|
||||||
|
|
||||||
return CupertinoSwitch(
|
return CupertinoSwitch(
|
||||||
value: isConnected,
|
value: isConnected,
|
||||||
@@ -235,7 +241,9 @@ class KRHomeConnectionInfoView extends GetView<KRHomeController> {
|
|||||||
onChanged: isSwitching
|
onChanged: isSwitching
|
||||||
? null
|
? null
|
||||||
: (bool value) {
|
: (bool value) {
|
||||||
print('🔵 Switch onChanged 触发: 请求=$value, 当前状态=$status');
|
if (kDebugMode) {
|
||||||
|
print('🔵 Switch onChanged 触发: 请求=$value, 当前状态=$status');
|
||||||
|
}
|
||||||
controller.kr_toggleSwitch(value);
|
controller.kr_toggleSwitch(value);
|
||||||
},
|
},
|
||||||
activeColor: Colors.blue,
|
activeColor: Colors.blue,
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
||||||
import 'package:kaer_with_panels/app/localization/app_translations.dart';
|
import 'package:kaer_with_panels/app/localization/app_translations.dart';
|
||||||
import 'package:kaer_with_panels/app/widgets/kr_app_text_style.dart';
|
import 'package:kaer_with_panels/app/widgets/kr_app_text_style.dart';
|
||||||
import 'package:kaer_with_panels/app/widgets/kr_local_image.dart';
|
import 'package:kaer_with_panels/app/widgets/kr_local_image.dart';
|
||||||
@@ -14,19 +13,23 @@ class KRHomeConnectionOptionsView extends GetView<KRHomeController> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
print('🔌 [ConnectionOptions] 开始构建连接选项组件');
|
||||||
|
|
||||||
return Column(
|
return Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
AppTranslations.kr_home.connectionSectionTitle,
|
AppTranslations.kr_home.connectionSectionTitle,
|
||||||
style: KrAppTextStyle(
|
style: TextStyle(
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
color: Theme.of(context).textTheme.bodyMedium?.color,
|
color: Theme.of(context).brightness == Brightness.dark
|
||||||
|
? Colors.white
|
||||||
|
: Colors.black87,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 8.w),
|
const SizedBox(height: 12),
|
||||||
_buildConnectionOption(
|
_buildConnectionOption(
|
||||||
"home_ct",
|
"home_ct",
|
||||||
AppTranslations.kr_home.countryRegion,
|
AppTranslations.kr_home.countryRegion,
|
||||||
@@ -41,8 +44,11 @@ class KRHomeConnectionOptionsView extends GetView<KRHomeController> {
|
|||||||
|
|
||||||
Widget _buildConnectionOption(String icon, String label, BuildContext context,
|
Widget _buildConnectionOption(String icon, String label, BuildContext context,
|
||||||
{VoidCallback? onTap}) {
|
{VoidCallback? onTap}) {
|
||||||
|
print('🔌 [ConnectionOptions] 构建连接选项: $label');
|
||||||
|
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
print('🔌 [ConnectionOptions] 选项被点击: $label');
|
||||||
if (controller.kr_subscribeService.kr_currentSubscribe.value == null) {
|
if (controller.kr_subscribeService.kr_currentSubscribe.value == null) {
|
||||||
// 未订阅状态下,使用统一的订阅导航工具
|
// 未订阅状态下,使用统一的订阅导航工具
|
||||||
KRSubscribeNavigationUtil.navigateToPurchase(tag: 'ConnectionOptions');
|
KRSubscribeNavigationUtil.navigateToPurchase(tag: 'ConnectionOptions');
|
||||||
@@ -52,30 +58,34 @@ class KRHomeConnectionOptionsView extends GetView<KRHomeController> {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.all(16.w),
|
padding: const EdgeInsets.all(16),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Theme.of(context).cardColor,
|
color: Theme.of(context).cardColor,
|
||||||
borderRadius: BorderRadius.circular(12.r),
|
borderRadius: BorderRadius.circular(12),
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
KrLocalImage(
|
KrLocalImage(
|
||||||
imageName: icon,
|
imageName: icon,
|
||||||
width: 32.w,
|
width: 36,
|
||||||
height: 32.w,
|
height: 36,
|
||||||
color: Theme.of(context).textTheme.bodyMedium?.color,
|
color: Theme.of(context).brightness == Brightness.dark
|
||||||
|
? Colors.white70
|
||||||
|
: Colors.black87,
|
||||||
),
|
),
|
||||||
SizedBox(height: 12.w),
|
const SizedBox(height: 12),
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
label,
|
label,
|
||||||
style: KrAppTextStyle(
|
style: TextStyle(
|
||||||
fontSize: 13,
|
fontSize: 14,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
color: Theme.of(context).textTheme.bodyMedium?.color,
|
color: Theme.of(context).brightness == Brightness.dark
|
||||||
|
? Colors.white
|
||||||
|
: Colors.black87,
|
||||||
),
|
),
|
||||||
maxLines: 2,
|
maxLines: 2,
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
@@ -83,8 +93,10 @@ class KRHomeConnectionOptionsView extends GetView<KRHomeController> {
|
|||||||
),
|
),
|
||||||
Icon(
|
Icon(
|
||||||
Icons.arrow_forward_ios,
|
Icons.arrow_forward_ios,
|
||||||
size: 12.w,
|
size: 14,
|
||||||
color: Theme.of(context).textTheme.bodySmall?.color,
|
color: Theme.of(context).brightness == Brightness.dark
|
||||||
|
? Colors.white54
|
||||||
|
: Colors.black45,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -15,16 +15,16 @@ class KRHomeLastDayCard extends GetView<KRHomeController> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return Container(
|
||||||
margin: EdgeInsets.symmetric(horizontal: 16.w),
|
margin: EdgeInsets.symmetric(horizontal: 16),
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
decoration: ShapeDecoration(
|
decoration: ShapeDecoration(
|
||||||
color: Theme.of(context).cardColor,
|
color: Theme.of(context).cardColor,
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(16.w),
|
borderRadius: BorderRadius.circular(16),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.all(14.w),
|
padding: EdgeInsets.all(14),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
@@ -54,7 +54,7 @@ class KRHomeLastDayCard extends GetView<KRHomeController> {
|
|||||||
),
|
),
|
||||||
Icon(
|
Icon(
|
||||||
Icons.arrow_forward_ios,
|
Icons.arrow_forward_ios,
|
||||||
size: 12.w,
|
size: 12,
|
||||||
color: Colors.blue,
|
color: Colors.blue,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -64,14 +64,14 @@ class KRHomeLastDayCard extends GetView<KRHomeController> {
|
|||||||
),
|
),
|
||||||
|
|
||||||
// 倒计时显示
|
// 倒计时显示
|
||||||
SizedBox(height: 10.w),
|
SizedBox(height: 10),
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
padding: EdgeInsets.all(8.w),
|
padding: EdgeInsets.all(8),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.blue.withOpacity(0.1),
|
color: Colors.blue.withOpacity(0.1),
|
||||||
borderRadius: BorderRadius.circular(8.w),
|
borderRadius: BorderRadius.circular(8),
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
@@ -79,9 +79,9 @@ class KRHomeLastDayCard extends GetView<KRHomeController> {
|
|||||||
Icon(
|
Icon(
|
||||||
Icons.timer_outlined,
|
Icons.timer_outlined,
|
||||||
color: Colors.blue,
|
color: Colors.blue,
|
||||||
size: 16.w,
|
size: 16,
|
||||||
),
|
),
|
||||||
SizedBox(width: 4.w),
|
SizedBox(width: 4),
|
||||||
Text(
|
Text(
|
||||||
AppTranslations.kr_home.lastDaySubscriptionMessage,
|
AppTranslations.kr_home.lastDaySubscriptionMessage,
|
||||||
style: KrAppTextStyle(
|
style: KrAppTextStyle(
|
||||||
@@ -93,7 +93,7 @@ class KRHomeLastDayCard extends GetView<KRHomeController> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width: 12.w),
|
SizedBox(width: 12),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
@@ -123,7 +123,7 @@ class KRHomeLastDayCard extends GetView<KRHomeController> {
|
|||||||
?.color,
|
?.color,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 4.w),
|
SizedBox(height: 4.h),
|
||||||
Text(
|
Text(
|
||||||
AppTranslations.kr_home.subscriptionEndMessage,
|
AppTranslations.kr_home.subscriptionEndMessage,
|
||||||
style: KrAppTextStyle(
|
style: KrAppTextStyle(
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
import 'dart:math';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
||||||
import 'package:kaer_with_panels/app/localization/app_translations.dart';
|
import 'package:kaer_with_panels/app/localization/app_translations.dart';
|
||||||
import 'package:kaer_with_panels/app/widgets/kr_app_text_style.dart';
|
import 'package:kaer_with_panels/app/widgets/kr_app_text_style.dart';
|
||||||
import 'package:kaer_with_panels/app/widgets/kr_country_flag.dart';
|
import 'package:kaer_with_panels/app/widgets/kr_country_flag.dart';
|
||||||
@@ -16,6 +14,7 @@ import 'package:kaer_with_panels/app/widgets/kr_network_image.dart';
|
|||||||
import '../../../widgets/kr_simple_loading.dart';
|
import '../../../widgets/kr_simple_loading.dart';
|
||||||
|
|
||||||
import '../../../../singbox/model/singbox_proxy_type.dart';
|
import '../../../../singbox/model/singbox_proxy_type.dart';
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
|
|
||||||
/// 节点列表视图组件
|
/// 节点列表视图组件
|
||||||
/// 用于展示所有节点相关的列表视图
|
/// 用于展示所有节点相关的列表视图
|
||||||
@@ -26,24 +25,17 @@ class KRHomeNodeListView extends GetView<KRHomeController> {
|
|||||||
static const Color krModernGreen = Color(0xFF4CAF50);
|
static const Color krModernGreen = Color(0xFF4CAF50);
|
||||||
static const Color krModernGreenLight = Color(0xFF81C784);
|
static const Color krModernGreenLight = Color(0xFF81C784);
|
||||||
|
|
||||||
// 存储每个节点的随机延迟值(仅用于界面显示)
|
// 🔧 修复无限刷新:添加标志位确保自动测试只触发一次
|
||||||
static final Map<String, int> _fakeDelays = {};
|
static bool _hasTriggeredAutoTest = false;
|
||||||
|
|
||||||
/// 获取显示的延迟值
|
/// 获取显示的延迟值
|
||||||
|
/// ✅ 修复:始终显示真实的 TCP 测试结果
|
||||||
int _getDisplayDelay(KRHomeController controller, KROutboundItem item) {
|
int _getDisplayDelay(KRHomeController controller, KROutboundItem item) {
|
||||||
// 如果已连接,使用真实的延迟值
|
// 直接返回真实的延迟测试结果
|
||||||
if (controller.kr_isConnected.value) {
|
// 无论是否连接VPN,都使用 item.urlTestDelay.value
|
||||||
return item.urlTestDelay.value;
|
// - 已连接:通过 SingBox 代理测试的真实延迟
|
||||||
}
|
// - 未连接:通过 TCP Socket 直连测试的真实延迟
|
||||||
|
return item.urlTestDelay.value;
|
||||||
// 如果未连接,使用随机延迟值
|
|
||||||
if (!_fakeDelays.containsKey(item.tag)) {
|
|
||||||
// 生成30ms-100ms之间的随机延迟
|
|
||||||
final random = Random();
|
|
||||||
_fakeDelays[item.tag] = 30 + random.nextInt(71); // 30 + (0-70) = 30-100ms
|
|
||||||
}
|
|
||||||
|
|
||||||
return _fakeDelays[item.tag] ?? 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -70,20 +62,20 @@ class KRHomeNodeListView extends GetView<KRHomeController> {
|
|||||||
/// 构建专用服务器列表
|
/// 构建专用服务器列表
|
||||||
Widget _buildServerList(BuildContext context) {
|
Widget _buildServerList(BuildContext context) {
|
||||||
return Container(
|
return Container(
|
||||||
width: ScreenUtil().screenWidth,
|
width: MediaQuery.of(context).size.width,
|
||||||
height: 360.w, // 减小高度比例
|
height: 360, // 减小高度比例
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Theme.of(context).primaryColor,
|
color: Theme.of(context).primaryColor,
|
||||||
borderRadius: BorderRadius.only(
|
borderRadius: BorderRadius.only(
|
||||||
topLeft: Radius.circular(20.w),
|
topLeft: Radius.circular(20),
|
||||||
topRight: Radius.circular(20.w),
|
topRight: Radius.circular(20),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
// 标题栏
|
// 标题栏
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 12.w),
|
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 12),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
@@ -102,7 +94,7 @@ class KRHomeNodeListView extends GetView<KRHomeController> {
|
|||||||
},
|
},
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.close,
|
Icons.close,
|
||||||
size: 24.w,
|
size: 24,
|
||||||
color: Theme.of(context).textTheme.bodyMedium?.color,
|
color: Theme.of(context).textTheme.bodyMedium?.color,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -124,19 +116,19 @@ class KRHomeNodeListView extends GetView<KRHomeController> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
return ListView.builder(
|
return ListView.builder(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
padding: EdgeInsets.symmetric(horizontal: 16),
|
||||||
itemCount: controller.kr_subscribeService.groupOutboundList.length,
|
itemCount: controller.kr_subscribeService.groupOutboundList.length,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
final group =
|
final group =
|
||||||
controller.kr_subscribeService.groupOutboundList[index];
|
controller.kr_subscribeService.groupOutboundList[index];
|
||||||
return Container(
|
return Container(
|
||||||
margin: EdgeInsets.only(bottom: 8.w),
|
margin: EdgeInsets.only(bottom: 8),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Theme.of(context).cardColor,
|
color: Theme.of(context).cardColor,
|
||||||
borderRadius: BorderRadius.circular(12.w),
|
borderRadius: BorderRadius.circular(12),
|
||||||
border: Border.all(
|
border: Border.all(
|
||||||
color: Theme.of(context).dividerColor.withOpacity(0.1),
|
color: Theme.of(context).dividerColor.withOpacity(0.1),
|
||||||
width: 1.w,
|
width: 1,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
@@ -145,18 +137,18 @@ class KRHomeNodeListView extends GetView<KRHomeController> {
|
|||||||
controller.kr_currentListStatus.value =
|
controller.kr_currentListStatus.value =
|
||||||
KRHomeViewsListStatus.kr_serverSubscribeList;
|
KRHomeViewsListStatus.kr_serverSubscribeList;
|
||||||
},
|
},
|
||||||
borderRadius: BorderRadius.circular(12.w),
|
borderRadius: BorderRadius.circular(12),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.all(12.w),
|
padding: EdgeInsets.all(12),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
KRNetworkImage(
|
KRNetworkImage(
|
||||||
kr_imageUrl: group.icon,
|
kr_imageUrl: group.icon,
|
||||||
kr_width: 32.w,
|
kr_width: 32,
|
||||||
kr_height: 32.w,
|
kr_height: 32,
|
||||||
kr_fit: BoxFit.cover,
|
kr_fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
SizedBox(width: 12.w),
|
SizedBox(width: 12),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
group.tag,
|
group.tag,
|
||||||
@@ -170,7 +162,7 @@ class KRHomeNodeListView extends GetView<KRHomeController> {
|
|||||||
),
|
),
|
||||||
Icon(
|
Icon(
|
||||||
Icons.arrow_forward_ios,
|
Icons.arrow_forward_ios,
|
||||||
size: 16.w,
|
size: 16,
|
||||||
color: Theme.of(context).textTheme.bodySmall?.color,
|
color: Theme.of(context).textTheme.bodySmall?.color,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -207,7 +199,7 @@ class KRHomeNodeListView extends GetView<KRHomeController> {
|
|||||||
return _kr_buildListContainer(
|
return _kr_buildListContainer(
|
||||||
context,
|
context,
|
||||||
child: ListView.builder(
|
child: ListView.builder(
|
||||||
padding: EdgeInsets.fromLTRB(16.w, 8.w, 16.w, 0),
|
padding: EdgeInsets.fromLTRB(16, 8, 16, 0),
|
||||||
itemCount:
|
itemCount:
|
||||||
controller.kr_subscribeService.countryOutboundList.length,
|
controller.kr_subscribeService.countryOutboundList.length,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
@@ -221,15 +213,15 @@ class KRHomeNodeListView extends GetView<KRHomeController> {
|
|||||||
country.isExpand.value = !country.isExpand.value;
|
country.isExpand.value = !country.isExpand.value;
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.symmetric(vertical: 12.w),
|
padding: EdgeInsets.symmetric(vertical: 12),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
KRCountryFlag(
|
KRCountryFlag(
|
||||||
countryCode: country.country,
|
countryCode: country.country,
|
||||||
width: 40.w,
|
width: 40,
|
||||||
height: 40.w,
|
height: 40,
|
||||||
),
|
),
|
||||||
SizedBox(width: 12.w),
|
SizedBox(width: 12),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
@@ -254,7 +246,7 @@ class KRHomeNodeListView extends GetView<KRHomeController> {
|
|||||||
country.isExpand.value
|
country.isExpand.value
|
||||||
? Icons.keyboard_arrow_down
|
? Icons.keyboard_arrow_down
|
||||||
: Icons.arrow_forward_ios,
|
: Icons.arrow_forward_ios,
|
||||||
size: 16.w,
|
size: 16,
|
||||||
color:
|
color:
|
||||||
Theme.of(context).textTheme.bodySmall?.color,
|
Theme.of(context).textTheme.bodySmall?.color,
|
||||||
);
|
);
|
||||||
@@ -271,7 +263,7 @@ class KRHomeNodeListView extends GetView<KRHomeController> {
|
|||||||
return ListView.builder(
|
return ListView.builder(
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
physics: NeverScrollableScrollPhysics(),
|
physics: NeverScrollableScrollPhysics(),
|
||||||
padding: EdgeInsets.only(left: 24.w),
|
padding: EdgeInsets.only(left: 24),
|
||||||
itemCount: country.outboundList.length,
|
itemCount: country.outboundList.length,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
final server = country.outboundList[index];
|
final server = country.outboundList[index];
|
||||||
@@ -281,7 +273,9 @@ class KRHomeNodeListView extends GetView<KRHomeController> {
|
|||||||
// 🔧 修复:改为 async,等待节点切换完成后再关闭列表
|
// 🔧 修复:改为 async,等待节点切换完成后再关闭列表
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
try {
|
try {
|
||||||
print('🔄 用户点击节点: ${server.tag}');
|
if (kDebugMode) {
|
||||||
|
print('🔄 用户点击节点: ${server.tag}');
|
||||||
|
}
|
||||||
// 使用统一的节点切换方法,等待完成
|
// 使用统一的节点切换方法,等待完成
|
||||||
final success = await controller
|
final success = await controller
|
||||||
.kr_performNodeSwitch(server.tag);
|
.kr_performNodeSwitch(server.tag);
|
||||||
@@ -290,25 +284,31 @@ class KRHomeNodeListView extends GetView<KRHomeController> {
|
|||||||
if (success) {
|
if (success) {
|
||||||
controller.kr_currentListStatus.value =
|
controller.kr_currentListStatus.value =
|
||||||
KRHomeViewsListStatus.kr_none;
|
KRHomeViewsListStatus.kr_none;
|
||||||
print('✅ 节点切换成功,关闭列表');
|
if (kDebugMode) {
|
||||||
|
print('✅ 节点切换成功,关闭列表');
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
print('❌ 节点切换失败,列表保持打开');
|
if (kDebugMode) {
|
||||||
|
print('❌ 节点切换失败,列表保持打开');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print('❌ 节点切换异常: $e');
|
if (kDebugMode) {
|
||||||
|
print('❌ 节点切换异常: $e');
|
||||||
|
}
|
||||||
KRLogUtil.kr_e('节点切换异常: $e',
|
KRLogUtil.kr_e('节点切换异常: $e',
|
||||||
tag: 'NodeListView');
|
tag: 'NodeListView');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.symmetric(
|
padding: EdgeInsets.symmetric(
|
||||||
vertical: 8.w,
|
vertical: 8,
|
||||||
horizontal: 16.w,
|
horizontal: 16,
|
||||||
),
|
),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
// 添加轻微的背景色以区分点击区域
|
// 添加轻微的背景色以区分点击区域
|
||||||
color: Theme.of(context).cardColor,
|
color: Theme.of(context).cardColor,
|
||||||
borderRadius: BorderRadius.circular(8.w),
|
borderRadius: BorderRadius.circular(8),
|
||||||
),
|
),
|
||||||
child: _kr_buildNodeListItem(
|
child: _kr_buildNodeListItem(
|
||||||
context,
|
context,
|
||||||
@@ -319,9 +319,9 @@ class KRHomeNodeListView extends GetView<KRHomeController> {
|
|||||||
// 添加分隔线
|
// 添加分隔线
|
||||||
if (index < country.outboundList.length - 1)
|
if (index < country.outboundList.length - 1)
|
||||||
Divider(
|
Divider(
|
||||||
height: 1.w,
|
height: 1,
|
||||||
indent: 16.w,
|
indent: 16,
|
||||||
endIndent: 16.w,
|
endIndent: 16,
|
||||||
color: Theme.of(context)
|
color: Theme.of(context)
|
||||||
.dividerColor
|
.dividerColor
|
||||||
.withOpacity(0.1),
|
.withOpacity(0.1),
|
||||||
@@ -332,7 +332,7 @@ class KRHomeNodeListView extends GetView<KRHomeController> {
|
|||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
Divider(
|
Divider(
|
||||||
height: 1.w,
|
height: 1,
|
||||||
color: Theme.of(context).dividerColor.withOpacity(0.1),
|
color: Theme.of(context).dividerColor.withOpacity(0.1),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -368,7 +368,7 @@ class KRHomeNodeListView extends GetView<KRHomeController> {
|
|||||||
return _kr_buildListContainer(
|
return _kr_buildListContainer(
|
||||||
context,
|
context,
|
||||||
child: ListView.builder(
|
child: ListView.builder(
|
||||||
padding: EdgeInsets.fromLTRB(16.w, 16.w, 16.w, 0),
|
padding: EdgeInsets.fromLTRB(16, 16, 16, 0),
|
||||||
itemCount: servers.length,
|
itemCount: servers.length,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
final server = servers[index];
|
final server = servers[index];
|
||||||
@@ -397,7 +397,7 @@ class KRHomeNodeListView extends GetView<KRHomeController> {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.symmetric(vertical: 4.w),
|
padding: EdgeInsets.symmetric(vertical: 4),
|
||||||
child: _kr_buildNodeListItem(
|
child: _kr_buildNodeListItem(
|
||||||
context,
|
context,
|
||||||
item: server,
|
item: server,
|
||||||
@@ -406,7 +406,7 @@ class KRHomeNodeListView extends GetView<KRHomeController> {
|
|||||||
),
|
),
|
||||||
if (index < servers.length - 1)
|
if (index < servers.length - 1)
|
||||||
Divider(
|
Divider(
|
||||||
height: 1.w,
|
height: 1,
|
||||||
color: Theme.of(context).dividerColor.withOpacity(0.1),
|
color: Theme.of(context).dividerColor.withOpacity(0.1),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -426,12 +426,12 @@ class KRHomeNodeListView extends GetView<KRHomeController> {
|
|||||||
required Widget listContent,
|
required Widget listContent,
|
||||||
}) {
|
}) {
|
||||||
return Container(
|
return Container(
|
||||||
width: ScreenUtil().screenWidth,
|
width: MediaQuery.of(context).size.width,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Theme.of(context).primaryColor,
|
color: Theme.of(context).primaryColor,
|
||||||
borderRadius: BorderRadius.only(
|
borderRadius: BorderRadius.only(
|
||||||
topLeft: Radius.circular(20.w),
|
topLeft: Radius.circular(20),
|
||||||
topRight: Radius.circular(20.w),
|
topRight: Radius.circular(20),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
@@ -444,13 +444,13 @@ class KRHomeNodeListView extends GetView<KRHomeController> {
|
|||||||
onClose: () =>
|
onClose: () =>
|
||||||
controller.kr_currentListStatus.value = KRHomeViewsListStatus.kr_none,
|
controller.kr_currentListStatus.value = KRHomeViewsListStatus.kr_none,
|
||||||
),
|
),
|
||||||
SizedBox(height: 16.w),
|
SizedBox(height: 16),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Expanded(child: listContent),
|
Expanded(child: listContent),
|
||||||
// 添加底部间距
|
// 添加底部间距
|
||||||
SizedBox(height: 12.w),
|
SizedBox(height: 12),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -467,7 +467,7 @@ class KRHomeNodeListView extends GetView<KRHomeController> {
|
|||||||
VoidCallback? onClose,
|
VoidCallback? onClose,
|
||||||
}) {
|
}) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: EdgeInsets.only(left: 16.w, right: 16.w, top: 16.w),
|
padding: EdgeInsets.only(left: 16, right: 16, top: 16),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
@@ -478,11 +478,11 @@ class KRHomeNodeListView extends GetView<KRHomeController> {
|
|||||||
onTap: onBack,
|
onTap: onBack,
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.arrow_back_ios,
|
Icons.arrow_back_ios,
|
||||||
size: 20.w,
|
size: 20,
|
||||||
color: Theme.of(context).textTheme.bodyMedium?.color,
|
color: Theme.of(context).textTheme.bodyMedium?.color,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width: 8.w),
|
SizedBox(width: 8),
|
||||||
],
|
],
|
||||||
Text(
|
Text(
|
||||||
title,
|
title,
|
||||||
@@ -499,7 +499,7 @@ class KRHomeNodeListView extends GetView<KRHomeController> {
|
|||||||
onTap: onClose,
|
onTap: onClose,
|
||||||
child: Icon(
|
child: Icon(
|
||||||
Icons.close,
|
Icons.close,
|
||||||
size: 24.w,
|
size: 24,
|
||||||
color: Theme.of(context).textTheme.bodyMedium?.color,
|
color: Theme.of(context).textTheme.bodyMedium?.color,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -515,10 +515,10 @@ class KRHomeNodeListView extends GetView<KRHomeController> {
|
|||||||
required Widget child,
|
required Widget child,
|
||||||
}) {
|
}) {
|
||||||
return Container(
|
return Container(
|
||||||
margin: EdgeInsets.symmetric(horizontal: 16.w),
|
margin: EdgeInsets.symmetric(horizontal: 16),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Theme.of(context).cardColor,
|
color: Theme.of(context).cardColor,
|
||||||
borderRadius: BorderRadius.circular(12.w),
|
borderRadius: BorderRadius.circular(12),
|
||||||
),
|
),
|
||||||
child: child,
|
child: child,
|
||||||
);
|
);
|
||||||
@@ -544,17 +544,17 @@ class KRHomeNodeListView extends GetView<KRHomeController> {
|
|||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
key: ValueKey(item.id),
|
key: ValueKey(item.id),
|
||||||
padding: EdgeInsets.symmetric(vertical: 8.w),
|
padding: EdgeInsets.symmetric(vertical: 8),
|
||||||
child: Row(
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
// 🔧 修改:显示国旗代替图标
|
// 🔧 修改:显示国旗代替图标
|
||||||
KRCountryFlag(
|
KRCountryFlag(
|
||||||
countryCode: item.country,
|
countryCode: item.country,
|
||||||
width: 36.w,
|
width: 36,
|
||||||
height: 36.w,
|
height: 36,
|
||||||
),
|
),
|
||||||
SizedBox(width: 8.w),
|
SizedBox(width: 8),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
@@ -573,12 +573,12 @@ class KRHomeNodeListView extends GetView<KRHomeController> {
|
|||||||
Obx(
|
Obx(
|
||||||
() => controller.kr_cutTag.value == item.tag
|
() => controller.kr_cutTag.value == item.tag
|
||||||
? Container(
|
? Container(
|
||||||
margin: EdgeInsets.only(left: 4.w),
|
margin: EdgeInsets.only(left: 4),
|
||||||
padding: EdgeInsets.symmetric(
|
padding: EdgeInsets.symmetric(
|
||||||
horizontal: 4.w, vertical: 1.w),
|
horizontal: 4, vertical: 1),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: krModernGreenLight.withOpacity(0.1),
|
color: krModernGreenLight.withOpacity(0.1),
|
||||||
borderRadius: BorderRadius.circular(4.w),
|
borderRadius: BorderRadius.circular(4),
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
AppTranslations.kr_home.selected,
|
AppTranslations.kr_home.selected,
|
||||||
@@ -593,7 +593,7 @@ class KRHomeNodeListView extends GetView<KRHomeController> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 2.w),
|
SizedBox(height: 2),
|
||||||
Text(
|
Text(
|
||||||
item.city,
|
item.city,
|
||||||
style: KrAppTextStyle(
|
style: KrAppTextStyle(
|
||||||
@@ -650,30 +650,33 @@ class KRHomeNodeListView extends GetView<KRHomeController> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 自动触发延迟测试(仅在未连接状态下)
|
// 🔧 修复无限刷新:自动触发延迟测试(仅在未连接状态下,且只触发一次)
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
if (!_hasTriggeredAutoTest) {
|
||||||
if (!controller.kr_isConnected.value && !controller.kr_isLatency.value) {
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
KRLogUtil.kr_i('🔄 节点列表显示 - 自动触发延迟测试', tag: 'NodeListView');
|
if (!controller.kr_isConnected.value && !controller.kr_isLatency.value && !_hasTriggeredAutoTest) {
|
||||||
controller.kr_urlTest();
|
_hasTriggeredAutoTest = true; // 标记已触发
|
||||||
}
|
KRLogUtil.kr_i('🔄 节点列表显示 - 自动触发延迟测试(首次)', tag: 'NodeListView');
|
||||||
});
|
controller.kr_urlTest();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
return _kr_buildListContainer(
|
return _kr_buildListContainer(
|
||||||
context,
|
context,
|
||||||
child: ListView(
|
child: ListView(
|
||||||
padding: EdgeInsets.fromLTRB(16.w, 0, 16.w, 0),
|
padding: EdgeInsets.fromLTRB(16, 0, 16, 0),
|
||||||
children: [
|
children: [
|
||||||
// 延迟测试按钮作为第一个列表项
|
// 延迟测试按钮作为第一个列表项
|
||||||
InkWell(
|
InkWell(
|
||||||
onTap: () => controller.kr_urlTest(),
|
onTap: () => controller.kr_urlTest(),
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.symmetric(vertical: 8.w),
|
padding: EdgeInsets.symmetric(vertical: 8),
|
||||||
margin: EdgeInsets.only(top: 8.w), // 添加上方间距
|
margin: EdgeInsets.only(top: 8), // 添加上方间距
|
||||||
child: Row(
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
width: 36.w,
|
width: 36,
|
||||||
height: 36.w,
|
height: 36,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: krModernGreenLight.withOpacity(0.1),
|
color: krModernGreenLight.withOpacity(0.1),
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
@@ -682,17 +685,17 @@ class KRHomeNodeListView extends GetView<KRHomeController> {
|
|||||||
child: controller.kr_isLatency.value
|
child: controller.kr_isLatency.value
|
||||||
? KRSimpleLoading(
|
? KRSimpleLoading(
|
||||||
color: krModernGreen,
|
color: krModernGreen,
|
||||||
size: 24.w,
|
size: 24,
|
||||||
duration: const Duration(milliseconds: 800),
|
duration: const Duration(milliseconds: 800),
|
||||||
)
|
)
|
||||||
: Icon(
|
: Icon(
|
||||||
Icons.speed,
|
Icons.speed,
|
||||||
size: 24.w,
|
size: 24,
|
||||||
color: krModernGreen,
|
color: krModernGreen,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width: 8.w),
|
SizedBox(width: 8),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
@@ -719,7 +722,7 @@ class KRHomeNodeListView extends GetView<KRHomeController> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (!controller.kr_isLatency.value) ...[
|
if (!controller.kr_isLatency.value) ...[
|
||||||
SizedBox(height: 2.w),
|
SizedBox(height: 2),
|
||||||
Text(
|
Text(
|
||||||
AppTranslations.kr_home.refreshLatencyDesc,
|
AppTranslations.kr_home.refreshLatencyDesc,
|
||||||
style: KrAppTextStyle(
|
style: KrAppTextStyle(
|
||||||
@@ -737,7 +740,7 @@ class KRHomeNodeListView extends GetView<KRHomeController> {
|
|||||||
if (!controller.kr_isLatency.value)
|
if (!controller.kr_isLatency.value)
|
||||||
Icon(
|
Icon(
|
||||||
Icons.arrow_forward_ios,
|
Icons.arrow_forward_ios,
|
||||||
size: 12.w,
|
size: 12,
|
||||||
color: Theme.of(context).textTheme.bodySmall?.color,
|
color: Theme.of(context).textTheme.bodySmall?.color,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -746,7 +749,7 @@ class KRHomeNodeListView extends GetView<KRHomeController> {
|
|||||||
),
|
),
|
||||||
// 分隔线
|
// 分隔线
|
||||||
Divider(
|
Divider(
|
||||||
height: 16.w,
|
height: 16,
|
||||||
color: Theme.of(context).dividerColor.withOpacity(0.1),
|
color: Theme.of(context).dividerColor.withOpacity(0.1),
|
||||||
),
|
),
|
||||||
// Auto 选项
|
// Auto 选项
|
||||||
@@ -766,19 +769,19 @@ class KRHomeNodeListView extends GetView<KRHomeController> {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.symmetric(vertical: 8.w),
|
padding: EdgeInsets.symmetric(vertical: 8),
|
||||||
child: Row(
|
child: Row(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
KrLocalImage(
|
KrLocalImage(
|
||||||
imageName: "home_list_location",
|
imageName: "home_list_location",
|
||||||
width: 36.w,
|
width: 36,
|
||||||
height: 36.w,
|
height: 36,
|
||||||
color: controller.kr_cutTag.value == 'auto'
|
color: controller.kr_cutTag.value == 'auto'
|
||||||
? Colors.green
|
? Colors.green
|
||||||
: null,
|
: null,
|
||||||
),
|
),
|
||||||
SizedBox(width: 8.w),
|
SizedBox(width: 8),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
@@ -799,13 +802,13 @@ class KRHomeNodeListView extends GetView<KRHomeController> {
|
|||||||
),
|
),
|
||||||
if (controller.kr_cutTag.value == 'auto')
|
if (controller.kr_cutTag.value == 'auto')
|
||||||
Container(
|
Container(
|
||||||
margin: EdgeInsets.only(left: 4.w),
|
margin: EdgeInsets.only(left: 4),
|
||||||
padding: EdgeInsets.symmetric(
|
padding: EdgeInsets.symmetric(
|
||||||
horizontal: 4.w, vertical: 1.w),
|
horizontal: 4, vertical: 1),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color:
|
color:
|
||||||
krModernGreenLight.withOpacity(0.1),
|
krModernGreenLight.withOpacity(0.1),
|
||||||
borderRadius: BorderRadius.circular(4.w),
|
borderRadius: BorderRadius.circular(4),
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
AppTranslations.kr_home.selected,
|
AppTranslations.kr_home.selected,
|
||||||
@@ -818,7 +821,7 @@ class KRHomeNodeListView extends GetView<KRHomeController> {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 2.w),
|
SizedBox(height: 2),
|
||||||
Obx(() {
|
Obx(() {
|
||||||
// 获取当前自动选择的节点
|
// 获取当前自动选择的节点
|
||||||
String selectedNode =
|
String selectedNode =
|
||||||
@@ -894,7 +897,7 @@ class KRHomeNodeListView extends GetView<KRHomeController> {
|
|||||||
),
|
),
|
||||||
// 分隔线
|
// 分隔线
|
||||||
Divider(
|
Divider(
|
||||||
height: 16.w,
|
height: 16,
|
||||||
color: Theme.of(context).dividerColor.withOpacity(0.1),
|
color: Theme.of(context).dividerColor.withOpacity(0.1),
|
||||||
),
|
),
|
||||||
// 节点列表
|
// 节点列表
|
||||||
@@ -920,7 +923,7 @@ class KRHomeNodeListView extends GetView<KRHomeController> {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.symmetric(vertical: 4.w),
|
padding: EdgeInsets.symmetric(vertical: 4),
|
||||||
child: _kr_buildNodeListItem(
|
child: _kr_buildNodeListItem(
|
||||||
context,
|
context,
|
||||||
item: node,
|
item: node,
|
||||||
@@ -930,7 +933,7 @@ class KRHomeNodeListView extends GetView<KRHomeController> {
|
|||||||
if (node !=
|
if (node !=
|
||||||
controller.kr_subscribeService.allList.last)
|
controller.kr_subscribeService.allList.last)
|
||||||
Divider(
|
Divider(
|
||||||
height: 1.w,
|
height: 1,
|
||||||
color: Theme.of(context)
|
color: Theme.of(context)
|
||||||
.dividerColor
|
.dividerColor
|
||||||
.withOpacity(0.1),
|
.withOpacity(0.1),
|
||||||
|
|||||||
@@ -16,16 +16,16 @@ class KRHomeTrialCard extends GetView<KRHomeController> {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Container(
|
return Container(
|
||||||
margin: EdgeInsets.symmetric(horizontal: 16.w),
|
margin: EdgeInsets.symmetric(horizontal: 16),
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
decoration: ShapeDecoration(
|
decoration: ShapeDecoration(
|
||||||
color: Theme.of(context).cardColor,
|
color: Theme.of(context).cardColor,
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(16.w),
|
borderRadius: BorderRadius.circular(16),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: EdgeInsets.all(14.w),
|
padding: EdgeInsets.all(14),
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
@@ -55,7 +55,7 @@ class KRHomeTrialCard extends GetView<KRHomeController> {
|
|||||||
),
|
),
|
||||||
Icon(
|
Icon(
|
||||||
Icons.arrow_forward_ios,
|
Icons.arrow_forward_ios,
|
||||||
size: 12.w,
|
size: 12,
|
||||||
color: Colors.blue,
|
color: Colors.blue,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -65,14 +65,14 @@ class KRHomeTrialCard extends GetView<KRHomeController> {
|
|||||||
),
|
),
|
||||||
|
|
||||||
// 倒计时显示
|
// 倒计时显示
|
||||||
SizedBox(height: 10.w),
|
SizedBox(height: 10),
|
||||||
Row(
|
Row(
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
padding: EdgeInsets.all(8.w),
|
padding: EdgeInsets.all(8),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.blue.withOpacity(0.1),
|
color: Colors.blue.withOpacity(0.1),
|
||||||
borderRadius: BorderRadius.circular(8.w),
|
borderRadius: BorderRadius.circular(8),
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
@@ -80,9 +80,9 @@ class KRHomeTrialCard extends GetView<KRHomeController> {
|
|||||||
Icon(
|
Icon(
|
||||||
Icons.timer_outlined,
|
Icons.timer_outlined,
|
||||||
color: Colors.blue,
|
color: Colors.blue,
|
||||||
size: 16.w,
|
size: 16,
|
||||||
),
|
),
|
||||||
SizedBox(width: 4.w),
|
SizedBox(width: 4),
|
||||||
Text(
|
Text(
|
||||||
AppTranslations.kr_home.trialing,
|
AppTranslations.kr_home.trialing,
|
||||||
style: KrAppTextStyle(
|
style: KrAppTextStyle(
|
||||||
@@ -94,7 +94,7 @@ class KRHomeTrialCard extends GetView<KRHomeController> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(width: 12.w),
|
SizedBox(width: 12),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
@@ -133,7 +133,7 @@ class KRHomeTrialCard extends GetView<KRHomeController> {
|
|||||||
: Theme.of(context).textTheme.bodyMedium?.color,
|
: Theme.of(context).textTheme.bodyMedium?.color,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 4.w),
|
SizedBox(height: 4.h),
|
||||||
Text(
|
Text(
|
||||||
AppTranslations.kr_home.trialEndMessage,
|
AppTranslations.kr_home.trialEndMessage,
|
||||||
style: KrAppTextStyle(
|
style: KrAppTextStyle(
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import 'package:latlong2/latlong.dart';
|
|||||||
import '../../../utils/kr_fm_tc.dart';
|
import '../../../utils/kr_fm_tc.dart';
|
||||||
import '../controllers/kr_home_controller.dart';
|
import '../controllers/kr_home_controller.dart';
|
||||||
import '../../../utils/kr_log_util.dart';
|
import '../../../utils/kr_log_util.dart';
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
|
|
||||||
/// 首页地图视图组件
|
/// 首页地图视图组件
|
||||||
class KRHomeMapView extends GetView<KRHomeController> {
|
class KRHomeMapView extends GetView<KRHomeController> {
|
||||||
@@ -187,12 +188,16 @@ return GetBuilder<KRHomeController>(
|
|||||||
|
|
||||||
/// 构建样式化的标记
|
/// 构建样式化的标记
|
||||||
Marker _buildStyledMarker(dynamic node) {
|
Marker _buildStyledMarker(dynamic node) {
|
||||||
print("原始Marker:${node}");
|
if (kDebugMode) {
|
||||||
|
print("原始Marker:${node}");
|
||||||
|
}
|
||||||
int type = 0;
|
int type = 0;
|
||||||
MaterialColor markerColor = Colors.grey;
|
MaterialColor markerColor = Colors.grey;
|
||||||
//如果没订阅过,就是灰色
|
//如果没订阅过,就是灰色
|
||||||
bool status = controller.kr_isConnected.value;
|
bool status = controller.kr_isConnected.value;
|
||||||
print("连接状态:$status");
|
if (kDebugMode) {
|
||||||
|
print("连接状态:$status");
|
||||||
|
}
|
||||||
if(status){
|
if(status){
|
||||||
if (node.urlTestDelay.value == 0) {
|
if (node.urlTestDelay.value == 0) {
|
||||||
// 延迟为0时使用默认颜色
|
// 延迟为0时使用默认颜色
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ class KRSubscribeSelectorView extends StatelessWidget {
|
|||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 12.w),
|
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 12.h),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.blue.withOpacity(0.05),
|
color: Colors.blue.withOpacity(0.05),
|
||||||
borderRadius: BorderRadius.only(
|
borderRadius: BorderRadius.only(
|
||||||
@@ -78,7 +78,7 @@ class KRSubscribeSelectorView extends StatelessWidget {
|
|||||||
final subscribes = homeController.kr_subscribeService.kr_availableSubscribes;
|
final subscribes = homeController.kr_subscribeService.kr_availableSubscribes;
|
||||||
if (subscribes.isEmpty) {
|
if (subscribes.isEmpty) {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: EdgeInsets.symmetric(vertical: 16.w, horizontal: 12.w),
|
padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 12.w),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Icon(
|
Icon(
|
||||||
@@ -86,7 +86,7 @@ class KRSubscribeSelectorView extends StatelessWidget {
|
|||||||
size: 48.w,
|
size: 48.w,
|
||||||
color: Theme.of(context).textTheme.bodyLarge?.color?.withOpacity(0.3),
|
color: Theme.of(context).textTheme.bodyLarge?.color?.withOpacity(0.3),
|
||||||
),
|
),
|
||||||
SizedBox(height: 12.w),
|
SizedBox(height: 12.h),
|
||||||
Text(
|
Text(
|
||||||
AppTranslations.kr_purchaseMembership.noData,
|
AppTranslations.kr_purchaseMembership.noData,
|
||||||
style: KrAppTextStyle(
|
style: KrAppTextStyle(
|
||||||
@@ -105,7 +105,7 @@ class KRSubscribeSelectorView extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
child: ListView.builder(
|
child: ListView.builder(
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
padding: EdgeInsets.symmetric(vertical: 4.w, horizontal: 4.w),
|
padding: EdgeInsets.symmetric(vertical: 4.h, horizontal: 4.w),
|
||||||
itemCount: subscribes.length,
|
itemCount: subscribes.length,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
final subscribe = subscribes[index];
|
final subscribe = subscribes[index];
|
||||||
@@ -123,7 +123,7 @@ class KRSubscribeSelectorView extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
SizedBox(height: 8.w),
|
SizedBox(height: 8.h),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -159,7 +159,7 @@ class _SubscribeItem extends StatelessWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 2.w),
|
padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 2.h),
|
||||||
child: Material(
|
child: Material(
|
||||||
color: Colors.transparent,
|
color: Colors.transparent,
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
@@ -199,7 +199,7 @@ class _SubscribeItem extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
if (isCurrent)
|
if (isCurrent)
|
||||||
Container(
|
Container(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 2.w),
|
padding: EdgeInsets.symmetric(horizontal: 8.w, vertical: 2.h),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.blue,
|
color: Colors.blue,
|
||||||
borderRadius: BorderRadius.circular(16.r),
|
borderRadius: BorderRadius.circular(16.r),
|
||||||
@@ -222,7 +222,7 @@ class _SubscribeItem extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
SizedBox(height: 8.w),
|
SizedBox(height: 8.h),
|
||||||
Text(
|
Text(
|
||||||
isUnlimited
|
isUnlimited
|
||||||
? AppTranslations.kr_purchaseMembership.unlimitedTraffic
|
? AppTranslations.kr_purchaseMembership.unlimitedTraffic
|
||||||
@@ -234,7 +234,7 @@ class _SubscribeItem extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
if (!isUnlimited) ...[
|
if (!isUnlimited) ...[
|
||||||
SizedBox(height: 8.w),
|
SizedBox(height: 8.h),
|
||||||
ClipRRect(
|
ClipRRect(
|
||||||
borderRadius: BorderRadius.circular(4.r),
|
borderRadius: BorderRadius.circular(4.r),
|
||||||
child: LinearProgressIndicator(
|
child: LinearProgressIndicator(
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
||||||
import 'package:kaer_with_panels/app/localization/app_translations.dart';
|
import 'package:kaer_with_panels/app/localization/app_translations.dart';
|
||||||
|
|
||||||
import 'package:kaer_with_panels/app/routes/app_pages.dart';
|
import 'package:kaer_with_panels/app/routes/app_pages.dart';
|
||||||
import 'package:kaer_with_panels/app/utils/kr_subscribe_navigation_util.dart';
|
import 'package:kaer_with_panels/app/utils/kr_subscribe_navigation_util.dart';
|
||||||
|
|
||||||
import '../../../widgets/kr_app_text_style.dart';
|
import '../../../widgets/kr_app_text_style.dart';
|
||||||
|
|
||||||
/// 订阅卡片组件
|
/// 订阅卡片组件
|
||||||
@@ -24,63 +21,72 @@ class KRSubscriptionCard extends StatelessWidget {
|
|||||||
|
|
||||||
// 构建订阅卡片
|
// 构建订阅卡片
|
||||||
Widget _kr_buildSubscriptionCard(BuildContext context) {
|
Widget _kr_buildSubscriptionCard(BuildContext context) {
|
||||||
|
// 🔧 关键修复:完全移除 ScreenUtil,使用固定像素值避免缩放问题
|
||||||
return Container(
|
return Container(
|
||||||
|
// 添加固定高度,确保卡片可见
|
||||||
|
constraints: const BoxConstraints(minHeight: 200),
|
||||||
|
padding: const EdgeInsets.all(16),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Theme.of(context).cardColor,
|
color: Theme.of(context).cardColor,
|
||||||
borderRadius: BorderRadius.circular(12.w),
|
borderRadius: BorderRadius.circular(12),
|
||||||
),
|
),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
|
// 图标
|
||||||
Container(
|
Container(
|
||||||
width: 44.w,
|
width: 48,
|
||||||
height: 44.w,
|
height: 48,
|
||||||
margin: EdgeInsets.only(top: 16.h),
|
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.blue.withOpacity(0.1),
|
color: Colors.blue.withOpacity(0.1),
|
||||||
shape: BoxShape.circle,
|
shape: BoxShape.circle,
|
||||||
),
|
),
|
||||||
child: Icon(
|
child: const Icon(
|
||||||
Icons.language,
|
Icons.language,
|
||||||
color: Colors.blue,
|
color: Colors.blue,
|
||||||
size: 26.w,
|
size: 28,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 12.h),
|
const SizedBox(height: 16),
|
||||||
|
// 描述文字
|
||||||
Padding(
|
Padding(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||||
child: Text(
|
child: Text(
|
||||||
AppTranslations.kr_home.subscriptionDescription,
|
AppTranslations.kr_home.subscriptionDescription,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: KrAppTextStyle(
|
style: TextStyle(
|
||||||
fontSize: 14,
|
fontSize: 15,
|
||||||
fontWeight: FontWeight.w400,
|
fontWeight: FontWeight.w400,
|
||||||
color: Theme.of(context).textTheme.bodyMedium?.color,
|
height: 1.5,
|
||||||
|
// 🔧 关键修复:确保文本颜色可见
|
||||||
|
color: Theme.of(context).brightness == Brightness.dark
|
||||||
|
? Colors.white
|
||||||
|
: Colors.black87,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 16.h),
|
const SizedBox(height: 20),
|
||||||
Padding(
|
// 订阅按钮
|
||||||
padding: EdgeInsets.fromLTRB(16.w, 0, 16.w, 16.h),
|
SizedBox(
|
||||||
child: SizedBox(
|
width: double.infinity,
|
||||||
width: double.infinity,
|
height: 46,
|
||||||
height: 42.h,
|
child: ElevatedButton(
|
||||||
child: ElevatedButton(
|
onPressed: () {
|
||||||
onPressed: () => KRSubscribeNavigationUtil.navigateToPurchase(tag: 'SubscriptionCard'),
|
KRSubscribeNavigationUtil.navigateToPurchase(tag: 'SubscriptionCard');
|
||||||
style: ElevatedButton.styleFrom(
|
},
|
||||||
backgroundColor: Colors.blue,
|
style: ElevatedButton.styleFrom(
|
||||||
elevation: 0,
|
backgroundColor: Colors.blue,
|
||||||
shape: RoundedRectangleBorder(
|
elevation: 0,
|
||||||
borderRadius: BorderRadius.circular(8.r),
|
shape: RoundedRectangleBorder(
|
||||||
),
|
borderRadius: BorderRadius.circular(8),
|
||||||
),
|
),
|
||||||
child: Text(
|
),
|
||||||
AppTranslations.kr_home.subscribe,
|
child: Text(
|
||||||
style: KrAppTextStyle(
|
AppTranslations.kr_home.subscribe,
|
||||||
fontSize: 16,
|
style: const TextStyle(
|
||||||
fontWeight: FontWeight.w500,
|
fontSize: 16,
|
||||||
color: Colors.white,
|
fontWeight: FontWeight.w500,
|
||||||
),
|
color: Colors.white,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -97,10 +103,10 @@ class KRSubscriptionCard extends StatelessWidget {
|
|||||||
bool addBottomPadding = true,
|
bool addBottomPadding = true,
|
||||||
}) {
|
}) {
|
||||||
return Container(
|
return Container(
|
||||||
margin: margin ?? EdgeInsets.symmetric(horizontal: 16.w),
|
margin: margin ?? EdgeInsets.symmetric(horizontal: 16),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Theme.of(context).cardColor,
|
color: Theme.of(context).cardColor,
|
||||||
borderRadius: BorderRadius.circular(12.w),
|
borderRadius: BorderRadius.circular(12),
|
||||||
),
|
),
|
||||||
child: IntrinsicWidth(
|
child: IntrinsicWidth(
|
||||||
child: child,
|
child: child,
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ class KRInviteController extends GetxController {
|
|||||||
borderRadius: BorderRadius.circular(16.r),
|
borderRadius: BorderRadius.circular(16.r),
|
||||||
),
|
),
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 20.w, vertical: 24.w),
|
padding: EdgeInsets.symmetric(horizontal: 20.w, vertical: 24.h),
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
@@ -170,7 +170,7 @@ class KRInviteController extends GetxController {
|
|||||||
color: Theme.of(Get.context!).textTheme.titleMedium?.color,
|
color: Theme.of(Get.context!).textTheme.titleMedium?.color,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 16.w),
|
SizedBox(height: 16.h),
|
||||||
Container(
|
Container(
|
||||||
padding: EdgeInsets.all(16.w),
|
padding: EdgeInsets.all(16.w),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
@@ -195,7 +195,7 @@ class KRInviteController extends GetxController {
|
|||||||
foregroundColor: Colors.black,
|
foregroundColor: Colors.black,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 20.w),
|
SizedBox(height: 20.h),
|
||||||
Container(
|
Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: 44.w,
|
height: 44.w,
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
import 'package:kaer_with_panels/app/common/app_config.dart';
|
||||||
import 'package:kaer_with_panels/app/localization/app_translations.dart';
|
import 'package:kaer_with_panels/app/localization/app_translations.dart';
|
||||||
import 'package:kaer_with_panels/app/widgets/kr_local_image.dart';
|
import 'package:kaer_with_panels/app/widgets/kr_local_image.dart';
|
||||||
import '../controllers/kr_invite_controller.dart';
|
import '../controllers/kr_invite_controller.dart';
|
||||||
|
|||||||
@@ -75,6 +75,9 @@ class KRLoginController extends GetxController
|
|||||||
/// 登陆进度状态
|
/// 登陆进度状态
|
||||||
var kr_loginStatus = KRLoginProgressStatus.kr_registerSendCode.obs;
|
var kr_loginStatus = KRLoginProgressStatus.kr_registerSendCode.obs;
|
||||||
|
|
||||||
|
/// 是否使用密码登录(手机号模式下有效:true=密码登录,false=验证码登录)
|
||||||
|
var kr_isPasswordLogin = true.obs;
|
||||||
|
|
||||||
/// 验证码倒计时
|
/// 验证码倒计时
|
||||||
var _countdown = 60; // 倒计时初始值
|
var _countdown = 60; // 倒计时初始值
|
||||||
late Timer _timer;
|
late Timer _timer;
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import 'package:kaer_with_panels/app/widgets/hi_help_entrance.dart';
|
|||||||
import 'package:kaer_with_panels/app/common/app_run_data.dart';
|
import 'package:kaer_with_panels/app/common/app_run_data.dart';
|
||||||
import 'package:kaer_with_panels/app/modules/kr_home/controllers/kr_home_controller.dart';
|
import 'package:kaer_with_panels/app/modules/kr_home/controllers/kr_home_controller.dart';
|
||||||
import 'package:kaer_with_panels/app/services/kr_site_config_service.dart';
|
import 'package:kaer_with_panels/app/services/kr_site_config_service.dart';
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
|
|
||||||
class KRLoginView extends GetView<KRLoginController> {
|
class KRLoginView extends GetView<KRLoginController> {
|
||||||
const KRLoginView({super.key});
|
const KRLoginView({super.key});
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ class KRSearchAreaView extends GetView<KRSearchAreaController> {
|
|||||||
onTap: () {}, // 阻止点击事件传递到背景
|
onTap: () {}, // 阻止点击事件传递到背景
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 300.w,
|
width: 300.w,
|
||||||
height: 450.w,
|
height: 450.h,
|
||||||
padding: EdgeInsets.all(16.w),
|
padding: EdgeInsets.all(16.w),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: theme.primaryColor,
|
color: theme.primaryColor,
|
||||||
@@ -46,18 +46,18 @@ class KRSearchAreaView extends GetView<KRSearchAreaController> {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
'选择其他地区',
|
'login.selectOtherRegion'.tr,
|
||||||
style: KrAppTextStyle(
|
style: KrAppTextStyle(
|
||||||
fontSize: 15.w,
|
fontSize: 15.w,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
color: theme.textTheme.titleMedium?.color),
|
color: theme.textTheme.titleMedium?.color),
|
||||||
),
|
),
|
||||||
SizedBox(height: 10.w),
|
SizedBox(height: 10.h),
|
||||||
TextField(
|
TextField(
|
||||||
onChanged: (value) => controller.searchQuery.value = value,
|
onChanged: (value) => controller.searchQuery.value = value,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
prefixIcon: Icon(Icons.search, color: Colors.grey),
|
prefixIcon: Icon(Icons.search, color: Colors.grey),
|
||||||
hintText: '搜索',
|
hintText: 'login.search'.tr,
|
||||||
hintStyle: TextStyle(color: Colors.grey),
|
hintStyle: TextStyle(color: Colors.grey),
|
||||||
filled: true,
|
filled: true,
|
||||||
// fillColor: Colors.grey.shade200,
|
// fillColor: Colors.grey.shade200,
|
||||||
@@ -65,11 +65,11 @@ class KRSearchAreaView extends GetView<KRSearchAreaController> {
|
|||||||
borderRadius: BorderRadius.circular(8.w),
|
borderRadius: BorderRadius.circular(8.w),
|
||||||
borderSide: BorderSide.none,
|
borderSide: BorderSide.none,
|
||||||
),
|
),
|
||||||
contentPadding: EdgeInsets.symmetric(vertical: 10.w),
|
contentPadding: EdgeInsets.symmetric(vertical: 10.h),
|
||||||
),
|
),
|
||||||
style: theme.textTheme.bodyMedium?.copyWith(fontSize: 14.sp, fontFamily: 'AlibabaPuHuiTi-Regular',),
|
style: theme.textTheme.bodyMedium?.copyWith(fontSize: 14.sp, fontFamily: 'AlibabaPuHuiTi-Regular',),
|
||||||
),
|
),
|
||||||
// SizedBox(height: 5.w),
|
// SizedBox(height: 5.h),
|
||||||
Obx(() => Expanded(
|
Obx(() => Expanded(
|
||||||
child: ListView.builder(
|
child: ListView.builder(
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
@@ -84,7 +84,7 @@ class KRSearchAreaView extends GetView<KRSearchAreaController> {
|
|||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
padding: EdgeInsets.symmetric(
|
padding: EdgeInsets.symmetric(
|
||||||
vertical: 10.w, horizontal: 0),
|
vertical: 10.h, horizontal: 0),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border(
|
border: Border(
|
||||||
bottom: BorderSide(
|
bottom: BorderSide(
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
import 'package:flutter/foundation.dart' show kDebugMode;
|
||||||
import 'package:kaer_with_panels/app/modules/kr_home/controllers/kr_home_controller.dart';
|
import 'package:kaer_with_panels/app/modules/kr_home/controllers/kr_home_controller.dart';
|
||||||
import 'package:kaer_with_panels/app/modules/kr_invite/controllers/kr_invite_controller.dart';
|
import 'package:kaer_with_panels/app/modules/kr_invite/controllers/kr_invite_controller.dart';
|
||||||
import 'package:kaer_with_panels/app/modules/kr_login/controllers/kr_login_controller.dart';
|
import 'package:kaer_with_panels/app/modules/kr_login/controllers/kr_login_controller.dart';
|
||||||
@@ -10,15 +11,40 @@ import '../controllers/kr_main_controller.dart';
|
|||||||
class KRMainBinding extends Bindings {
|
class KRMainBinding extends Bindings {
|
||||||
@override
|
@override
|
||||||
void dependencies() {
|
void dependencies() {
|
||||||
|
if (kDebugMode) {
|
||||||
|
print('🔧 KRMainBinding.dependencies 被调用');
|
||||||
|
}
|
||||||
|
|
||||||
|
// 🔧 MainController 仍然使用 lazyPut,因为它由 MainView 触发
|
||||||
Get.lazyPut<KRMainController>(
|
Get.lazyPut<KRMainController>(
|
||||||
() => KRMainController(),
|
() {
|
||||||
|
if (kDebugMode) {
|
||||||
|
print('🏗️ 创建 KRMainController 实例');
|
||||||
|
}
|
||||||
|
return KRMainController();
|
||||||
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
Get.lazyPut(() => KRHomeController());
|
// 🔧 关键修复:使用 lazyPut 但设置为单例,避免重复创建
|
||||||
Get.lazyPut(() => KRLoginController());
|
// fenix: true 允许控制器在被删除后重新创建
|
||||||
|
// 使用 lazyPut 让 HomeController 在真正需要时才创建,避免过早初始化导致资源冲突
|
||||||
|
Get.lazyPut<KRHomeController>(
|
||||||
|
() {
|
||||||
|
if (kDebugMode) {
|
||||||
|
print('🏗️ 创建 KRHomeController 实例(仅此一次)');
|
||||||
|
}
|
||||||
|
return KRHomeController();
|
||||||
|
},
|
||||||
|
fenix: true,
|
||||||
|
);
|
||||||
|
|
||||||
|
Get.lazyPut(() => KRLoginController());
|
||||||
Get.lazyPut(() => KRInviteController());
|
Get.lazyPut(() => KRInviteController());
|
||||||
Get.lazyPut(() => KRUserInfoController());
|
Get.lazyPut(() => KRUserInfoController());
|
||||||
Get.lazyPut(() => KRStatisticsController());
|
Get.lazyPut(() => KRStatisticsController());
|
||||||
|
|
||||||
|
if (kDebugMode) {
|
||||||
|
print('✅ KRMainBinding.dependencies 完成');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
|
import 'package:flutter/foundation.dart' show kDebugMode;
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:kaer_with_panels/app/modules/kr_home/views/kr_home_view.dart';
|
import 'package:kaer_with_panels/app/modules/kr_home/views/kr_home_view.dart';
|
||||||
import 'package:kaer_with_panels/app/modules/kr_invite/views/kr_invite_view.dart';
|
import 'package:kaer_with_panels/app/modules/kr_invite/views/kr_invite_view.dart';
|
||||||
@@ -6,6 +7,10 @@ import 'package:kaer_with_panels/app/modules/kr_statistics/views/kr_statistics_v
|
|||||||
import 'package:kaer_with_panels/app/modules/kr_user_info/views/kr_user_info_view.dart';
|
import 'package:kaer_with_panels/app/modules/kr_user_info/views/kr_user_info_view.dart';
|
||||||
import 'package:kaer_with_panels/app/modules/kr_user_info/controllers/kr_user_info_controller.dart';
|
import 'package:kaer_with_panels/app/modules/kr_user_info/controllers/kr_user_info_controller.dart';
|
||||||
import 'package:kaer_with_panels/app/widgets/kr_keep_alive_wrapper.dart';
|
import 'package:kaer_with_panels/app/widgets/kr_keep_alive_wrapper.dart';
|
||||||
|
import 'package:kaer_with_panels/app/common/app_run_data.dart';
|
||||||
|
import 'package:kaer_with_panels/app/localization/app_translations.dart';
|
||||||
|
import 'package:kaer_with_panels/app/widgets/dialogs/kr_dialog.dart';
|
||||||
|
import 'package:kaer_with_panels/app/routes/app_pages.dart';
|
||||||
|
|
||||||
import '../../../widgets/kr_language_switch_dialog.dart';
|
import '../../../widgets/kr_language_switch_dialog.dart';
|
||||||
|
|
||||||
@@ -26,19 +31,33 @@ class KRMainController extends GetxController {
|
|||||||
static KRMainController get to => Get.find();
|
static KRMainController get to => Get.find();
|
||||||
DateTime? lastPopTime;
|
DateTime? lastPopTime;
|
||||||
var kr_currentIndex = 0.obs;
|
var kr_currentIndex = 0.obs;
|
||||||
final List<Widget> widgets = [
|
|
||||||
KRKeepAliveWrapper(KRHomeView()),
|
late final List<Widget> widgets;
|
||||||
KRKeepAliveWrapper(KRInviteView()),
|
|
||||||
KRKeepAliveWrapper(KRStatisticsView()),
|
|
||||||
KRKeepAliveWrapper(KRUserInfoView()),
|
|
||||||
];
|
|
||||||
|
|
||||||
/// 分页控制器
|
/// 分页控制器
|
||||||
PageController pageController = PageController(keepPage: true);
|
PageController pageController = PageController(keepPage: true);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() {
|
void onInit() {
|
||||||
super.onInit();
|
super.onInit();
|
||||||
|
|
||||||
|
// 🔧 诊断:在 onInit 中创建 widgets 列表
|
||||||
|
if (kDebugMode) {
|
||||||
|
print('🎬 KRMainController.onInit 被调用');
|
||||||
|
print('📝 开始创建 widgets 列表...');
|
||||||
|
}
|
||||||
|
|
||||||
|
widgets = [
|
||||||
|
KRKeepAliveWrapper(KRHomeView()),
|
||||||
|
KRKeepAliveWrapper(KRInviteView()),
|
||||||
|
KRKeepAliveWrapper(KRStatisticsView()),
|
||||||
|
KRKeepAliveWrapper(KRUserInfoView()),
|
||||||
|
];
|
||||||
|
|
||||||
|
if (kDebugMode) {
|
||||||
|
print('✅ widgets 列表创建完成,包含 ${widgets.length} 个页面');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -56,6 +75,35 @@ class KRMainController extends GetxController {
|
|||||||
|
|
||||||
/// 到哪个页面,具体传值查看MainRoutes的枚举类
|
/// 到哪个页面,具体传值查看MainRoutes的枚举类
|
||||||
kr_setPage(int index) {
|
kr_setPage(int index) {
|
||||||
|
// 🔒 检查邀请页面(index=1)是否需要登录
|
||||||
|
if (index == 1) {
|
||||||
|
final appRunData = KRAppRunData.getInstance();
|
||||||
|
final isDeviceLogin = appRunData.isDeviceLogin();
|
||||||
|
final isLoggedIn = appRunData.kr_isLogin.value && !isDeviceLogin;
|
||||||
|
|
||||||
|
// 如果是游客模式,弹出登录提示对话框,不切换页面
|
||||||
|
if (!isLoggedIn) {
|
||||||
|
KRDialog.show(
|
||||||
|
title: AppTranslations.kr_dialog.deviceLoginBindingTitle,
|
||||||
|
message: AppTranslations.kr_dialog.deviceLoginBindingMessage,
|
||||||
|
confirmText: AppTranslations.kr_dialog.kr_ok,
|
||||||
|
cancelText: AppTranslations.kr_dialog.kr_cancel,
|
||||||
|
onConfirm: () {
|
||||||
|
Get.back(); // 关闭对话框
|
||||||
|
// 延迟后跳转到登录页面
|
||||||
|
Future.delayed(const Duration(milliseconds: 300), () {
|
||||||
|
Get.toNamed(Routes.MR_LOGIN);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
onCancel: () {
|
||||||
|
Get.back(); // 关闭对话框
|
||||||
|
},
|
||||||
|
);
|
||||||
|
return; // 不切换页面
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 正常切换页面
|
||||||
kr_currentIndex.value = index;
|
kr_currentIndex.value = index;
|
||||||
pageController.jumpToPage(index);
|
pageController.jumpToPage(index);
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import '../../../utils/kr_event_bus.dart';
|
|||||||
import '../../../utils/kr_common_util.dart';
|
import '../../../utils/kr_common_util.dart';
|
||||||
import '../../../localization/app_translations.dart';
|
import '../../../localization/app_translations.dart';
|
||||||
import '../../../utils/kr_log_util.dart';
|
import '../../../utils/kr_log_util.dart';
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
|
|
||||||
/// 订单状态控制器(参考 Tauri 项目实现)
|
/// 订单状态控制器(参考 Tauri 项目实现)
|
||||||
class KROrderStatusController extends GetxController {
|
class KROrderStatusController extends GetxController {
|
||||||
@@ -71,12 +72,24 @@ class KROrderStatusController extends GetxController {
|
|||||||
@override
|
@override
|
||||||
void onInit() {
|
void onInit() {
|
||||||
super.onInit();
|
super.onInit();
|
||||||
print('═══════════════════════════════════════');
|
if (kDebugMode) {
|
||||||
print('📊 订单状态页面初始化');
|
print('═══════════════════════════════════════');
|
||||||
print(' 订单号: $kr_order');
|
}
|
||||||
print(' 支付方式: $kr_paymentType');
|
if (kDebugMode) {
|
||||||
print(' Checkout类型: $kr_checkoutType');
|
print('📊 订单状态页面初始化');
|
||||||
print('═══════════════════════════════════════');
|
}
|
||||||
|
if (kDebugMode) {
|
||||||
|
print(' 订单号: $kr_order');
|
||||||
|
}
|
||||||
|
if (kDebugMode) {
|
||||||
|
print(' 支付方式: $kr_paymentType');
|
||||||
|
}
|
||||||
|
if (kDebugMode) {
|
||||||
|
print(' Checkout类型: $kr_checkoutType');
|
||||||
|
}
|
||||||
|
if (kDebugMode) {
|
||||||
|
print('═══════════════════════════════════════');
|
||||||
|
}
|
||||||
|
|
||||||
// 立即查询一次订单状态,获取创建时间
|
// 立即查询一次订单状态,获取创建时间
|
||||||
kr_checkPaymentStatus();
|
kr_checkPaymentStatus();
|
||||||
@@ -92,7 +105,9 @@ class KROrderStatusController extends GetxController {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void onClose() {
|
void onClose() {
|
||||||
print('🔚 订单状态页面关闭,清理定时器');
|
if (kDebugMode) {
|
||||||
|
print('🔚 订单状态页面关闭,清理定时器');
|
||||||
|
}
|
||||||
kr_timer?.cancel();
|
kr_timer?.cancel();
|
||||||
kr_countdownTimer?.cancel();
|
kr_countdownTimer?.cancel();
|
||||||
super.onClose();
|
super.onClose();
|
||||||
@@ -100,7 +115,9 @@ class KROrderStatusController extends GetxController {
|
|||||||
|
|
||||||
/// 开始检查支付状态(参考 Tauri 项目:5秒轮询一次)
|
/// 开始检查支付状态(参考 Tauri 项目:5秒轮询一次)
|
||||||
void kr_startCheckingPaymentStatus() {
|
void kr_startCheckingPaymentStatus() {
|
||||||
print('🔄 启动支付状态轮询(每5秒检查一次)');
|
if (kDebugMode) {
|
||||||
|
print('🔄 启动支付状态轮询(每5秒检查一次)');
|
||||||
|
}
|
||||||
|
|
||||||
// 状态轮询:每5秒检查一次订单状态
|
// 状态轮询:每5秒检查一次订单状态
|
||||||
kr_timer = Timer.periodic(const Duration(seconds: 5), (timer) {
|
kr_timer = Timer.periodic(const Duration(seconds: 5), (timer) {
|
||||||
@@ -118,7 +135,9 @@ class KROrderStatusController extends GetxController {
|
|||||||
if (kr_orderCreatedAt == null) {
|
if (kr_orderCreatedAt == null) {
|
||||||
// 订单创建时间还未获取,显示默认倒计时
|
// 订单创建时间还未获取,显示默认倒计时
|
||||||
kr_formattedCountdown.value = '15:00';
|
kr_formattedCountdown.value = '15:00';
|
||||||
print('⏱️ 倒计时更新: 等待订单创建时间...');
|
if (kDebugMode) {
|
||||||
|
print('⏱️ 倒计时更新: 等待订单创建时间...');
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -128,12 +147,24 @@ class KROrderStatusController extends GetxController {
|
|||||||
|
|
||||||
final timeLeft = targetTime - now;
|
final timeLeft = targetTime - now;
|
||||||
|
|
||||||
print('⏱️ 倒计时调试信息:');
|
if (kDebugMode) {
|
||||||
print(' 当前时间(ms): $now');
|
print('⏱️ 倒计时调试信息:');
|
||||||
print(' 创建时间(ms): $createdAt');
|
}
|
||||||
print(' 目标时间(ms): $targetTime');
|
if (kDebugMode) {
|
||||||
print(' 剩余时间(ms): $timeLeft');
|
print(' 当前时间(ms): $now');
|
||||||
print(' 剩余时间(秒): ${(timeLeft / 1000).floor()}');
|
}
|
||||||
|
if (kDebugMode) {
|
||||||
|
print(' 创建时间(ms): $createdAt');
|
||||||
|
}
|
||||||
|
if (kDebugMode) {
|
||||||
|
print(' 目标时间(ms): $targetTime');
|
||||||
|
}
|
||||||
|
if (kDebugMode) {
|
||||||
|
print(' 剩余时间(ms): $timeLeft');
|
||||||
|
}
|
||||||
|
if (kDebugMode) {
|
||||||
|
print(' 剩余时间(秒): ${(timeLeft / 1000).floor()}');
|
||||||
|
}
|
||||||
|
|
||||||
if (timeLeft > 0) {
|
if (timeLeft > 0) {
|
||||||
kr_countdown.value = timeLeft;
|
kr_countdown.value = timeLeft;
|
||||||
@@ -141,7 +172,9 @@ class KROrderStatusController extends GetxController {
|
|||||||
final minutes = (timeLeft / 60000).floor();
|
final minutes = (timeLeft / 60000).floor();
|
||||||
final seconds = ((timeLeft % 60000) / 1000).floor();
|
final seconds = ((timeLeft % 60000) / 1000).floor();
|
||||||
kr_formattedCountdown.value = '${minutes.toString().padLeft(2, '0')}:${seconds.toString().padLeft(2, '0')}';
|
kr_formattedCountdown.value = '${minutes.toString().padLeft(2, '0')}:${seconds.toString().padLeft(2, '0')}';
|
||||||
print(' 格式化倒计时: ${kr_formattedCountdown.value}');
|
if (kDebugMode) {
|
||||||
|
print(' 格式化倒计时: ${kr_formattedCountdown.value}');
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// 倒计时结束,订单超时
|
// 倒计时结束,订单超时
|
||||||
kr_countdown.value = 0;
|
kr_countdown.value = 0;
|
||||||
@@ -149,7 +182,9 @@ class KROrderStatusController extends GetxController {
|
|||||||
kr_countdownTimer?.cancel();
|
kr_countdownTimer?.cancel();
|
||||||
kr_timer?.cancel();
|
kr_timer?.cancel();
|
||||||
|
|
||||||
print('⏱️ 订单支付超时(15分钟)');
|
if (kDebugMode) {
|
||||||
|
print('⏱️ 订单支付超时(15分钟)');
|
||||||
|
}
|
||||||
kr_statusTitle.value = AppTranslations.kr_orderStatus.closedTitle;
|
kr_statusTitle.value = AppTranslations.kr_orderStatus.closedTitle;
|
||||||
kr_statusDescription.value = AppTranslations.kr_orderStatus.timeoutMessage;
|
kr_statusDescription.value = AppTranslations.kr_orderStatus.timeoutMessage;
|
||||||
kr_isLoading.value = false;
|
kr_isLoading.value = false;
|
||||||
@@ -161,14 +196,18 @@ class KROrderStatusController extends GetxController {
|
|||||||
final now = DateTime.now().millisecondsSinceEpoch;
|
final now = DateTime.now().millisecondsSinceEpoch;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
print('🔍 检查订单状态 [${kr_order}]');
|
if (kDebugMode) {
|
||||||
|
print('🔍 检查订单状态 [${kr_order}]');
|
||||||
|
}
|
||||||
|
|
||||||
// 使用公开接口查询订单状态
|
// 使用公开接口查询订单状态
|
||||||
final result = await kr_subscribeApi.kr_queryOrderStatus(kr_order);
|
final result = await kr_subscribeApi.kr_queryOrderStatus(kr_order);
|
||||||
|
|
||||||
result.fold(
|
result.fold(
|
||||||
(error) {
|
(error) {
|
||||||
print('❌ 查询失败: ${error.msg}');
|
if (kDebugMode) {
|
||||||
|
print('❌ 查询失败: ${error.msg}');
|
||||||
|
}
|
||||||
KRLogUtil.kr_e('检查支付状态失败: ${error.msg}', tag: 'OrderStatusController');
|
KRLogUtil.kr_e('检查支付状态失败: ${error.msg}', tag: 'OrderStatusController');
|
||||||
kr_isLoading.value = false;
|
kr_isLoading.value = false;
|
||||||
kr_statusTitle.value = AppTranslations.kr_orderStatus.checkFailedTitle;
|
kr_statusTitle.value = AppTranslations.kr_orderStatus.checkFailedTitle;
|
||||||
@@ -186,13 +225,23 @@ class KROrderStatusController extends GetxController {
|
|||||||
isMilliseconds ? timestamp : timestamp * 1000
|
isMilliseconds ? timestamp : timestamp * 1000
|
||||||
);
|
);
|
||||||
|
|
||||||
print('📅 订单创建时间: ${kr_orderCreatedAt}');
|
if (kDebugMode) {
|
||||||
print('📅 原始时间戳: $timestamp');
|
print('📅 订单创建时间: ${kr_orderCreatedAt}');
|
||||||
print('📅 时间戳类型: ${isMilliseconds ? "毫秒级" : "秒级"}');
|
}
|
||||||
print('📅 转换后时间戳(ms): ${kr_orderCreatedAt!.millisecondsSinceEpoch}');
|
if (kDebugMode) {
|
||||||
|
print('📅 原始时间戳: $timestamp');
|
||||||
|
}
|
||||||
|
if (kDebugMode) {
|
||||||
|
print('📅 时间戳类型: ${isMilliseconds ? "毫秒级" : "秒级"}');
|
||||||
|
}
|
||||||
|
if (kDebugMode) {
|
||||||
|
print('📅 转换后时间戳(ms): ${kr_orderCreatedAt!.millisecondsSinceEpoch}');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print('📊 订单状态: ${kr_orderStatus.kr_status} (${_getStatusName(kr_orderStatus.kr_status)})');
|
if (kDebugMode) {
|
||||||
|
print('📊 订单状态: ${kr_orderStatus.kr_status} (${_getStatusName(kr_orderStatus.kr_status)})');
|
||||||
|
}
|
||||||
|
|
||||||
switch (kr_orderStatus.kr_status) {
|
switch (kr_orderStatus.kr_status) {
|
||||||
case kr_statusPending:
|
case kr_statusPending:
|
||||||
@@ -204,7 +253,9 @@ class KROrderStatusController extends GetxController {
|
|||||||
|
|
||||||
case kr_statusPaid:
|
case kr_statusPaid:
|
||||||
// 已支付状态,继续轮询直到完成
|
// 已支付状态,继续轮询直到完成
|
||||||
print('✅ 订单已支付,等待确认...');
|
if (kDebugMode) {
|
||||||
|
print('✅ 订单已支付,等待确认...');
|
||||||
|
}
|
||||||
kr_statusTitle.value = AppTranslations.kr_orderStatus.paidTitle;
|
kr_statusTitle.value = AppTranslations.kr_orderStatus.paidTitle;
|
||||||
kr_statusDescription.value = AppTranslations.kr_orderStatus.paidDescription;
|
kr_statusDescription.value = AppTranslations.kr_orderStatus.paidDescription;
|
||||||
kr_statusIcon.value = 'payment_success';
|
kr_statusIcon.value = 'payment_success';
|
||||||
@@ -212,7 +263,9 @@ class KROrderStatusController extends GetxController {
|
|||||||
|
|
||||||
case kr_statusFinished:
|
case kr_statusFinished:
|
||||||
// 订单完成
|
// 订单完成
|
||||||
print('🎉 订单完成!停止轮询');
|
if (kDebugMode) {
|
||||||
|
print('🎉 订单完成!停止轮询');
|
||||||
|
}
|
||||||
kr_isPaymentSuccess.value = true;
|
kr_isPaymentSuccess.value = true;
|
||||||
kr_isLoading.value = false;
|
kr_isLoading.value = false;
|
||||||
kr_timer?.cancel();
|
kr_timer?.cancel();
|
||||||
@@ -226,7 +279,9 @@ class KROrderStatusController extends GetxController {
|
|||||||
|
|
||||||
case kr_statusClose:
|
case kr_statusClose:
|
||||||
// 订单已关闭
|
// 订单已关闭
|
||||||
print('❌ 订单已关闭');
|
if (kDebugMode) {
|
||||||
|
print('❌ 订单已关闭');
|
||||||
|
}
|
||||||
kr_isLoading.value = false;
|
kr_isLoading.value = false;
|
||||||
kr_timer?.cancel();
|
kr_timer?.cancel();
|
||||||
kr_countdownTimer?.cancel();
|
kr_countdownTimer?.cancel();
|
||||||
@@ -237,7 +292,9 @@ class KROrderStatusController extends GetxController {
|
|||||||
|
|
||||||
case kr_statusFailed:
|
case kr_statusFailed:
|
||||||
// 支付失败
|
// 支付失败
|
||||||
print('❌ 支付失败');
|
if (kDebugMode) {
|
||||||
|
print('❌ 支付失败');
|
||||||
|
}
|
||||||
kr_isLoading.value = false;
|
kr_isLoading.value = false;
|
||||||
kr_timer?.cancel();
|
kr_timer?.cancel();
|
||||||
kr_countdownTimer?.cancel();
|
kr_countdownTimer?.cancel();
|
||||||
@@ -248,7 +305,9 @@ class KROrderStatusController extends GetxController {
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
// 未知状态
|
// 未知状态
|
||||||
print('⚠️ 未知状态: ${kr_orderStatus.kr_status}');
|
if (kDebugMode) {
|
||||||
|
print('⚠️ 未知状态: ${kr_orderStatus.kr_status}');
|
||||||
|
}
|
||||||
kr_isLoading.value = false;
|
kr_isLoading.value = false;
|
||||||
kr_timer?.cancel();
|
kr_timer?.cancel();
|
||||||
kr_countdownTimer?.cancel();
|
kr_countdownTimer?.cancel();
|
||||||
@@ -262,7 +321,9 @@ class KROrderStatusController extends GetxController {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
print('❌ 异常: $error');
|
if (kDebugMode) {
|
||||||
|
print('❌ 异常: $error');
|
||||||
|
}
|
||||||
KRLogUtil.kr_e('检查支付状态失败: $error', tag: 'OrderStatusController');
|
KRLogUtil.kr_e('检查支付状态失败: $error', tag: 'OrderStatusController');
|
||||||
kr_isLoading.value = false;
|
kr_isLoading.value = false;
|
||||||
kr_statusTitle.value = AppTranslations.kr_orderStatus.checkFailedTitle;
|
kr_statusTitle.value = AppTranslations.kr_orderStatus.checkFailedTitle;
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ import 'package:kaer_with_panels/app/utils/kr_common_util.dart';
|
|||||||
import 'package:kaer_with_panels/app/localization/app_translations.dart';
|
import 'package:kaer_with_panels/app/localization/app_translations.dart';
|
||||||
import 'package:kaer_with_panels/app/utils/kr_log_util.dart';
|
import 'package:kaer_with_panels/app/utils/kr_log_util.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
import 'dart:io';
|
||||||
|
import 'package:path_provider/path_provider.dart';
|
||||||
|
|
||||||
import '../../../common/app_run_data.dart';
|
import '../../../common/app_run_data.dart';
|
||||||
import '../../../common/app_config.dart';
|
import '../../../common/app_config.dart';
|
||||||
@@ -13,6 +15,8 @@ import '../../../model/response/kr_payment_methods.dart';
|
|||||||
import '../../../routes/app_pages.dart';
|
import '../../../routes/app_pages.dart';
|
||||||
import '../../../services/api_service/kr_api.user.dart';
|
import '../../../services/api_service/kr_api.user.dart';
|
||||||
import '../../../utils/kr_event_bus.dart';
|
import '../../../utils/kr_event_bus.dart';
|
||||||
|
import '../../../network/http_util.dart';
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
|
|
||||||
/// 会员购买控制器
|
/// 会员购买控制器
|
||||||
/// 负责处理会员套餐选择、支付方式选择和订阅流程
|
/// 负责处理会员套餐选择、支付方式选择和订阅流程
|
||||||
@@ -46,8 +50,28 @@ class KRPurchaseMembershipController extends GetxController {
|
|||||||
RxInt _kr_balance = 0.obs;
|
RxInt _kr_balance = 0.obs;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void onInit() {
|
void onInit() async {
|
||||||
super.onInit();
|
super.onInit();
|
||||||
|
print('💳 [PurchaseMembership] ========== Controller.onInit 被调用 ==========');
|
||||||
|
print('💳 [PurchaseMembership] 当前时间: ${DateTime.now()}');
|
||||||
|
|
||||||
|
// 🔧 紧急诊断:写文件确认购买页面Controller被初始化
|
||||||
|
try {
|
||||||
|
final dir = await getApplicationDocumentsDirectory();
|
||||||
|
final debugFile = File('${dir.path}/PURCHASE_CONTROLLER_DEBUG.txt');
|
||||||
|
await debugFile.writeAsString(
|
||||||
|
'=' * 60 + '\n'
|
||||||
|
'💳 PurchaseMembershipController.onInit 被调用!\n'
|
||||||
|
'时间: ${DateTime.now()}\n'
|
||||||
|
'版本标识: Android15_Fix_v6_Final\n'
|
||||||
|
'=' * 60 + '\n',
|
||||||
|
mode: FileMode.append,
|
||||||
|
);
|
||||||
|
print('💳 [PurchaseMembership] ✅ 调试日志已写入文件: ${debugFile.path}');
|
||||||
|
} catch (e) {
|
||||||
|
print('💳 [PurchaseMembership] ❌ 写入调试日志失败: $e');
|
||||||
|
}
|
||||||
|
|
||||||
kr_initializeData();
|
kr_initializeData();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,14 +83,24 @@ class KRPurchaseMembershipController extends GetxController {
|
|||||||
|
|
||||||
/// 初始化数据
|
/// 初始化数据
|
||||||
Future<void> kr_initializeData() async {
|
Future<void> kr_initializeData() async {
|
||||||
|
print('💳 [PurchaseMembership] initializeData 开始');
|
||||||
kr_userEmail.value = KRAppRunData.getInstance().kr_account.toString();
|
kr_userEmail.value = KRAppRunData.getInstance().kr_account.toString();
|
||||||
await kr_getPackageList();
|
print('💳 [PurchaseMembership] 用户邮箱: ${kr_userEmail.value}');
|
||||||
|
|
||||||
|
// 🔧 关键修复:不要在 onInit 中 await,让页面先显示,数据异步加载
|
||||||
|
// 这样可以避免 API 请求卡住导致页面无法显示
|
||||||
|
print('💳 [PurchaseMembership] 开始异步加载套餐数据...');
|
||||||
|
kr_getPackageList().catchError((e) {
|
||||||
|
print('💳 [PurchaseMembership] ❌ 加载套餐数据异常: $e');
|
||||||
|
KRLogUtil.kr_e('加载套餐数据失败: $e', tag: 'PurchaseMembership');
|
||||||
|
});
|
||||||
|
|
||||||
// 监听所有支付相关消息
|
// 监听所有支付相关消息
|
||||||
_kr_eventWorker = KREventBus().kr_listenMessages(
|
_kr_eventWorker = KREventBus().kr_listenMessages(
|
||||||
[KRMessageType.kr_payment, KRMessageType.kr_subscribe_update],
|
[KRMessageType.kr_payment, KRMessageType.kr_subscribe_update],
|
||||||
_kr_handleMessage,
|
_kr_handleMessage,
|
||||||
);
|
);
|
||||||
|
print('💳 [PurchaseMembership] initializeData 完成');
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 处理消息
|
/// 处理消息
|
||||||
@@ -93,23 +127,102 @@ class KRPurchaseMembershipController extends GetxController {
|
|||||||
|
|
||||||
/// 获取套餐列表和支付方式
|
/// 获取套餐列表和支付方式
|
||||||
Future<void> kr_getPackageList() async {
|
Future<void> kr_getPackageList() async {
|
||||||
|
print('💳 [PurchaseMembership] ========== 开始获取套餐列表 ==========');
|
||||||
|
print('💳 [PurchaseMembership] 当前时间: ${DateTime.now()}');
|
||||||
|
|
||||||
kr_isLoading.value = true;
|
kr_isLoading.value = true;
|
||||||
kr_selectedPlanIndex.value = 0; // 重置套餐选择
|
kr_selectedPlanIndex.value = 0; // 重置套餐选择
|
||||||
kr_selectedDiscountIndex.value = -1; // 重置折扣选择
|
kr_selectedDiscountIndex.value = -1; // 重置折扣选择
|
||||||
kr_selectedPaymentMethodIndex.value = -1; // 重置支付方式选择
|
kr_selectedPaymentMethodIndex.value = -1; // 重置支付方式选择
|
||||||
|
|
||||||
await _iniUserInfo();
|
try {
|
||||||
await kr_getAlreadySubscribe();
|
// 🔧 添加超时保护,避免 API 请求卡死
|
||||||
await kr_fetchPackages();
|
print('💳 [PurchaseMembership] 步骤1: 开始初始化用户信息...');
|
||||||
// await kr_fetchPaymentMethods(); // ⚠️ 后端暂未实现 /v1/app/payment/methods 接口
|
await _iniUserInfo().timeout(
|
||||||
|
const Duration(seconds: 5),
|
||||||
|
onTimeout: () {
|
||||||
|
print('💳 [PurchaseMembership] ⚠️ 初始化用户信息超时');
|
||||||
|
KRLogUtil.kr_w('初始化用户信息超时', tag: 'PurchaseMembership');
|
||||||
|
},
|
||||||
|
);
|
||||||
|
print('💳 [PurchaseMembership] ✓ 步骤1完成');
|
||||||
|
|
||||||
// 获取公开的支付方式
|
print('💳 [PurchaseMembership] 步骤2: 开始获取已订阅套餐...');
|
||||||
await _kr_fetchPublicPaymentMethods();
|
await kr_getAlreadySubscribe().timeout(
|
||||||
|
const Duration(seconds: 5),
|
||||||
|
onTimeout: () {
|
||||||
|
print('💳 [PurchaseMembership] ⚠️ 获取已订阅套餐超时');
|
||||||
|
KRLogUtil.kr_w('获取已订阅套餐超时', tag: 'PurchaseMembership');
|
||||||
|
},
|
||||||
|
);
|
||||||
|
print('💳 [PurchaseMembership] ✓ 步骤2完成');
|
||||||
|
|
||||||
// 根据套餐数量决定是否显示套餐选择器
|
print('💳 [PurchaseMembership] 步骤3: 开始获取套餐列表...');
|
||||||
kr_showPlanSelector.value = kr_plans.length > 1;
|
await kr_fetchPackages().timeout(
|
||||||
|
const Duration(seconds: 8),
|
||||||
|
onTimeout: () {
|
||||||
|
print('💳 [PurchaseMembership] ❌ 获取套餐列表超时');
|
||||||
|
KRLogUtil.kr_e('获取套餐列表超时', tag: 'PurchaseMembership');
|
||||||
|
KRCommonUtil.kr_showToast('获取套餐列表超时,请检查网络');
|
||||||
|
},
|
||||||
|
);
|
||||||
|
print('💳 [PurchaseMembership] ✓ 步骤3完成,套餐数量: ${kr_plans.length}');
|
||||||
|
|
||||||
kr_isLoading.value = false;
|
// 获取公开的支付方式
|
||||||
|
print('💳 [PurchaseMembership] 步骤4: 开始获取支付方式...');
|
||||||
|
await _kr_fetchPublicPaymentMethods().timeout(
|
||||||
|
const Duration(seconds: 5),
|
||||||
|
onTimeout: () {
|
||||||
|
print('💳 [PurchaseMembership] ⚠️ 获取支付方式超时');
|
||||||
|
KRLogUtil.kr_w('获取支付方式超时', tag: 'PurchaseMembership');
|
||||||
|
},
|
||||||
|
);
|
||||||
|
print('💳 [PurchaseMembership] ✓ 步骤4完成,支付方式数量: ${kr_paymentMethods.length}');
|
||||||
|
|
||||||
|
// 根据套餐数量决定是否显示套餐选择器
|
||||||
|
kr_showPlanSelector.value = kr_plans.length > 1;
|
||||||
|
print('💳 [PurchaseMembership] ========== 所有步骤完成 ==========');
|
||||||
|
} catch (e, stackTrace) {
|
||||||
|
print('💳 [PurchaseMembership] ❌❌❌ 获取套餐数据失败: $e');
|
||||||
|
print('💳 [PurchaseMembership] StackTrace: $stackTrace');
|
||||||
|
KRLogUtil.kr_e('获取套餐数据失败: $e', tag: 'PurchaseMembership');
|
||||||
|
|
||||||
|
// 🔧 关键修复:API失败时,尝试切换域名并重试
|
||||||
|
print('💳 [PurchaseMembership] 🔄 尝试切换域名并重试...');
|
||||||
|
bool domainSwitched = await KRDomain.kr_switchToNextDomain();
|
||||||
|
|
||||||
|
if (domainSwitched) {
|
||||||
|
print('💳 [PurchaseMembership] ✓ 域名切换成功,当前域名: ${KRDomain.kr_currentDomain}');
|
||||||
|
print('💳 [PurchaseMembership] 🔄 使用新域名重试...');
|
||||||
|
|
||||||
|
// 更新 HttpUtil 的 baseUrl
|
||||||
|
HttpUtil.getInstance().updateBaseUrl();
|
||||||
|
|
||||||
|
// 等待500ms让域名生效
|
||||||
|
await Future.delayed(const Duration(milliseconds: 500));
|
||||||
|
|
||||||
|
// 重试一次
|
||||||
|
try {
|
||||||
|
await kr_fetchPackages().timeout(
|
||||||
|
const Duration(seconds: 8),
|
||||||
|
onTimeout: () {
|
||||||
|
print('💳 [PurchaseMembership] ❌ 使用新域名后仍然超时');
|
||||||
|
KRLogUtil.kr_e('使用新域名后仍然超时', tag: 'PurchaseMembership');
|
||||||
|
},
|
||||||
|
);
|
||||||
|
print('💳 [PurchaseMembership] ✓ 使用新域名重试成功,套餐数量: ${kr_plans.length}');
|
||||||
|
} catch (retryError) {
|
||||||
|
print('💳 [PurchaseMembership] ❌ 使用新域名重试仍然失败: $retryError');
|
||||||
|
kr_errorMessage.value = '网络连接失败,请检查网络设置';
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
print('💳 [PurchaseMembership] ❌ 域名切换失败,所有域名都不可用');
|
||||||
|
kr_errorMessage.value = '无法连接服务器,请稍后重试';
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
kr_isLoading.value = false;
|
||||||
|
print('💳 [PurchaseMembership] 加载状态设置为: false');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 初始化用户信息
|
/// 初始化用户信息
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
||||||
import 'dart:io' show Platform;
|
import 'dart:io' show Platform;
|
||||||
import 'package:flutter/foundation.dart' show kIsWeb;
|
import 'package:flutter/foundation.dart' show kIsWeb;
|
||||||
|
|
||||||
@@ -16,6 +15,7 @@ import 'package:kaer_with_panels/app/widgets/dialogs/kr_dialog.dart';
|
|||||||
import 'package:kaer_with_panels/app/widgets/kr_local_image.dart';
|
import 'package:kaer_with_panels/app/widgets/kr_local_image.dart';
|
||||||
import 'package:kaer_with_panels/app/utils/kr_log_util.dart';
|
import 'package:kaer_with_panels/app/utils/kr_log_util.dart';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -555,11 +555,11 @@ class KRPurchaseMembershipView extends GetView<KRPurchaseMembershipController> {
|
|||||||
// 账号部分
|
// 账号部分
|
||||||
Widget _kr_buildAccountSection(BuildContext context) {
|
Widget _kr_buildAccountSection(BuildContext context) {
|
||||||
return Container(
|
return Container(
|
||||||
margin: EdgeInsets.all(16.r),
|
margin: EdgeInsets.all(16),
|
||||||
padding: EdgeInsets.all(16.r),
|
padding: EdgeInsets.all(16),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Theme.of(context).cardColor,
|
color: Theme.of(context).cardColor,
|
||||||
borderRadius: BorderRadius.circular(12.r),
|
borderRadius: BorderRadius.circular(12),
|
||||||
),
|
),
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
|
|||||||
@@ -248,7 +248,7 @@ class KRSettingView extends GetView<KRSettingController> {
|
|||||||
// 设备登录(游客模式),显示"点击这里登录/注册"
|
// 设备登录(游客模式),显示"点击这里登录/注册"
|
||||||
return _kr_buildActionTile(
|
return _kr_buildActionTile(
|
||||||
context,
|
context,
|
||||||
title: "登录/注册",
|
title: 'userInfo.loginRegister'.tr,
|
||||||
trailing: "",
|
trailing: "",
|
||||||
onTap: () => Get.toNamed(Routes.MR_LOGIN),
|
onTap: () => Get.toNamed(Routes.MR_LOGIN),
|
||||||
);
|
);
|
||||||
|
|||||||