mirror of
https://github.com/BeyondDimension/SteamTools.git
synced 2026-10-26 12:09:32 +08:00
Compare commits
2
Commits
2.7.0-pre1
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0286ed1e61 | ||
|
|
2921988a40 |
@@ -22,13 +22,13 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup .NET 6
|
||||
uses: actions/setup-dotnet@v2
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 6.0.x
|
||||
|
||||
@@ -49,7 +49,7 @@ jobs:
|
||||
|
||||
- name: Checkout Credentials repository
|
||||
if: ${{ matrix.os == 'windows-latest' && !startsWith(github.ref, 'refs/tags/') && github.event_name == 'push' }}
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: SteamTools-Team/Credentials
|
||||
token: ${{ secrets.REPO_TOKEN }}
|
||||
|
||||
@@ -22,13 +22,13 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup .NET 6
|
||||
uses: actions/setup-dotnet@v2
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 6.0.x
|
||||
|
||||
@@ -52,7 +52,7 @@ jobs:
|
||||
|
||||
- name: Checkout NSIS-Build repository
|
||||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: SteamTools-Team/NSIS-Build
|
||||
token: ${{ secrets.REPO_TOKEN }}
|
||||
@@ -60,7 +60,7 @@ jobs:
|
||||
|
||||
- name: Checkout Credentials repository
|
||||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: SteamTools-Team/Credentials
|
||||
token: ${{ secrets.REPO_TOKEN }}
|
||||
@@ -160,21 +160,21 @@ jobs:
|
||||
Copy-Item ".\src\ST.Client.Desktop.Avalonia.App\bin\${env:Configuration}\Publish\${env:ProjectName}_macos_arm64_v${{ steps.tag.outputs.tag }}.7z" "${env:PublishFilePath}"
|
||||
Write-Output "macos_arm64_SHA256=$(.\packaging\SHA256.ps1 ${env:PublishFilePath}\${env:ProjectName}_macos_arm64_v${{ steps.tag.outputs.tag }}.7z)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
|
||||
- name: Package linux-x64 tar.zst
|
||||
- name: Package linux-x64 7z
|
||||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
New-Item -ItemType Directory -Path ${env:PublishFilePath} -Force > $null
|
||||
Copy-Item ".\src\ST.Client.Desktop.Avalonia.App\bin\${env:Configuration}\Publish\${env:ProjectName}_linux_x64_v${{ steps.tag.outputs.tag }}.tar.zst" "${env:PublishFilePath}"
|
||||
Write-Output "linux_x64_SHA256=$(.\packaging\SHA256.ps1 ${env:PublishFilePath}\${env:ProjectName}_linux_x64_v${{ steps.tag.outputs.tag }}.tar.zst)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
Copy-Item ".\src\ST.Client.Desktop.Avalonia.App\bin\${env:Configuration}\Publish\${env:ProjectName}_linux_x64_v${{ steps.tag.outputs.tag }}.7z" "${env:PublishFilePath}"
|
||||
Write-Output "linux_x64_SHA256=$(.\packaging\SHA256.ps1 ${env:PublishFilePath}\${env:ProjectName}_linux_x64_v${{ steps.tag.outputs.tag }}.7z)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
|
||||
- name: Package linux-arm64 tar.zst
|
||||
- name: Package linux-arm64 7z
|
||||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
New-Item -ItemType Directory -Path ${env:PublishFilePath} -Force > $null
|
||||
Copy-Item ".\src\ST.Client.Desktop.Avalonia.App\bin\${env:Configuration}\Publish\${env:ProjectName}_linux_arm64_v${{ steps.tag.outputs.tag }}.tar.zst" "${env:PublishFilePath}"
|
||||
Write-Output "linux_arm64_SHA256=$(.\packaging\SHA256.ps1 ${env:PublishFilePath}\${env:ProjectName}_linux_arm64_v${{ steps.tag.outputs.tag }}.tar.zst)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
Copy-Item ".\src\ST.Client.Desktop.Avalonia.App\bin\${env:Configuration}\Publish\${env:ProjectName}_linux_arm64_v${{ steps.tag.outputs.tag }}.7z" "${env:PublishFilePath}"
|
||||
Write-Output "linux_arm64_SHA256=$(.\packaging\SHA256.ps1 ${env:PublishFilePath}\${env:ProjectName}_linux_arm64_v${{ steps.tag.outputs.tag }}.7z)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
|
||||
- name: Package linux-x64 deb
|
||||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
|
||||
@@ -237,8 +237,8 @@ jobs:
|
||||
| <sub>${{ env.ProjectName }}_win_x64_v${{ steps.tag.outputs.tag }}.exe</sub> | <sub>${{ env.exe_win_x64_SHA256 }}</sub> |
|
||||
| <sub>${{ env.ProjectName }}_win_x64_fde_v${{ steps.tag.outputs.tag }}.exe</sub> | <sub>${{ env.exe_fd_win_x64_SHA256 }}</sub> |
|
||||
|||
|
||||
| <sub>${{ env.ProjectName }}_linux_x64_v${{ steps.tag.outputs.tag }}.tar.zst</sub> | <sub>${{ env.linux_x64_SHA256 }}</sub> |
|
||||
| <sub>${{ env.ProjectName }}_linux_arm64_v${{ steps.tag.outputs.tag }}.tar.zst</sub> | <sub>${{ env.linux_arm64_SHA256 }}</sub> |
|
||||
| <sub>${{ env.ProjectName }}_linux_x64_v${{ steps.tag.outputs.tag }}.7z</sub> | <sub>${{ env.linux_x64_SHA256 }}</sub> |
|
||||
| <sub>${{ env.ProjectName }}_linux_arm64_v${{ steps.tag.outputs.tag }}.7z</sub> | <sub>${{ env.linux_arm64_SHA256 }}</sub> |
|
||||
| <sub>${{ env.ProjectName }}_linux_x64_v${{ steps.tag.outputs.tag }}.deb</sub> | <sub>${{ env.deb_linux_x64_SHA256 }}</sub> |
|
||||
| <sub>${{ env.ProjectName }}_linux_arm64_v${{ steps.tag.outputs.tag }}.deb</sub> | <sub>${{ env.deb_linux_arm64_SHA256 }}</sub> |
|
||||
| <sub>${{ env.ProjectName }}_linux_x64_v${{ steps.tag.outputs.tag }}.rpm</sub> | <sub>${{ env.rpm_linux_x64_SHA256 }}</sub> |
|
||||
@@ -264,13 +264,13 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup .NET 6
|
||||
uses: actions/setup-dotnet@v2
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 6.0.x
|
||||
|
||||
@@ -314,7 +314,7 @@ jobs:
|
||||
|
||||
- name: Checkout Credentials repository
|
||||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: SteamTools-Team/Credentials
|
||||
token: ${{ secrets.REPO_TOKEN }}
|
||||
|
||||
@@ -18,13 +18,13 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup .NET 6
|
||||
uses: actions/setup-dotnet@v2
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 6.0.x
|
||||
|
||||
|
||||
@@ -37,6 +37,3 @@
|
||||
[submodule "references/SevenZipSharp"]
|
||||
path = references/SevenZipSharp
|
||||
url = https://github.com/SteamTools-Team/SevenZipSharp.git
|
||||
[submodule "references/Gameloop.Vdf"]
|
||||
path = references/Gameloop.Vdf
|
||||
url = https://github.com/BeyondDimension/Gameloop.Vdf.git
|
||||
|
||||
+101
-112
@@ -1,67 +1,67 @@
|
||||
<Project>
|
||||
<ItemGroup Condition=" $(TargetFramework.StartsWith('netstandard')) Or $(TargetFramework.StartsWith('netcoreapp3.1'))">
|
||||
<!-- Microsoft.Extensions.* & AspNetCore & EntityFrameworkCore(NETCOREAPP31) -->
|
||||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="3.1.22" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Http" Version="3.1.22" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Logging" Version="3.1.22" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="3.1.22" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Logging.AzureAppServices" Version="3.1.22" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.22" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="3.1.22" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="3.1.22" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.22" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="3.1.22" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.1.22" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.22" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.MicrosoftAccount" Version="3.1.22" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="3.1.22" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="3.1.22" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" $(TargetFramework.StartsWith('net5.0')) ">
|
||||
<!-- Microsoft.Extensions.* & AspNetCore & EntityFrameworkCore(NET50) -->
|
||||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Http" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Logging" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Logging.AzureAppServices" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.MicrosoftAccount" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="5.0.12" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" $(TargetFramework.StartsWith('net6.0')) ">
|
||||
<!-- Microsoft.Extensions.* & AspNetCore & EntityFrameworkCore(NET60) -->
|
||||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Http" Version="6.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Logging" Version="6.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="6.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Logging.AzureAppServices" Version="6.0.3" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.3" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="6.0.3" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.3" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.3" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.3" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.3" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.3" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.MicrosoftAccount" Version="6.0.3" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="6.0.3" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="6.0.3" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" $(TargetFramework.StartsWith('net5.0')) ">
|
||||
<!-- Microsoft.Extensions.* & AspNetCore & EntityFrameworkCore(NET50) -->
|
||||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="5.0.2" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Http" Version="5.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Logging" Version="5.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="5.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Logging.AzureAppServices" Version="5.0.15" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.15" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="5.0.14" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.15" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.15" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.15" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.15" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="5.0.15" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.MicrosoftAccount" Version="5.0.15" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="5.0.15" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="5.0.15" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" $(TargetFramework.StartsWith('netstandard')) Or $(TargetFramework.StartsWith('netcoreapp3.1'))">
|
||||
<!-- Microsoft.Extensions.* & AspNetCore & EntityFrameworkCore(NETCOREAPP31) -->
|
||||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="3.1.23" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Http" Version="3.1.23" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Logging" Version="3.1.23" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="3.1.23" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Logging.AzureAppServices" Version="3.1.23" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="3.1.23" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="3.1.23" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="3.1.23" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.23" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="3.1.23" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.1.23" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.23" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.MicrosoftAccount" Version="3.1.23" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="3.1.23" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="3.1.23" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Logging.AzureAppServices" Version="6.0.1" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.1" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="6.0.1" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.1" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.1" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.1" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.1" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.1" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.MicrosoftAccount" Version="6.0.1" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="6.0.1" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="6.0.1" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" $(TargetFramework.StartsWith('net6.0')) ">
|
||||
<!-- Entity Framework Plus -->
|
||||
<!-- A FREE & Open Source library to enhance EF6 and EF Core -->
|
||||
<PackageVersion Include="Z.EntityFramework.Plus.EFCore" Version="6.13.15" />
|
||||
<PackageVersion Include="Z.EntityFramework.Plus.EFCore" Version="6.13.7" />
|
||||
|
||||
<!-- AspNetCore 6 OpenId/OAuth -->
|
||||
<PackageVersion Include="AspNet.Security.OpenId.Steam" Version="6.0.0" />
|
||||
<PackageVersion Include="AspNet.Security.OAuth.QQ" Version="6.0.4" />
|
||||
<PackageVersion Include="AspNet.Security.OAuth.Apple" Version="6.0.4" />
|
||||
<PackageVersion Include="AspNet.Security.OAuth.QQ" Version="6.0.3" />
|
||||
<PackageVersion Include="AspNet.Security.OAuth.Apple" Version="6.0.3" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
</ItemGroup>
|
||||
@@ -79,7 +79,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" $(TargetFramework.StartsWith('netstandard')) ">
|
||||
<!-- BCL(NETSTANDARD) -->
|
||||
<PackageVersion Include="System.Text.Json" Version="6.0.2" />
|
||||
<PackageVersion Include="System.Text.Json" Version="6.0.1" />
|
||||
<PackageVersion Include="System.Text.Encodings.Web" Version="6.0.0" />
|
||||
<PackageVersion Include="System.Drawing.Common" Version="6.0.0" />
|
||||
<PackageVersion Include="System.Security.Principal.Windows" Version="5.0.0" />
|
||||
@@ -90,7 +90,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<!-- Microsoft.* -->
|
||||
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
|
||||
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
|
||||
<!--<PackageVersion Include="Microsoft.Windows.CsWinRT" Version="1.4.1" />-->
|
||||
<!--<PackageVersion Include="Microsoft.Windows.SDK.NET.Ref" Version="10.0.19041.22" />-->
|
||||
<!--<PackageVersion Include="Microsoft.Windows.SDK.Contracts" Version="10.0.19041.1" />-->
|
||||
@@ -113,36 +113,36 @@
|
||||
<!-- Xamarin -->
|
||||
<PackageVersion Include="Xamarin.Essentials" Version="1.7.1" />
|
||||
<!-- Xamarin.Forms -->
|
||||
<PackageVersion Include="Xamarin.Forms" Version="5.0.0.2337" />
|
||||
<PackageVersion Include="Xamarin.Forms.Visual.Material" Version="5.0.0.2337" />
|
||||
<PackageVersion Include="Xamarin.Forms" Version="5.0.0.2244" />
|
||||
<PackageVersion Include="Xamarin.Forms.Visual.Material" Version="5.0.0.2244" />
|
||||
<PackageVersion Include="Xam.Plugins.Forms.ImageCircle" Version="3.1.1.1-beta" />
|
||||
|
||||
<!-- NUnit & NUnit.Xamarin & Moq -->
|
||||
<PackageVersion Include="NUnit" Version="3.13.3" />
|
||||
<PackageVersion Include="NUnit" Version="3.13.2" />
|
||||
<PackageVersion Include="NUnit3TestAdapter" Version="4.2.1" />
|
||||
<PackageVersion Include="nunit.xamarin" Version="3.6.1" />
|
||||
<PackageVersion Include="PCLStorage" Version="1.0.2" />
|
||||
<PackageVersion Include="Moq" Version="4.17.2" />
|
||||
<PackageVersion Include="Moq" Version="4.16.1" />
|
||||
|
||||
<!-- NLog -->
|
||||
<PackageVersion Include="NLog" Version="4.7.14" />
|
||||
<PackageVersion Include="NLog" Version="4.7.13" />
|
||||
<PackageVersion Include="NLog.Extensions.Logging" Version="1.7.4" />
|
||||
<PackageVersion Include="NLog.Web.AspNetCore" Version="4.14.0" />
|
||||
|
||||
<!-- ReactiveUI -->
|
||||
<PackageVersion Include="System.Reactive" Version="5.0.0" />
|
||||
<PackageVersion Include="Splat" Version="14.1.45" />
|
||||
<PackageVersion Include="DynamicData" Version="7.6.5" />
|
||||
<PackageVersion Include="ReactiveUI" Version="17.1.50" />
|
||||
<!--<PackageVersion Include="ReactiveUI.Fody" Version="17.1.50" /> -->
|
||||
<PackageVersion Include="ReactiveUI.XamForms" Version="17.1.50" />
|
||||
<PackageVersion Include="ReactiveUI.AndroidX" Version="17.1.50" />
|
||||
<PackageVersion Include="Splat" Version="14.1.17" />
|
||||
<PackageVersion Include="DynamicData" Version="7.4.11" />
|
||||
<PackageVersion Include="ReactiveUI" Version="17.1.17" />
|
||||
<!--<PackageVersion Include="ReactiveUI.Fody" Version="17.1.17" /> -->
|
||||
<PackageVersion Include="ReactiveUI.XamForms" Version="17.1.17" />
|
||||
<PackageVersion Include="ReactiveUI.AndroidX" Version="17.1.17" />
|
||||
|
||||
<!-- SkiaSharp & HarfBuzzSharp -->
|
||||
<PackageVersion Include="HarfBuzzSharp" Version="2.8.2-preview.232" />
|
||||
<PackageVersion Include="HarfBuzzSharp.NativeAssets.Linux" Version="2.8.2-preview.232" />
|
||||
<PackageVersion Include="SkiaSharp" Version="2.88.0-preview.232" />
|
||||
<PackageVersion Include="SkiaSharp.NativeAssets.Linux" Version="2.88.0-preview.232" />
|
||||
<PackageVersion Include="HarfBuzzSharp" Version="2.8.2-preview.179" />
|
||||
<PackageVersion Include="HarfBuzzSharp.NativeAssets.Linux" Version="2.8.2-preview.179" />
|
||||
<PackageVersion Include="SkiaSharp" Version="2.88.0-preview.179" />
|
||||
<PackageVersion Include="SkiaSharp.NativeAssets.Linux" Version="2.88.0-preview.179" />
|
||||
|
||||
<!-- AutoMapper -->
|
||||
<PackageVersion Include="AutoMapper" Version="10.1.1" />
|
||||
@@ -172,17 +172,16 @@
|
||||
<PackageVersion Include="gfoidl.Base64" Version="1.1.1" />
|
||||
|
||||
<!--Command Line Tools-->
|
||||
<PackageVersion Include="System.CommandLine" Version="2.0.0-beta3.22114.1" />
|
||||
<PackageVersion Include="System.CommandLine.NamingConventionBinder" Version="2.0.0-beta3.22114.1" />
|
||||
<PackageVersion Include="System.CommandLine" Version="2.0.0-beta1.21308.1" />
|
||||
|
||||
<!-- Pinyin -->
|
||||
<PackageVersion Include="TinyPinyin.Net" Version="1.0.2" />
|
||||
|
||||
<!-- Win32/Windows -->
|
||||
<PackageVersion Include="TaskScheduler" Version="2.10.1" />
|
||||
<PackageVersion Include="TaskScheduler" Version="2.10.0" />
|
||||
|
||||
<!-- Swagger -->
|
||||
<PackageVersion Include="Swashbuckle.AspNetCore" Version="6.3.0" />
|
||||
<PackageVersion Include="Swashbuckle.AspNetCore" Version="6.2.3" />
|
||||
|
||||
<!-- Pay -->
|
||||
<!--<PackageVersion Include="AlipaySDKNet.Standard" Version="4.6.109" />-->
|
||||
@@ -202,7 +201,7 @@
|
||||
|
||||
<!-- .NET Compat -->
|
||||
<PackageVersion Include="OperatingSystem2" Version="1.4.3" />
|
||||
<PackageVersion Include="JustArchiNET.Madness" Version="3.3.0" />
|
||||
<PackageVersion Include="JustArchiNET.Madness" Version="3.2.1" />
|
||||
|
||||
<!-- Serialize -->
|
||||
<PackageVersion Include="MessagePack" Version="2.3.85" />
|
||||
@@ -219,9 +218,7 @@
|
||||
<!--<PackageVersion Include="Nito.Disposables" Version="2.2.1" />-->
|
||||
|
||||
<!-- Valve Data File -->
|
||||
<!--<PackageVersion Include="Gameloop.Vdf" Version="0.6.1" />-->
|
||||
<PackageVersion Include="Microsoft.CSharp" Version="4.7.0" />
|
||||
<PackageVersion Include="System.ComponentModel.TypeConverter" Version="4.3.0" />
|
||||
<PackageVersion Include="Gameloop.Vdf" Version="0.6.1" />
|
||||
|
||||
<!-- WebSocket -->
|
||||
<PackageVersion Include="Fleck" Version="1.2.0" />
|
||||
@@ -236,18 +233,18 @@
|
||||
<PackageVersion Include="Polly" Version="7.2.3" />
|
||||
|
||||
<!--Avalonia Start-->
|
||||
<PackageVersion Include="Avalonia" Version="0.10.13" />
|
||||
<PackageVersion Include="Avalonia.Desktop" Version="0.10.13" />
|
||||
<PackageVersion Include="Avalonia.Skia" Version="0.10.13" />
|
||||
<PackageVersion Include="Avalonia.Diagnostics" Version="0.10.13" />
|
||||
<PackageVersion Include="Avalonia.ReactiveUI" Version="0.10.13" />
|
||||
<!--<PackageVersion Include="Avalonia.Direct2D1" Version="0.10.13" />-->
|
||||
<PackageVersion Include="Avalonia.Controls.DataGrid" Version="0.10.13" />
|
||||
<PackageVersion Include="Avalonia.Xaml.Behaviors" Version="0.10.13.2" />
|
||||
<!--<PackageVersion Include="Avalonia.AvaloniaEdit" Version="0.10.12.2" />-->
|
||||
<PackageVersion Include="Avalonia" Version="0.10.12" />
|
||||
<PackageVersion Include="Avalonia.Desktop" Version="0.10.12" />
|
||||
<PackageVersion Include="Avalonia.Skia" Version="0.10.12" />
|
||||
<PackageVersion Include="Avalonia.Diagnostics" Version="0.10.12" />
|
||||
<PackageVersion Include="Avalonia.ReactiveUI" Version="0.10.12" />
|
||||
<!--<PackageVersion Include="Avalonia.Direct2D1" Version="0.10.12" />-->
|
||||
<PackageVersion Include="Avalonia.Controls.DataGrid" Version="0.10.12" />
|
||||
<PackageVersion Include="Avalonia.Xaml.Behaviors" Version="0.10.12" />
|
||||
<!--<PackageVersion Include="Avalonia.AvaloniaEdit" Version="0.10.4" />-->
|
||||
<!--<PackageVersion Include="CefNet.Avalonia" Version="93.1.21240.857" />-->
|
||||
<!--<PackageVersion Include="LibVLCSharp.Avalonia" Version="3.5.1" />-->
|
||||
<!--<PackageVersion Include="FluentAvaloniaUI" Version="1.3.0" />-->
|
||||
<!--<PackageVersion Include="FluentAvaloniaUI" Version="1.1.8" />-->
|
||||
<PackageVersion Include="JumpLists.Win32.Avalonia" Version="1.0.0" />
|
||||
<!--Avalonia End-->
|
||||
|
||||
@@ -255,39 +252,31 @@
|
||||
<PackageVersion Include="Xamarin.Google.Dagger" Version="2.39.1" />
|
||||
<PackageVersion Include="Xamarin.Google.MLKit.BarcodeScanning" Version="116.1.2.3" />
|
||||
<PackageVersion Include="Plugin.CurrentActivity" Version="2.1.0.4" />
|
||||
<PackageVersion Include="de.hdodenhof.circleimageview" Version="3.1.0.1" />
|
||||
<PackageVersion Include="Square.OkHttp3" Version="4.9.3" />
|
||||
<PackageVersion Include="de.hdodenhof.circleimageview" Version="3.1.0" />
|
||||
<PackageVersion Include="Square.OkHttp3" Version="4.9.2" />
|
||||
<PackageVersion Include="Square.Picasso" Version="2.71828.0" />
|
||||
<!--<PackageVersion Include="LeakCanaryBinding" Version="1.5.1.1" />-->
|
||||
<!--<PackageVersion Include="TencentOpenApiSDK.Android" Version="3.5.4.11" />-->
|
||||
<PackageVersion Include="XAB.FlexboxLayout" Version="3.0.0" />
|
||||
|
||||
<!-- V2Ray -->
|
||||
<PackageVersion Include="XAB.AndroidLibV2rayLite" Version="1.0.0.1" />
|
||||
<!--<PackageVersion Include="Karamunting.KotlinX.Coroutines.Core" Version="1.4.2" />-->
|
||||
<PackageVersion Include="Xamarin.KotlinX.Coroutines.Core" Version="1.6.0" />
|
||||
<PackageVersion Include="Xamarin.KotlinX.Coroutines.Android" Version="1.6.0" />
|
||||
<PackageVersion Include="Xamarin.Android.ReactiveX.RxJava3.RxJava" Version="3.1.3.2" />
|
||||
|
||||
|
||||
<!-- Xamarin.AndroidX -->
|
||||
<PackageVersion Include="Xamarin.AndroidX.Migration" Version="1.0.8" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.AppCompat" Version="1.4.1" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Emoji.AppCompat" Version="1.1.0.7" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Fragment" Version="1.4.1" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.RecyclerView" Version="1.2.1.5" />
|
||||
<PackageVersion Include="Xamarin.Google.Android.Material" Version="1.5.0.1" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.SwipeRefreshLayout" Version="1.1.0.7" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.ConstraintLayout" Version="2.1.3" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Navigation.UI" Version="2.3.5.5" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Navigation.Fragment" Version="2.3.5.5" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.ViewPager2" Version="1.0.0.14" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.AppCompat" Version="1.3.1.4" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Emoji.AppCompat" Version="1.1.0.5" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Fragment" Version="1.3.6.4" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Navigation.Fragment" Version="2.3.5.3" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.RecyclerView" Version="1.2.1.4" />
|
||||
<PackageVersion Include="Xamarin.Google.Android.Material" Version="1.4.0.5" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.SwipeRefreshLayout" Version="1.1.0.6" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.ConstraintLayout" Version="2.1.2.1" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Navigation.UI" Version="2.3.5.3" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.ViewPager2" Version="1.0.0.13" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Activity" Version="1.4.0.1" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Biometric" Version="1.1.0.8" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.ExifInterface" Version="1.3.3.4" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Legacy.Support.Core.UI" Version="1.0.0.13" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.4.1" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Camera.Camera2" Version="1.0.2.3" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Camera.Lifecycle" Version="1.0.2.3" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Biometric" Version="1.1.0.6" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.ExifInterface" Version="1.3.3.3" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Legacy.Support.Core.UI" Version="1.0.0.12" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.4.0.1" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Camera.Camera2" Version="1.0.2.2" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Camera.Lifecycle" Version="1.0.2.2" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Camera.View" Version="1.0.0.5-alpha20" />
|
||||
<!--<PackageVersion Include="Xamarin.AndroidX.Window" Version="1.0.0.3-beta02" />-->
|
||||
|
||||
|
||||
+12
-17
@@ -4,7 +4,7 @@
|
||||
|
||||
English | [简体中文](./README.md)
|
||||
|
||||
"Steam++" is an open source cross-platform multi-purpose game toolkit, most of its features require you to download and install Steam to use it.
|
||||
「Steam++」is a toolkit that contains a variety of Steam tools, most of which require you to download and install Steam in order to use them.
|
||||
|
||||

|
||||
[](https://github.com/rmbadmin/SteamTools/releases/latest)
|
||||
@@ -32,24 +32,19 @@ English | [简体中文](./README.md)
|
||||
- [GitHub Releases](https://github.com/BeyondDimension/SteamTools/releases)
|
||||
- [Gitee Releases](https://gitee.com/rmbgame/SteamTools/releases)
|
||||
- [Official WebSite](https://steampp.net)
|
||||
- [](https://www.microsoft.com/store/apps/9MTCFHS560NG)
|
||||
- [Arch Linux Package](https://aur.archlinux.org/packages/steam%2B%2B-bin)(By [zhanghua000](https://github.com/zhanghua000))
|
||||
|
||||
## ✨ Functions
|
||||
1. Network Acceleration (Support Windows / Linux / macOS / Android)
|
||||
- Make the Steam community, Github, Google reCAPTCHA, Pixiv, Discord, Twitch and other domestic hard-to-access pages accessible properly.
|
||||
- Functions similar to [Steamcommunity 302](https://www.dogfight360.com/blog/686/), using [Titanium-Web-Proxy](https://github.com/justcoding121/Titanium-Web-Proxy) open source project for local anti-generation.
|
||||
2. Script Configuration (Windows / Linux / macOS Only)
|
||||
- Some JS scripts are injected into web pages through an acceleration service that intercepts web requests, providing functionality similar to that of a web plugin.
|
||||
3. Account Switch (Windows / Linux / macOS Only)
|
||||
- Switch between Steam accounts that are already logged in on the current PC with one click, and manage features such as sorting your home shared library.
|
||||
4. Inventory Management (Windows / Linux / macOS Only)
|
||||
- Lets you manage your Steam game inventory directly, not only by downloading older Steam games, but also by managing Steam game achievements directly, supporting unlocked achievements and unlocked achievements.
|
||||
5. Local Authentication (Support Windows / Linux / macOS / Android)
|
||||
- Let your cell phone token unified save in the computer, currently only support Steam token, later will develop support more token types with cloud synchronization token.
|
||||
6. ArchiSteamFarm (Support Windows / Linux / macOS / Android)
|
||||
- Integration with [ArchiSteamFarm](https://github.com/JustArchiNET/ArchiSteamFarm) provides functions such as hanging and dropping Steam Collectible Cards within the app.
|
||||
7. Game Tools (Windows Only)
|
||||
- Force game windows to use borderless windowing
|
||||
1. Local reverse proxy for Steam's community webpage to enable normal access in **the Chinese Mainland, Mainland of China**
|
||||
2. Quickly switch the Steam account that the current PC has remembered to log into
|
||||
- This feature is to read the local user login records stored under the Steam path to directly display the operation, you can switch between multiple accounts without re-entering passwords and tokens.
|
||||
3. Achievement stat modifications for Steam games
|
||||
- Function reference SteamAchievementManager for secondary development, modified the game list loading and operation ease of use.
|
||||
4. Steam Local Two-Step Authenticator
|
||||
- The function reference [WinAuth](https://github.com/winauth/winauth) is developed to enable you to view your token without launching the mobile version of Steam App, similar function software are [WinAuth](https://github.com/winauth/winauth), [SteamDesktopAuthenticator](https://github.com/Jessecar96/SteamDesktopAuthenticator).
|
||||
5. Some game tools
|
||||
- Currently there is a forced game borderless windowing.
|
||||
|
||||
<!--Prerequisites Microsoft Visual C++ 2015-2019 Redistributable [64 bit](https://aka.ms/vs/16/release/vc_redist.x64.exe) / [32 bit](https://aka.ms/vs/16/release/vc_redist.x86.exe)-->
|
||||
## 🖥 Supported Operating Systems
|
||||
@@ -62,7 +57,7 @@ OS | Version | Architectures
|
||||
[Windows Server][Windows-Server] | 2012+ | x64 | [Windows Server][Windows-Server-lifecycle]
|
||||
|
||||
**\*** Windows 7 SP1 is supported with [Extended Security Updates](https://docs.microsoft.com/troubleshoot/windows-client/windows-7-eos-faq/windows-7-extended-security-updates-faq) installed.
|
||||
**\*** Microsoft Store(Desktop Bridge) Version 1809+
|
||||
**\*** Microsoft Store/Desktop Bridge Version 1809+
|
||||
|
||||
[Windows-client]: https://www.microsoft.com/windows/
|
||||
[Windows-lifecycle]: https://support.microsoft.com/help/13853/windows-lifecycle-fact-sheet
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
[English](./README.en.md) | 简体中文
|
||||
|
||||
「Steam++」是一个开源跨平台的多功能游戏工具箱,此工具的大部分功能都是需要您下载安装 Steam 才能使用。
|
||||
「Steam++」是一个包含多种Steam工具功能的工具箱,此工具的大部分功能都是需要您下载安装Steam才能使用。
|
||||
|
||||

|
||||
[](https://github.com/BeyondDimension/SteamTools/releases/latest)
|
||||
@@ -33,24 +33,26 @@
|
||||
- [GitHub Releases](https://github.com/BeyondDimension/SteamTools/releases)
|
||||
- [Gitee Releases](https://gitee.com/rmbgame/SteamTools/releases)
|
||||
- [Official WebSite](https://steampp.net)
|
||||
- [](https://www.microsoft.com/store/apps/9MTCFHS560NG)
|
||||
- [Arch Linux Package](https://aur.archlinux.org/packages/steam%2B%2B-bin)(By [zhanghua000](https://github.com/zhanghua000))
|
||||
|
||||
## ✨ 功能
|
||||
1. 网络加速 (Support Windows / Linux / macOS / Android)
|
||||
- 使 Steam 社区、Github、谷歌验证码、Pixiv、Discord、Twitch 等国内难以访问的网页正常访问。
|
||||
- 功能类似 [Steamcommunity 302](https://www.dogfight360.com/blog/686/) ,使用 [Titanium-Web-Proxy](https://github.com/justcoding121/Titanium-Web-Proxy) 开源项目进行本地反代。
|
||||
2. 脚本配置 (Windows / Linux / macOS Only)
|
||||
- 通过加速服务拦截网络请求将一些 JS 脚本注入在网页中,提供类似网页插件的功能。
|
||||
3. 账号切换 (Windows / Linux / macOS Only)
|
||||
- 一键切换已在当前 PC 上登录过的 Steam 账号,与管理家庭共享库排序等功能。
|
||||
4. 库存管理 (Windows / Linux / macOS Only)
|
||||
- 让您直接管理到 Steam 游戏库存,不仅能够下载老版本的 Steam 游戏,也能够对 Steam 游戏成就进行直接管理,支持解锁成就以及反解锁成就。
|
||||
5. 本地令牌 (Support Windows / Linux / macOS / Android)
|
||||
- 让您的手机令牌统一保存在电脑中,目前仅支持 Steam 令牌,后续会开发支持更多的令牌种类与云同步令牌。
|
||||
6. 自动挂卡 (Support Windows / Linux / macOS / Android)
|
||||
- 集成 [ArchiSteamFarm](https://github.com/JustArchiNET/ArchiSteamFarm) 在应用内提供 挂机掉落 Steam 集换式卡牌 等功能。
|
||||
7. 游戏工具 (Windows Only)
|
||||
- 强制游戏窗口使用无边框窗口化
|
||||
1. 反代 Steam 的社区网页使其能正常访问
|
||||
- 功能类似羽翼城大佬的 [steamcommunity_302](https://www.dogfight360.com/blog/686/)
|
||||
- 使用 [Titanium-Web-Proxy](https://github.com/justcoding121/Titanium-Web-Proxy) 开源项目进行本地反代,使国内用户可以正常访问 Steam 社区页
|
||||
- 相比 **302工具** 具有更快的启动速度,以及支持简单的脚本注入(还顺便支持了Pixiv、Discord、Twitch等网站的反代支持)
|
||||
2. 快速切换当前设备已记住登陆的 Steam 账号
|
||||
- 该功能是读取 Steam 路径下存储的本地用户登录记录直接展示操作,可以多账号切换无需重新输入密码和令牌
|
||||
3. Steam游戏的成就统计管理功能
|
||||
- 功能参考 [SteamAchievementManager](https://github.com/gibbed/SteamAchievementManager) 进行二次开发,修改了游戏列表的加载和操作易用性
|
||||
4. Steam本地两步身份验证器
|
||||
- 功能参考 [WinAuth](https://github.com/winauth/winauth) 开发,可以使您不用启动移动版 Steam App 也能查看您的令牌
|
||||
- 本地令牌交易市场报价确认
|
||||
- 功能类似的软件例如:
|
||||
- [WinAuth](https://github.com/winauth/winauth)
|
||||
- [SteamDesktopAuthenticator](https://github.com/Jessecar96/SteamDesktopAuthenticator)
|
||||
5. 其他游戏工具
|
||||
- 目前已有强制游戏无边框窗口化
|
||||
|
||||
<!--发布配置SelfContained=true时会自动打包VC++相关程序集-->
|
||||
<!--先决条件 Microsoft Visual C++ 2015-2019 Redistributable [64 位](https://aka.ms/vs/16/release/vc_redist.x64.exe) / [32 位](https://aka.ms/vs/16/release/vc_redist.x86.exe)-->
|
||||
@@ -64,7 +66,7 @@ OS | Version | Architectures
|
||||
[Windows Server][Windows-Server] | 2012+ | x64 | [Windows Server][Windows-Server-lifecycle]
|
||||
|
||||
**\*** Windows 7 SP1 is supported with [Extended Security Updates](https://docs.microsoft.com/troubleshoot/windows-client/windows-7-eos-faq/windows-7-extended-security-updates-faq) installed.
|
||||
**\*** Microsoft Store(Desktop Bridge) Version 1809+
|
||||
**\*** Microsoft Store/Desktop Bridge Version 1809+
|
||||
|
||||
[Windows-client]: https://www.microsoft.com/windows/
|
||||
[Windows-lifecycle]: https://support.microsoft.com/help/13853/windows-lifecycle-fact-sheet
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
"src\\Avalonia.Win32\\Avalonia.Win32.csproj",
|
||||
"src\\Avalonia.X11\\Avalonia.X11.csproj",
|
||||
"src\\Common.AreaLib\\Common.AreaLib.csproj",
|
||||
"src\\Common.ClientLib.Droid\\Common.ClientLib.Droid.csproj",
|
||||
"src\\Common.ClientLib.iOS\\Common.ClientLib.iOS.csproj",
|
||||
"src\\Common.ClientLib\\Common.ClientLib.csproj",
|
||||
"src\\Common.CoreLib\\Common.CoreLib.csproj",
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
"src\\Avalonia.Win32\\Avalonia.Win32.csproj",
|
||||
"src\\Avalonia.X11\\Avalonia.X11.csproj",
|
||||
"src\\Common.AreaLib\\Common.AreaLib.csproj",
|
||||
"src\\Common.ClientLib.Droid\\Common.ClientLib.Droid.csproj",
|
||||
"src\\Common.ClientLib.iOS\\Common.ClientLib.iOS.csproj",
|
||||
"src\\Common.ClientLib\\Common.ClientLib.csproj",
|
||||
"src\\Common.CoreLib\\Common.CoreLib.csproj",
|
||||
|
||||
+32
-97
@@ -152,6 +152,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_Github", "_Github", "{B114
|
||||
.github\workflows\xamarin.yml = .github\workflows\xamarin.yml
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Common.ClientLib.Droid", "src\Common.ClientLib.Droid\Common.ClientLib.Droid.csproj", "{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Common.ClientLib.iOS", "src\Common.ClientLib.iOS\Common.ClientLib.iOS.csproj", "{4658B02A-CB1A-4561-AD9C-3B3FF969D7F0}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ST.Client.UnitTest.Droid", "tests\Common.UnitTest.Droid\ST.Client.UnitTest.Droid.csproj", "{80E6762E-AB43-41E2-BDB4-7A3E24713977}"
|
||||
@@ -164,15 +166,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ST.Client.UnitTest.Resource
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Diagnostics", "src\Avalonia.Diagnostics\Avalonia.Diagnostics.csproj", "{E84FF7BC-FC2A-424E-8780-7DA9B487E23F}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Skia.Internals", "src\Avalonia.Skia.Internals\Avalonia.Skia.Internals.csproj", "{47C151DA-D2B1-43F4-A04E-B454E2134852}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Bindings", "Bindings", "{80EBD601-28AC-4840-B9B8-E6064816A443}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ST.Client.Android.V2Ray", "src\ST.Client.Android.V2Ray\ST.Client.Android.V2Ray.csproj", "{4A79264D-5BF5-4F89-8066-44E154BF557F}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gameloop.Vdf", "references\Gameloop.Vdf\Gameloop.Vdf\Gameloop.Vdf.csproj", "{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ST.Client.Android.Shadowsocks", "src\ST.Client.Android.Shadowsocks\ST.Client.Android.Shadowsocks.csproj", "{920EF29F-406F-43A9-B002-29DD6B0B4FBF}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Skia.Internals", "src\Avalonia.Skia.Internals\Avalonia.Skia.Internals.csproj", "{47C151DA-D2B1-43F4-A04E-B454E2134852}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@@ -1592,6 +1586,34 @@ Global
|
||||
{29DE5086-0690-4AE7-9BA9-840F54B249DC}.Release|x64.Build.0 = Release|Any CPU
|
||||
{29DE5086-0690-4AE7-9BA9-840F54B249DC}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{29DE5086-0690-4AE7-9BA9-840F54B249DC}.Release|x86.Build.0 = Release|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Debug|ARM64.Build.0 = Debug|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Release|ARM64.ActiveCfg = Release|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Release|ARM64.Build.0 = Release|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Release|x64.Build.0 = Release|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C}.Release|x86.Build.0 = Release|Any CPU
|
||||
{4658B02A-CB1A-4561-AD9C-3B3FF969D7F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4658B02A-CB1A-4561-AD9C-3B3FF969D7F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4658B02A-CB1A-4561-AD9C-3B3FF969D7F0}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
@@ -1802,90 +1824,6 @@ Global
|
||||
{47C151DA-D2B1-43F4-A04E-B454E2134852}.Release|x64.Build.0 = Release|Any CPU
|
||||
{47C151DA-D2B1-43F4-A04E-B454E2134852}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{47C151DA-D2B1-43F4-A04E-B454E2134852}.Release|x86.Build.0 = Release|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Debug|ARM64.Build.0 = Debug|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Release|ARM64.ActiveCfg = Release|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Release|ARM64.Build.0 = Release|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Release|x64.Build.0 = Release|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Release|x86.Build.0 = Release|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Debug|ARM64.Build.0 = Debug|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Release|ARM64.ActiveCfg = Release|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Release|ARM64.Build.0 = Release|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Release|x64.Build.0 = Release|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Release|x86.Build.0 = Release|Any CPU
|
||||
{920EF29F-406F-43A9-B002-29DD6B0B4FBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{920EF29F-406F-43A9-B002-29DD6B0B4FBF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{920EF29F-406F-43A9-B002-29DD6B0B4FBF}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{920EF29F-406F-43A9-B002-29DD6B0B4FBF}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{920EF29F-406F-43A9-B002-29DD6B0B4FBF}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
||||
{920EF29F-406F-43A9-B002-29DD6B0B4FBF}.Debug|ARM64.Build.0 = Debug|Any CPU
|
||||
{920EF29F-406F-43A9-B002-29DD6B0B4FBF}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{920EF29F-406F-43A9-B002-29DD6B0B4FBF}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{920EF29F-406F-43A9-B002-29DD6B0B4FBF}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{920EF29F-406F-43A9-B002-29DD6B0B4FBF}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{920EF29F-406F-43A9-B002-29DD6B0B4FBF}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{920EF29F-406F-43A9-B002-29DD6B0B4FBF}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{920EF29F-406F-43A9-B002-29DD6B0B4FBF}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{920EF29F-406F-43A9-B002-29DD6B0B4FBF}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{920EF29F-406F-43A9-B002-29DD6B0B4FBF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{920EF29F-406F-43A9-B002-29DD6B0B4FBF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{920EF29F-406F-43A9-B002-29DD6B0B4FBF}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{920EF29F-406F-43A9-B002-29DD6B0B4FBF}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{920EF29F-406F-43A9-B002-29DD6B0B4FBF}.Release|ARM64.ActiveCfg = Release|Any CPU
|
||||
{920EF29F-406F-43A9-B002-29DD6B0B4FBF}.Release|ARM64.Build.0 = Release|Any CPU
|
||||
{920EF29F-406F-43A9-B002-29DD6B0B4FBF}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{920EF29F-406F-43A9-B002-29DD6B0B4FBF}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{920EF29F-406F-43A9-B002-29DD6B0B4FBF}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{920EF29F-406F-43A9-B002-29DD6B0B4FBF}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{920EF29F-406F-43A9-B002-29DD6B0B4FBF}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{920EF29F-406F-43A9-B002-29DD6B0B4FBF}.Release|x64.Build.0 = Release|Any CPU
|
||||
{920EF29F-406F-43A9-B002-29DD6B0B4FBF}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{920EF29F-406F-43A9-B002-29DD6B0B4FBF}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -1942,6 +1880,7 @@ Global
|
||||
{E85E92BA-202F-42D3-8C5E-96DA452501B7} = {910D6A0F-42AB-4B65-B532-852E864EC006}
|
||||
{21C392C5-AE41-421A-A127-1A03C4ACA2AD} = {673FF8CD-9E85-4FA1-ABFC-D1149675E138}
|
||||
{29DE5086-0690-4AE7-9BA9-840F54B249DC} = {E448F863-4C9D-47A4-BC4A-4A1381B54DA4}
|
||||
{3C7200C7-8C2D-46F0-BD7D-0A59D915B83C} = {83186945-EC14-4B3F-8C6F-B205AA184CA4}
|
||||
{4658B02A-CB1A-4561-AD9C-3B3FF969D7F0} = {83186945-EC14-4B3F-8C6F-B205AA184CA4}
|
||||
{80E6762E-AB43-41E2-BDB4-7A3E24713977} = {CC46B486-00D7-49E6-ABA3-FDF8F4868D2B}
|
||||
{AD7B78B0-AE51-4FB7-9B11-4E22A2B538CA} = {CC46B486-00D7-49E6-ABA3-FDF8F4868D2B}
|
||||
@@ -1949,10 +1888,6 @@ Global
|
||||
{FB2CA9B4-71F1-48E8-B9AE-FF4375F4FE43} = {CC46B486-00D7-49E6-ABA3-FDF8F4868D2B}
|
||||
{E84FF7BC-FC2A-424E-8780-7DA9B487E23F} = {910D6A0F-42AB-4B65-B532-852E864EC006}
|
||||
{47C151DA-D2B1-43F4-A04E-B454E2134852} = {910D6A0F-42AB-4B65-B532-852E864EC006}
|
||||
{80EBD601-28AC-4840-B9B8-E6064816A443} = {327FDEE7-C4C8-4AA4-A7B0-8BCE3D75346F}
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F} = {80EBD601-28AC-4840-B9B8-E6064816A443}
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE} = {673FF8CD-9E85-4FA1-ABFC-D1149675E138}
|
||||
{920EF29F-406F-43A9-B002-29DD6B0B4FBF} = {80EBD601-28AC-4840-B9B8-E6064816A443}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
RESX_NeutralResourcesLanguage = zh-Hans
|
||||
|
||||
+10
-14
@@ -1,27 +1,23 @@
|
||||
# 下载指南
|
||||
- Desktop(桌面端)
|
||||
- Windows
|
||||
- 如果你使用 Intel、AMD 的 x64(x86-64) 芯片的 PC,则下载文件名中带有 **win_x64** 的文件
|
||||
- 如果你 **已安装** 了 [ASP.NET Core 运行时 6.0.3](https://dotnet.microsoft.com/zh-cn/download/dotnet/6.0) 则下载文件名中带有 **fde(框架依赖)** 的文件
|
||||
- 注意:是 《ASP.NET Core 运行时》 而不是 《.NET 桌面运行时》
|
||||
- [在 Windows 上安装 .NET](https://docs.microsoft.com/zh-cn/dotnet/core/install/windows)
|
||||
- 本程序在 Windows 上不需要 Hosting Bundle 和 IIS support
|
||||
- [下载安装程序并手动安装(aspnetcore-runtime-6.0.3-win-x64.exe)](https://dotnet.microsoft.com/zh-cn/download/dotnet/thank-you/runtime-aspnetcore-6.0.3-windows-x64-installer)
|
||||
- [使用 PowerShell 自动化安装](https://docs.microsoft.com/zh-cn/dotnet/core/install/windows?tabs=net60#install-with-powershell-automation)
|
||||
- 如果你使用 Intel、AMD 的 x64 芯片的 PC(较为**普遍**),则下载文件名中带有 **win_x64** 的文件
|
||||
- 如果你已安装了 [ASP.NET Core Runtime 6.0.1](https://dotnet.microsoft.com/download/dotnet/6.0) 则下载文件名中带有 **fde** 的文件,可减少磁盘占用空间
|
||||
- [在 Windows 上安装 .NET](https://docs.microsoft.com/en-us/dotnet/core/install/windows)
|
||||
- 在 Windows 上不需要 Hosting Bundle 和 IIS support
|
||||
- [下载安装程序并手动安装(aspnetcore-runtime-6.0.1-win-x64.exe)](https://dotnet.microsoft.com/download/dotnet/thank-you/runtime-aspnetcore-6.0.1-windows-x64-installer)
|
||||
- [使用 PowerShell 自动化安装](https://docs.microsoft.com/en-us/dotnet/core/install/windows?tabs=net60#install-with-powershell-automation)
|
||||
- macOS
|
||||
- 如果你使用 Intel 的 x64(x86-64) 芯片的 Mac,则下载文件名中带有 **macos_x64** 的文件
|
||||
- 如果你使用 ARM64(Apple Silicon) 芯片的 Mac,例如 **Apple M1**,则下载文件名中带有 **macos_arm64** 的文件
|
||||
- 如果你使用 Intel、AMD 的 x64 芯片的 Mac(较为**普遍**),则下载文件名中带有 **macos_x64** 的文件
|
||||
- 如果你使用 ARM64 芯片的 Mac(较为**稀有**),例如 **M1**,则下载文件名中带有 **macos_arm64** 的文件
|
||||
- Linux
|
||||
- 如果你使用 Intel、AMD 的 x64(x86-64) 芯片的 PC 则下载文件名中带有 **linux_x64** 的文件
|
||||
- 如果你使用 ARM64 芯片的 PC 例如 **Raspberry Pi Model 3+**,则下载文件名中带有 **linux_arm64** 的文件
|
||||
|
||||
<!--
|
||||
- 如果你使用 Intel、AMD 的 x64 芯片的 PC(较为**普遍**)则下载文件名中带有 **linux_x64** 的文件
|
||||
- 如果你使用 ARM64 芯片的 PC(较为**稀有**)例如 **Raspberry Pi Model 3+**,则下载文件名中带有 **linux_arm64** 的文件
|
||||
- Mobile(移动端)
|
||||
- Android
|
||||
- 如果你使用 ARM64 芯片的设备(较为**普遍**)则下载文件名中带有 **android_arm64_v8a** 的文件
|
||||
- 如果你使用 ARM32 芯片的设备(较为**稀有**)通常为 **14** 年下半年之前生产的设备,则下载文件名中带有 **android_armeabi_v7a** 的文件
|
||||
- 如果你使用 Intel、AMD 的 x64 芯片的设备(较为**稀有**)则下载文件名中带有 **android_x64** 的文件
|
||||
-->
|
||||
|
||||
<!--
|
||||
- 如果你使用 ARM64 芯片的 PC(极为**稀有**),例如 **Surface Pro X**,则下载文件名中带有 **win_x64** 的文件可通过 Win11 x86 模拟运行
|
||||
|
||||
+1
-1
@@ -3,6 +3,6 @@
|
||||
"MSBuild.Sdk.Extras": "3.0.44"
|
||||
},
|
||||
"sdk": {
|
||||
"version": "6.0.201"
|
||||
"version": "6.0.101"
|
||||
}
|
||||
}
|
||||
|
||||
+18
-12
@@ -1,7 +1,7 @@
|
||||
create_app_structure() {
|
||||
APPNAME=$1
|
||||
APPDIR="$APPNAME.app/Contents"
|
||||
APPICONS="${{ Steam++_IcnsFile }}"
|
||||
APPICONS="/Users/mossimo/bin/logo.icns"
|
||||
|
||||
if [ ! -d "$APPDIR" ]; then
|
||||
echo "creating app structure $APPDIR"
|
||||
@@ -33,19 +33,19 @@ emit_plist() {
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>net.steampp.app</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>${{ Steam++_ShortVersion }}</string>
|
||||
<string>2.6.7</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>${{ Steam++_Version }}</string>
|
||||
<string>2.6.7.0</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>11.0</string>
|
||||
<string>10.14</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>zh_CN</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${{ Steam++_RunName }}</string>
|
||||
<string>$PLIST_APPNAME</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>${{ Steam++_RunName }}</string>
|
||||
<string>$PLIST_APPNAME</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>$PLIST_APPNAME</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
@@ -64,10 +64,10 @@ EOF
|
||||
fi
|
||||
}
|
||||
|
||||
cd "${{ Steam++_OutPutFilePath }}"
|
||||
cd "/Users/mossimo/bin"
|
||||
|
||||
|
||||
BINARYNAME="${{ Steam++_AppName }}"
|
||||
BINARYNAME="Steam++"
|
||||
|
||||
echo "Building Avalonia demo..."
|
||||
|
||||
@@ -80,8 +80,14 @@ rm -rf "$APPDIR"
|
||||
create_app_structure "$APPNAME"
|
||||
emit_plist "$APPNAME" "$APPDIR" true
|
||||
|
||||
mv -f "${{ Steam++_APPDIR }}" "$APPDIR/MacOS"
|
||||
chmod +x "$APPDIR/MacOS/Steam++"
|
||||
cd "$APPDIR/Frameworks"
|
||||
|
||||
mkdir "${{ Steam++_APPDIR }}"
|
||||
mv -f "${{ Steam++_OutPutFilePath }}/$BINARYNAME.app" "${{ Steam++_APPDIR }}/$BINARYNAME.app"
|
||||
APPNAME="$BINARYNAME Helper"
|
||||
APPDIR="$APPNAME.app/Contents"
|
||||
create_app_structure "$APPNAME"
|
||||
emit_plist "$APPNAME" "$APPDIR"
|
||||
cp -R "../../../steampp/" "../MacOS"
|
||||
ln -s "../../MacOS" "Frameworks/$APPDIR/MacOS"
|
||||
chmod +x "../MacOS/$BINARYNAME"
|
||||
cp "../MacOS/$BINARYNAME" "../MacOS/$APPNAME"
|
||||
chmod +x "../MacOS/$APPNAME"
|
||||
|
||||
Binary file not shown.
@@ -1,7 +0,0 @@
|
||||
# ARM64(Windows/macOS/Linux) Native Library
|
||||
|
||||
## 7z.dll
|
||||
21.07 (2021-12-26) by https://www.7-zip.org
|
||||
|
||||
## libe_sqlite3.dylib
|
||||
sqlitepclraw.lib.e_sqlite3.2.0.7.nupkg
|
||||
Binary file not shown.
@@ -1,8 +0,0 @@
|
||||
# Android Native Library
|
||||
[Xamarin.Android 支持通过标准 PInvoke 机制使用本机库。 你还可以将不属于 OS 的其他本机库绑定到你的 .apk。](https://docs.microsoft.com/zh-cn/xamarin/android/platform/native-libraries)
|
||||
|
||||
## libgojni.so & libtun2socks.so
|
||||
Source code compilation by https://github.com/2dust/v2rayNG
|
||||
|
||||
## shadowsocks-android\libtun2socks.so
|
||||
Apk extraction by https://github.com/shadowsocks/shadowsocks-android/releases/tag/v5.2.6
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Submodule references/ArchiSteamFarm updated: 603b7eedfa...461ed40964
+1
-1
Submodule references/AvaloniaGif updated: 7b4165159d...016cf27b57
Submodule references/FluentAvalonia updated: 658f8f8288...af86596b10
Submodule references/Gameloop.Vdf deleted from 6bf1500c95
@@ -1,7 +0,0 @@
|
||||
# Windows/macOS/Linux x64 Native Library & General C# Source Code & Third Party Projects
|
||||
|
||||
## 7z.dll
|
||||
21.07 (2021-12-26) by https://www.7-zip.org
|
||||
|
||||
## libzstd.dll
|
||||
https://github.com/facebook/zstd/releases/tag/v1.5.2
|
||||
Submodule references/Titanium-Web-Proxy updated: 97fbf1e1ac...29256a4b4f
Binary file not shown.
+1
-1
Submodule references/reactive updated: d53a04fa44...fc2c3d1d22
BIN
Binary file not shown.
Binary file not shown.
@@ -1,4 +0,0 @@
|
||||
# Windows/macOS/Linux x86(32 bit) Native Library
|
||||
|
||||
## 7z.dll
|
||||
21.07 (2021-12-26) by https://www.7-zip.org
|
||||
+31
-27
@@ -1,19 +1,22 @@
|
||||
### 版本亮点
|
||||
1. macOS 支持 Arm64(Apple Silicon)
|
||||
2. Android 支持 VPN 模式(推荐) 进行本地加速
|
||||
3. ~~Windows 支持 DNS 驱动拦截模式(推荐) 进行本地加速~~
|
||||
4. ASF 升级至 V5.x.x.x
|
||||
1. ASF 升级至 **V5.2.2.4**
|
||||
2. Android 12 适配
|
||||
3. Android 上的 ASP.NET Core 升级至 2.2.5
|
||||
4. Desktop 上的 Avalonia 升级至 0.10.12
|
||||
|
||||
### 修复问题
|
||||
1. 修复 本地令牌 无令牌刷新时提示密码错误
|
||||
2. 改进 Android 端 本地令牌 列表样式第一条与最后一条的上下外边距
|
||||
3. 改进 俄语翻译,由 vanja-san 提供
|
||||
4. 改进 .NET 运行时升级至 6.0.3(仅 Desktop 端)
|
||||
5. 改进 脚本配置 未启动时的内存占用,以及减少总体内存占用率
|
||||
6. 修复 Hosts 加速模式下使用仅启用脚本功能导致死循环
|
||||
7. 改进 Linux 端 可监听 443 端口配置
|
||||
8. 修复 Windows 端,动态桌面背景窗口显示时一些可能导致闪退的潜在问题
|
||||
9. 修复 Android 端,因 CheckBox 导致在低于 6.0 Marshmallow 系统上引发的闪退
|
||||
1. 修复 Steam Beta 版账号切换失效
|
||||
2. 修复 ASF 在线配置文件生成器链接错误
|
||||
3. 修复 Linux 上运行时闪退
|
||||
4. 修复 Windows 7 上点击任务栏图标没有最小化
|
||||
5. 改进 打开 Web 链接失败时候的错误提示
|
||||
6. 改进 JumpList 在 Windows 10.0.10586 上使用 UWP API
|
||||
7. 改进 Windows 安装包默认路径使用 $PROGRAMFILES64
|
||||
8. 改进 Windows 安装版 AppData 与 Cache 文件夹不再使用根目录
|
||||
9. 改进 Android Apk 包使用单一包,不再根据 ABI 拆分
|
||||
10. 改进 Android 本地加速与 ASF 使用前台服务运行
|
||||
11. 改进 本地加速 增加 重置 Hosts 文件 与 打开 Hosts 所在文件夹
|
||||
12. 改进 Hosts 文件存在多个 Mark 导致失败的错误提示
|
||||
|
||||
### 已知问题
|
||||
- 除 Windows 之外的平台此软件自动更新尚不可用
|
||||
@@ -21,6 +24,8 @@
|
||||
- macOS
|
||||
- [尚未公证](https://support.apple.com/zh-cn/guide/mac-help/mh40616/10.15/mac/10.15),这会影响 macOS Catalina(版本 10.15)以上版本
|
||||
- Linux
|
||||
- **Hosts 代理模式**可能无法配置成功,推荐使用**系统代理模式**
|
||||
- 系统代理模式下 Discord 更新下载加速不可用
|
||||
- 窗口弹出位置不正确
|
||||
- 鼠标指针浮动样式不正确
|
||||
- Windows
|
||||
@@ -45,7 +50,7 @@
|
||||
- .nupkg 文件可使用解压工具打开或解压,找到此文件复制即可
|
||||
|
||||
[](https://steampp.net)
|
||||
[]()
|
||||
[]()
|
||||
|
||||
|
||||
##### [不知道该下载哪个文件?](./download-guide.md)
|
||||
@@ -54,22 +59,21 @@
|
||||
### 文件校验
|
||||
| File | Checksum (SHA256) |
|
||||
| ---- | ---- |
|
||||
| Steam++_win_x64_v2.7.0.7z | SHA256 |
|
||||
| Steam++_win_x64_fde_v2.7.0.7z | SHA256 |
|
||||
| Steam++_win_x64_v2.6.7.7z | SHA256 |
|
||||
| Steam++_win_x64_fde_v2.6.7.7z | SHA256 |
|
||||
| | |
|
||||
| Steam++_win_x64_v2.7.0.exe | SHA256 |
|
||||
| Steam++_win_x64_fde_v2.7.0.exe | SHA256 |
|
||||
| Steam++_win_x64_v2.6.7.exe | SHA256 |
|
||||
| Steam++_win_x64_fde_v2.6.7.exe | SHA256 |
|
||||
| | |
|
||||
| Steam++_linux_x64_v2.7.0.7z | SHA256 |
|
||||
| Steam++_linux_arm64_v2.7.0.7z | SHA256 |
|
||||
| Steam++_linux_x64_v2.6.7.7z | SHA256 |
|
||||
| Steam++_linux_arm64_v2.6.7.7z | SHA256 |
|
||||
| | |
|
||||
| Steam++_linux_x64_v2.7.0.deb | SHA256 |
|
||||
| Steam++_linux_arm64_v2.7.0.deb | SHA256 |
|
||||
| Steam++_linux_x64_v2.6.7.deb | SHA256 |
|
||||
| Steam++_linux_arm64_v2.6.7.deb | SHA256 |
|
||||
| | |
|
||||
| Steam++_linux_x64_v2.7.0.rpm | SHA256 |
|
||||
| Steam++_linux_arm64_v2.7.0.rpm | SHA256 |
|
||||
| Steam++_linux_x64_v2.6.7.rpm | SHA256 |
|
||||
| Steam++_linux_arm64_v2.6.7.rpm | SHA256 |
|
||||
| | |
|
||||
| Steam++_macos_x64_v2.7.0.dmg | SHA256 |
|
||||
| Steam++_macos_arm64_v2.7.0.dmg | SHA256 |
|
||||
| Steam++_macos_x64_v2.6.7.dmg | SHA256 |
|
||||
| | |
|
||||
| Steam++_android_v2.7.0.apk | SHA256 |
|
||||
| Steam++_android_v2.6.7.apk | SHA256 |
|
||||
|
||||
@@ -46,9 +46,6 @@ namespace System
|
||||
public const string DirPublishWinX64_ =
|
||||
@"\src\" + ProjectDir_AvaloniaApp + @"\bin\{0}\Publish\win-x64";
|
||||
|
||||
public const string DirPublishOsx =
|
||||
@"\src\" + ProjectDir_AvaloniaApp + @"\bin\Release\Publish\{0}";
|
||||
|
||||
public const string DirPublishWinX64_FDE_ =
|
||||
@"\src\" + ProjectDir_AvaloniaApp + @"\bin\{0}\Publish\FrameworkDependent\win-x64";
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#if __ANDROID__
|
||||
using Android.App;
|
||||
using Android.Content;
|
||||
using Android.OS;
|
||||
using Android.Webkit;
|
||||
@@ -148,23 +147,7 @@ namespace System.Application.UI
|
||||
b.AppendLine();
|
||||
|
||||
b.Append("[app.install] ");
|
||||
b.Append(platformService.IsInstall.ToLowerString());
|
||||
b.AppendLine();
|
||||
|
||||
|
||||
b.Append("[memory.usage] ");
|
||||
#if __ANDROID__
|
||||
var activityManager = activity.GetActivityManager();
|
||||
ActivityManager.MemoryInfo memoryInfo = new();
|
||||
activityManager.GetMemoryInfo(memoryInfo);
|
||||
var nativeHeapSize = memoryInfo.TotalMem;
|
||||
var nativeHeapFreeSize = memoryInfo.AvailMem;
|
||||
var usedMemInBytes = nativeHeapSize - nativeHeapFreeSize;
|
||||
var usedMemInPercentage = usedMemInBytes * 100M / nativeHeapSize;
|
||||
b.Append($"{IOPath.GetSizeString(usedMemInBytes)} ({usedMemInPercentage:0.00}%)");
|
||||
#else
|
||||
b.Append(IOPath.GetSizeString(Environment.WorkingSet));
|
||||
#endif
|
||||
b.Append(platformService.IsInstall);
|
||||
b.AppendLine();
|
||||
|
||||
b.Append("[deploy.mode] ");
|
||||
@@ -197,12 +180,6 @@ namespace System.Application.UI
|
||||
|
||||
#if __ANDROID__
|
||||
|
||||
#if V2RAY
|
||||
b.Append("[v2ray.ver] ");
|
||||
b.Append(Libv2ray.Libv2ray.CheckVersionX());
|
||||
b.AppendLine();
|
||||
#endif
|
||||
|
||||
//if (_ThisAssembly.Debuggable)
|
||||
//{
|
||||
// b.Append("[app.multi] ");
|
||||
|
||||
@@ -118,11 +118,11 @@
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ExitCode_IsEmulator" xml:space="preserve">
|
||||
<value>This app doesn't support running in the emulator</value>
|
||||
<value>This app does not support running in the emulator</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="ExitCode_IsRoot" xml:space="preserve">
|
||||
<value>This app is not supported to run on devices with ROOT privileges</value>
|
||||
<value>This app does not support running on devices with ROOT permissions</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="ExitCode_IsVirtualApk" xml:space="preserve">
|
||||
@@ -130,7 +130,7 @@
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="ExitCode_IsXposedExists" xml:space="preserve">
|
||||
<value>This app does not support running on devices with the Xposed framework installed</value>
|
||||
<value>This app does not support running on devices with Xposed frameworks</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="ExitCode_IsRoot" xml:space="preserve">
|
||||
<value>Esta aplicación no es compatible para ejecutarse en dispositivos con privilegios ROOT</value>
|
||||
<value>Esta aplicación no admite la ejecución en dispositivos con permisos ROOT</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="ExitCode_IsVirtualApk" xml:space="preserve">
|
||||
@@ -130,7 +130,7 @@
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="ExitCode_IsXposedExists" xml:space="preserve">
|
||||
<value>Esta aplicación no admite la ejecución en dispositivos con el marco Xposed instalado</value>
|
||||
<value>Esta aplicación no admite la ejecución en dispositivos con marcos Xposed</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="ExitCode_IsRoot" xml:space="preserve">
|
||||
<value>Questa app non è supportata per l'esecuzione su dispositivi con privilegi ROOT</value>
|
||||
<value>Questa app non supporta l'esecuzione su dispositivi con autorizzazioni ROOT</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="ExitCode_IsVirtualApk" xml:space="preserve">
|
||||
@@ -130,7 +130,7 @@
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="ExitCode_IsXposedExists" xml:space="preserve">
|
||||
<value>Questa app non supporta l'esecuzione su dispositivi con il framework Xposed installato</value>
|
||||
<value>Questa app non supporta l'esecuzione su dispositivi con framework Xposed</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -118,19 +118,19 @@
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ExitCode_IsEmulator" xml:space="preserve">
|
||||
<value>Это приложение невозможно запустить через эмулятор</value>
|
||||
<comment>Comment=;Author=vanja-san</comment>
|
||||
<value>Это приложение не поддерживает запуск в эмуляторе</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="ExitCode_IsRoot" xml:space="preserve">
|
||||
<value>Это приложение невозможно запустить на устройствах с root правами</value>
|
||||
<comment>Comment=;Author=vanja-san</comment>
|
||||
<value>Это приложение не поддерживает запуск на устройствах с разрешениями ROOT</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="ExitCode_IsVirtualApk" xml:space="preserve">
|
||||
<value>Это приложение не поддерживает несколько окон</value>
|
||||
<comment>Comment=;Author=vanja-san</comment>
|
||||
<value>Это приложение не поддерживает многооткрытие</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="ExitCode_IsXposedExists" xml:space="preserve">
|
||||
<value>Это приложение невозможно запустить на устройствах с установленным Xposed Framework</value>
|
||||
<comment>Comment=;Author=vanja-san</comment>
|
||||
<value>Это приложение не поддерживает работу на устройствах, оснащенных платформой Xposed</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="MSBuild.Sdk.Extras">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>MonoAndroid12.0</TargetFramework>
|
||||
<TargetFramework>MonoAndroid11.0</TargetFramework>
|
||||
<RootNamespace>System</RootNamespace>
|
||||
<AssemblyName>System.Common.ClientLib.Droid</AssemblyName>
|
||||
<AndroidUseIntermediateDesignerFile>false</AndroidUseIntermediateDesignerFile>
|
||||
|
||||
@@ -2,62 +2,33 @@ using Android.Runtime;
|
||||
using Java.Security.Cert;
|
||||
using System.IO;
|
||||
using Xamarin.Android.Net;
|
||||
using X509Certificate2 = System.Security.Cryptography.X509Certificates.X509Certificate2;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace System
|
||||
{
|
||||
public static partial class HttpClientExtensions
|
||||
{
|
||||
const string certificateFileType = "X.509";
|
||||
|
||||
static readonly Lazy<CertificateFactory?> certificateFactory = new(() =>
|
||||
{
|
||||
var certificateFactory = CertificateFactory.GetInstance(certificateFileType);
|
||||
return certificateFactory;
|
||||
});
|
||||
|
||||
internal static CertificateFactory CertificateFactory
|
||||
{
|
||||
get
|
||||
{
|
||||
var certificateFactory = HttpClientExtensions.certificateFactory.Value;
|
||||
if (certificateFactory == null)
|
||||
throw new NullReferenceException(
|
||||
$"CertificateFactory.GetInstance Fail, Type: {certificateFileType}");
|
||||
return certificateFactory;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加可信任证书,可用于调试时 HTTPS 抓包
|
||||
/// 添加可信任证书,可用于调试时HTTPS抓包
|
||||
/// </summary>
|
||||
/// <param name="handler"></param>
|
||||
/// <param name="certificateFileData">证书文件数据(文件流,内嵌资源流)</param>
|
||||
/// <param name="certificateFileType">证书文件类型,默认使用X.509</param>
|
||||
public static void AddTrustedCert(
|
||||
this AndroidClientHandler handler,
|
||||
Stream certificateFileData)
|
||||
Stream certificateFileData,
|
||||
string certificateFileType = "X.509")
|
||||
{
|
||||
var certificate = CertificateFactory.GenerateCertificate(certificateFileData);
|
||||
var certificateFactory = CertificateFactory.GetInstance(certificateFileType);
|
||||
if (certificateFactory == null)
|
||||
throw new NullReferenceException(
|
||||
$"CertificateFactory.GetInstance Fail, Type: {certificateFileType}");
|
||||
var certificate = certificateFactory.GenerateCertificate(certificateFileData);
|
||||
if (certificate == null)
|
||||
throw new NullReferenceException("GenerateCertificate Fail");
|
||||
if (handler.TrustedCerts == null)
|
||||
handler.TrustedCerts = new JavaList<Certificate>();
|
||||
handler.TrustedCerts.Add(certificate);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 将 .NET 中的 X509 证书对象 转换为 JVM 中的 X509 证书对象
|
||||
/// <para>Java.Security.Cert.X509Certificate</para>
|
||||
/// <para>=></para>
|
||||
/// <para>System.Security.Cryptography.X509Certificates.X509Certificate2</para>
|
||||
/// </summary>
|
||||
/// <param name="certificate2"></param>
|
||||
/// <returns></returns>
|
||||
public static X509Certificate Convert(this X509Certificate2 certificate2)
|
||||
{
|
||||
using var stream = new MemoryStream(certificate2.RawData);
|
||||
return CertificateFactory.GenerateCertificate(stream)!.JavaCast<X509Certificate>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -51,14 +51,8 @@ namespace System.Application
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
}
|
||||
catch (PermissionException e)
|
||||
{
|
||||
Toast.Show(e.Message); // Xamarin.Essentials.PermissionException
|
||||
return null;
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
// The user canceled or something went wrong
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -102,7 +96,7 @@ namespace System.Application
|
||||
{
|
||||
Toast.Show(e.Message); // Xamarin.Essentials.PermissionException
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
catch
|
||||
{
|
||||
// The user canceled or something went wrong
|
||||
}
|
||||
@@ -145,7 +139,7 @@ namespace System.Application
|
||||
{
|
||||
Toast.Show(e.Message); // Xamarin.Essentials.PermissionException
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
catch
|
||||
{
|
||||
// The user canceled or something went wrong
|
||||
}
|
||||
@@ -175,14 +169,8 @@ namespace System.Application
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
}
|
||||
catch (PermissionException e)
|
||||
{
|
||||
Toast.Show(e.Message); // Xamarin.Essentials.PermissionException
|
||||
return null;
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
// The user canceled or something went wrong
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -224,7 +212,7 @@ namespace System.Application
|
||||
{
|
||||
Toast.Show(e.Message); // Xamarin.Essentials.PermissionException
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
catch
|
||||
{
|
||||
// The user canceled or something went wrong
|
||||
}
|
||||
@@ -267,7 +255,7 @@ namespace System.Application
|
||||
{
|
||||
Toast.Show(e.Message); // Xamarin.Essentials.PermissionException
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
catch
|
||||
{
|
||||
// The user canceled or something went wrong
|
||||
}
|
||||
@@ -290,14 +278,8 @@ namespace System.Application
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
catch (PermissionException e)
|
||||
{
|
||||
Toast.Show(e.Message); // Xamarin.Essentials.PermissionException
|
||||
return null;
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
// The user canceled or something went wrong
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace System.Application.Services
|
||||
if ((!string.IsNullOrWhiteSpace(value)) &&
|
||||
(string.IsNullOrWhiteSpace(textBoxText) ||
|
||||
(textBoxText.Length < value.Length &&
|
||||
value[..textBoxText.Length] == textBoxText)))
|
||||
value.Substring(0, textBoxText.Length) == textBoxText)))
|
||||
{
|
||||
return value;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,5 @@ namespace System
|
||||
public const string RFC1123 = "r";
|
||||
|
||||
public const string File = "yyyy-MM-dd HHmmssfffffff";
|
||||
|
||||
public const string YearMonth = "yyyy/MM";
|
||||
}
|
||||
}
|
||||
@@ -25,7 +25,7 @@ namespace System
|
||||
/// <param name="dt"></param>
|
||||
/// <returns></returns>
|
||||
public static DateTimeOffset GetCurrentMonth(this DateTimeOffset dt)
|
||||
=> new(dt.Year, dt.Month, 1, 0, 0, 0, dt.Offset);
|
||||
=> new(dt.Year, dt.Month, 1, 0, 0, 0, TimeSpan.Zero);
|
||||
|
||||
/// <summary>
|
||||
/// 根据时间日期获取当前月(最后一天)
|
||||
@@ -33,6 +33,6 @@ namespace System
|
||||
/// <param name="dt"></param>
|
||||
/// <returns></returns>
|
||||
public static DateTimeOffset GetCurrentMonthLastDay(this DateTimeOffset dt)
|
||||
=> new DateTimeOffset(dt.Year, dt.Month, 1, 0, 0, 0, dt.Offset).AddMonths(1).AddDays(-1);
|
||||
=> new DateTimeOffset(dt.Year, dt.Month, 1, 0, 0, 0, TimeSpan.Zero).AddMonths(1).AddDays(-1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -226,18 +226,10 @@ namespace System
|
||||
/// </summary>
|
||||
/// <param name="pattern">The wildcard pattern to convert.</param>
|
||||
/// <returns>A regex equivalent of the given wildcard.</returns>
|
||||
public static bool IsWildcard(this string str, string pattern, RegexOptions options = RegexOptions.Compiled)
|
||||
public static bool IsWildcard(this string str, string pattern)
|
||||
=> Regex.IsMatch(str, "^" + Regex.Escape(pattern)
|
||||
.Replace("\\*", ".*")
|
||||
.Replace("\\?", ".") + "$", options);
|
||||
|
||||
/// <summary>
|
||||
/// 域名表达式
|
||||
/// *表示任意0到多个字符
|
||||
/// </summary>
|
||||
public static bool IsDomainPattern(this string str, string pattern, RegexOptions options = RegexOptions.IgnoreCase)
|
||||
=> Regex.IsMatch(str, Regex.Escape(pattern)
|
||||
.Replace(@"\*", @"[^\.]*"), options);
|
||||
.Replace("\\?", ".") + "$", RegexOptions.Compiled);
|
||||
|
||||
#region Compressor
|
||||
|
||||
|
||||
+13
-128
@@ -3,7 +3,6 @@ using System.Diagnostics.CodeAnalysis;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Diagnostics;
|
||||
using System.Threading;
|
||||
#if !NET35 && !NOT_XE
|
||||
using System.Threading.Tasks;
|
||||
@@ -173,108 +172,27 @@ namespace System
|
||||
string destAppDataPath, string destCachePath,
|
||||
string sourceAppDataPath, string sourceCachePath)
|
||||
{
|
||||
bool ExistsNotEmptyDir(string path)
|
||||
{
|
||||
var exists = Directory.Exists(path);
|
||||
if (DesktopBridge.IsRunningAsUwp)
|
||||
{
|
||||
if (path == destCachePath || path == sourceCachePath)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return exists && Directory.EnumerateFileSystemEntries(path).Any();
|
||||
}
|
||||
|
||||
var paths = new[] { destAppDataPath, destCachePath, };
|
||||
var dict_paths = paths.ToDictionary(x => x, x => ExistsNotEmptyDir(x));
|
||||
var dict_paths = paths.ToDictionary(x => x, x => Directory.Exists(x) && Directory.EnumerateFileSystemEntries(x).Any());
|
||||
|
||||
if (dict_paths.Values.All(x => !x))
|
||||
{
|
||||
var old_paths = new[] { sourceAppDataPath, sourceCachePath, };
|
||||
if (old_paths.All(x => Directory.Exists(x) && Directory.EnumerateFileSystemEntries(x).Any())) // 迁移之前根目录上的文件夹
|
||||
{
|
||||
var isNotFirst = false;
|
||||
for (int i = 0; i < old_paths.Length; i++)
|
||||
{
|
||||
var path = paths[i];
|
||||
var old_path = old_paths[i];
|
||||
try
|
||||
{
|
||||
if (!isNotFirst)
|
||||
{
|
||||
try
|
||||
{
|
||||
// 尝试搜索之前版本的进程将其结束
|
||||
var currentProcess = Process.GetCurrentProcess();
|
||||
var query = from x in Process.GetProcessesByName(currentProcess.ProcessName)
|
||||
where x != currentProcess
|
||||
let m = x.TryGetMainModule()
|
||||
where m != null && m.FileName != currentProcess.TryGetMainModule()?.FileName
|
||||
select x;
|
||||
var process = query.ToArray();
|
||||
foreach (var proces in process)
|
||||
{
|
||||
try
|
||||
{
|
||||
#if NETCOREAPP3_0_OR_GREATER
|
||||
proces.Kill(true);
|
||||
#else
|
||||
proces.Kill();
|
||||
#endif
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
isNotFirst = true;
|
||||
}
|
||||
try
|
||||
{
|
||||
Directory.Move(old_path, path);
|
||||
}
|
||||
catch
|
||||
{
|
||||
try
|
||||
{
|
||||
CopyDirectory(old_path, path);
|
||||
}
|
||||
catch
|
||||
{
|
||||
if (OperatingSystem2.IsWindows)
|
||||
{
|
||||
var psi = new ProcessStartInfo
|
||||
{
|
||||
FileName = "cmd.exe",
|
||||
UseShellExecute = false,
|
||||
CreateNoWindow = true,
|
||||
RedirectStandardInput = true,
|
||||
};
|
||||
var p = Process.Start(psi);
|
||||
p.Start();
|
||||
p.StandardInput.WriteLine($"xcopy \"{old_path}\" \"{path}\" /y &exit");
|
||||
p.WaitForExit(10000);
|
||||
p.Kill();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
Directory.Move(old_path, path);
|
||||
dict_paths[path] = true;
|
||||
}
|
||||
catch
|
||||
{
|
||||
if (!DesktopBridge.IsRunningAsUwp)
|
||||
{
|
||||
// 跨卷移动失败或其他原因失败,使用旧的目录,并尝试删除创建的空文件夹
|
||||
DirTryDelete(path);
|
||||
}
|
||||
// 跨卷移动失败或其他原因失败,使用旧的目录,并尝试删除创建的空文件夹
|
||||
DirTryDelete(path);
|
||||
paths[i] = old_path;
|
||||
}
|
||||
}
|
||||
@@ -476,16 +394,16 @@ namespace System
|
||||
/// </summary>
|
||||
/// <param name="filePath"></param>
|
||||
/// <returns>单位 字节</returns>
|
||||
public static decimal GetFileSize(FileInfo fileInfo) => fileInfo.Exists ? fileInfo.Length : 0M;
|
||||
public static double GetFileSize(FileInfo fileInfo) => fileInfo.Exists ? fileInfo.Length : 0D;
|
||||
|
||||
/// <summary>
|
||||
/// 获取指定路径的大小
|
||||
/// </summary>
|
||||
/// <param name="dirPath">路径</param>
|
||||
/// <returns>单位 字节</returns>
|
||||
public static decimal GetDirectorySize(string dirPath)
|
||||
public static double GetDirectorySize(string dirPath)
|
||||
{
|
||||
var len = 0M;
|
||||
double len = 0D;
|
||||
// 判断该路径是否存在(是否为文件夹)
|
||||
var isDirectory = IsDirectory(dirPath, out var fileInfo, out var directoryInfo);
|
||||
if (isDirectory.HasValue)
|
||||
@@ -506,12 +424,12 @@ namespace System
|
||||
return len;
|
||||
}
|
||||
|
||||
const decimal unit = 1024M;
|
||||
static readonly string[] units = new[] { "B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB", "BB" };
|
||||
const double unit = 1024d;
|
||||
static readonly string[] units = new[] { "B", "KB", "MB", "GB", "TB" };
|
||||
|
||||
public static (decimal length, string unit) GetSize(decimal length)
|
||||
public static (double length, string unit) GetSize(double length)
|
||||
{
|
||||
if (length > 0M)
|
||||
if (length > 0d)
|
||||
{
|
||||
for (int i = 0; i < units.Length; i++)
|
||||
{
|
||||
@@ -522,11 +440,11 @@ namespace System
|
||||
}
|
||||
else
|
||||
{
|
||||
return (0M, units.First());
|
||||
return (0, units.First());
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetSizeString(decimal length)
|
||||
public static string GetSizeString(double length)
|
||||
{
|
||||
(length, string unit) = GetSize(length);
|
||||
return $"{length:0.00} {unit}";
|
||||
@@ -542,38 +460,5 @@ namespace System
|
||||
|
||||
public const char UnixDirectorySeparatorChar = '/';
|
||||
public const char WinDirectorySeparatorChar = '\\';
|
||||
|
||||
public static void CopyDirectory(string sourceDir, string destinationDir, bool recursive = true)
|
||||
{
|
||||
// Get information about the source directory
|
||||
var dir = new DirectoryInfo(sourceDir);
|
||||
|
||||
// Check if the source directory exists
|
||||
if (!dir.Exists)
|
||||
throw new DirectoryNotFoundException($"Source directory not found: {dir.FullName}");
|
||||
|
||||
// Cache directories before we start copying
|
||||
DirectoryInfo[] dirs = dir.GetDirectories();
|
||||
|
||||
// Create the destination directory
|
||||
Directory.CreateDirectory(destinationDir);
|
||||
|
||||
// Get the files in the source directory and copy to the destination directory
|
||||
foreach (FileInfo file in dir.GetFiles())
|
||||
{
|
||||
string targetFilePath = Path.Combine(destinationDir, file.Name);
|
||||
file.CopyTo(targetFilePath);
|
||||
}
|
||||
|
||||
// If recursive and copying subdirectories, recursively call this method
|
||||
if (recursive)
|
||||
{
|
||||
foreach (DirectoryInfo subDir in dirs)
|
||||
{
|
||||
string newDestinationDir = Path.Combine(destinationDir, subDir.Name);
|
||||
CopyDirectory(subDir.FullName, newDestinationDir, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -206,7 +206,7 @@
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="OpenCoreByProcess_Win32Exception_" xml:space="preserve">
|
||||
<value>Open web link failed 0x{0}, please set the system default browser before trying</value>
|
||||
<value>Open web link fails 0x{0}, please set the system default browser before trying</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -206,7 +206,7 @@
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="OpenCoreByProcess_Win32Exception_" xml:space="preserve">
|
||||
<value>Abrir enlace web falló 0x{0}, configure el navegador predeterminado del sistema antes de intentarlo</value>
|
||||
<value>Abrir enlace web falla 0x{0}, configure el navegador predeterminado del sistema antes de intentarlo</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -206,7 +206,7 @@
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="OpenCoreByProcess_Win32Exception_" xml:space="preserve">
|
||||
<value>Apri collegamento Web non riuscito 0x{0}, imposta il browser predefinito del sistema prima di provare</value>
|
||||
<value>Il collegamento Web aperto non riesce 0x{0}, impostare il browser predefinito del sistema prima di provare</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -118,95 +118,95 @@
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="Age_" xml:space="preserve">
|
||||
<value>Возраст: {0}</value>
|
||||
<comment>Comment=;Author=vanja-san</comment>
|
||||
<value>{0} лет</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="DayOfWeek_L0" xml:space="preserve">
|
||||
<value>Воскресенье</value>
|
||||
<comment>Comment=;Author=vanja-san</comment>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="DayOfWeek_L1" xml:space="preserve">
|
||||
<value>Понедельник</value>
|
||||
<comment>Comment=;Author=vanja-san</comment>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="DayOfWeek_L2" xml:space="preserve">
|
||||
<value>Вторник</value>
|
||||
<comment>Comment=;Author=vanja-san</comment>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="DayOfWeek_L3" xml:space="preserve">
|
||||
<value>Среда</value>
|
||||
<comment>Comment=;Author=vanja-san</comment>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="DayOfWeek_L4" xml:space="preserve">
|
||||
<value>Четверг</value>
|
||||
<comment>Comment=;Author=vanja-san</comment>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="DayOfWeek_L5" xml:space="preserve">
|
||||
<value>Пятница</value>
|
||||
<comment>Comment=;Author=vanja-san</comment>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="DayOfWeek_L6" xml:space="preserve">
|
||||
<value>Суббота</value>
|
||||
<comment>Comment=;Author=vanja-san</comment>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="DayOfWeek_S0" xml:space="preserve">
|
||||
<value>Воскресенье</value>
|
||||
<comment>Comment=;Author=vanja-san</comment>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="DayOfWeek_S1" xml:space="preserve">
|
||||
<value>Понедельник</value>
|
||||
<comment>Comment=;Author=vanja-san</comment>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="DayOfWeek_S2" xml:space="preserve">
|
||||
<value>Вторник</value>
|
||||
<comment>Comment=;Author=vanja-san</comment>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="DayOfWeek_S3" xml:space="preserve">
|
||||
<value>Среда</value>
|
||||
<comment>Comment=;Author=vanja-san</comment>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="DayOfWeek_S4" xml:space="preserve">
|
||||
<value>Четверг</value>
|
||||
<comment>Comment=;Author=vanja-san</comment>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="DayOfWeek_S5" xml:space="preserve">
|
||||
<value>Пятница</value>
|
||||
<comment>Comment=;Author=vanja-san</comment>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="DayOfWeek_S6" xml:space="preserve">
|
||||
<value>Суббота</value>
|
||||
<comment>Comment=;Author=vanja-san</comment>
|
||||
<value>В субботу</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="Female" xml:space="preserve">
|
||||
<value>Женщина</value>
|
||||
<comment>Comment=;Author=vanja-san</comment>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="He" xml:space="preserve">
|
||||
<value>Он</value>
|
||||
<comment>Comment=;Author=vanja-san</comment>
|
||||
<value>Его</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="Male" xml:space="preserve">
|
||||
<value>Мужчина</value>
|
||||
<comment>Comment=;Author=vanja-san</comment>
|
||||
<value>Мужчины</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="NotSupported_FixedSizeCollection" xml:space="preserve">
|
||||
<value>Коллекция имела фиксированный размер.</value>
|
||||
<comment>Comment=https://github.com/dotnet/runtime/blob/v5.0.0-rc.1.20451.14/src/libraries/System.Private.CoreLib/src/Resources/Strings.resx#L2893;Author=vanja-san</comment>
|
||||
<value>Collection was of a fixed size.</value>
|
||||
<comment>Comment=https://github.com/dotnet/runtime/blob/v5.0.0-rc.1.20451.14/src/libraries/System.Private.CoreLib/src/Resources/Strings.resx#L2893;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="She" xml:space="preserve">
|
||||
<value>Она</value>
|
||||
<comment>Comment=;Author=vanja-san</comment>
|
||||
<value>ее</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="Unknown" xml:space="preserve">
|
||||
<value>Неизвестно</value>
|
||||
<comment>Comment=;Author=vanja-san</comment>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="UnsupportedPhoneNumberSegment_" xml:space="preserve">
|
||||
<value>Неподдерживаемые номера телефонов ({0})</value>
|
||||
<comment>Comment=;Author=vanja-san</comment>
|
||||
<value>Неподдерживаемый сегмент номера мобильного телефона ({0})</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="OpenCoreByProcess_Win32Exception_" xml:space="preserve">
|
||||
<value>Невозможно открыть ссылку 0x{0}, повторите снова, после установки браузер по умолчанию.</value>
|
||||
<comment>Comment=;Author=vanja-san</comment>
|
||||
<value>Открытие веб-ссылки завершается неудачей {0} 0x, установите системный браузер по умолчанию и повторите попытку</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -206,7 +206,7 @@
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="OpenCoreByProcess_Win32Exception_" xml:space="preserve">
|
||||
<value>打開 Web 連結失敗 0x{0},請設定系統預設瀏覽器後再嘗試</value>
|
||||
<value>打開 Web 連結失敗 0x{0},請設置系統預設瀏覽器後再嘗試</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
namespace System.Properties
|
||||
{
|
||||
partial class ThisAssembly
|
||||
{
|
||||
public static string DisplayTrademark => /*DesktopBridge.IsRunningAsUwp ? $"蒸汽++" :*/ AssemblyTrademark;
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ namespace System.Properties
|
||||
/// <item> macOS:\packaging\build-osx-app.sh <CFBundleVersion> <CFBundleShortVersionString> </item>
|
||||
/// </list>
|
||||
/// </summary>
|
||||
public const string Version = "2.7.0";
|
||||
public const string Version = "2.6.7";
|
||||
|
||||
//public const string InfoVersion = Version + "-beta";
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace System.Properties
|
||||
/// <summary>
|
||||
/// 提供程序集的文本说明
|
||||
/// </summary>
|
||||
public const string AssemblyDescription = "「Steam++ 工具箱」是一个开源跨平台的多功能游戏工具箱。";
|
||||
public const string AssemblyDescription = "「Steam++」是一个包含多种Steam工具功能的工具箱。";
|
||||
|
||||
/// <summary>
|
||||
/// 定义程序集清单的版权自定义属性
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// https://github.com/dotnet/runtime/blob/main/src/libraries/System.Private.CoreLib/src/System/Runtime/CompilerServices/IsExternalInit.cs
|
||||
// https://stackoverflow.com/questions/64749385/predefined-type-system-runtime-compilerservices-isexternalinit-is-not-defined
|
||||
// https://stackoverflow.com/questions/62648189/testing-c-sharp-9-0-in-vs2019-cs0518-isexternalinit-is-not-defined-or-imported
|
||||
// https://github.com/dotnet/roslyn/issues/45510
|
||||
// https://docs.microsoft.com/zh-cn/dotnet/api/system.runtime.compilerservices.isexternalinit?view=net-6.0
|
||||
#if NETSTANDARD2_1
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace System.Runtime.CompilerServices
|
||||
{
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public class IsExternalInit
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="MSBuild.Sdk.Extras">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>MonoAndroid12.0;netstandard2.1</TargetFrameworks>
|
||||
<TargetFrameworks>MonoAndroid11.0;netstandard2.1</TargetFrameworks>
|
||||
<RootNamespace>System</RootNamespace>
|
||||
<AssemblyName>System.Common.PinyinLib.TinyPinyin</AssemblyName>
|
||||
</PropertyGroup>
|
||||
|
||||
Binary file not shown.
@@ -1,44 +0,0 @@
|
||||
<Project Sdk="MSBuild.Sdk.Extras">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>MonoAndroid12.0</TargetFramework>
|
||||
<IsBindingProject>true</IsBindingProject>
|
||||
<!--<GeneratePackageOnBuild>true</GeneratePackageOnBuild>-->
|
||||
<PackageLicenseExpression>GPL-3.0-only</PackageLicenseExpression>
|
||||
<Version>1.0.0</Version>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<PackageProjectUrl>https://github.com/AigioL/xamarin-bindings</PackageProjectUrl>
|
||||
<RepositoryUrl>https://github.com/AigioL/xamarin-bindings.git</RepositoryUrl>
|
||||
<PackageTags>Shadowsocks Shadowsocks-Android Xamarin Plugin Binding Xamarin.Android</PackageTags>
|
||||
<Product>Shadowsocks</Product>
|
||||
<Company />
|
||||
<PackageId>XAB.Shadowsocks</PackageId>
|
||||
<Title>Xamarin Android Binding Library - Shadowsocks</Title>
|
||||
<Authors>https://github.com/AigioL</Authors>
|
||||
<Description>
|
||||
Shadowsocks Binding for Xamarin Android. https://github.com/shadowsocks/shadowsocks-android
|
||||
|
||||
Commonly Used Types:
|
||||
com.github.shadowsocks -> Shadowsocks
|
||||
</Description>
|
||||
<!--<GenerateDocumentationFile>true</GenerateDocumentationFile>-->
|
||||
<!--<AllowUnsafeBlocks>true</AllowUnsafeBlocks>-->
|
||||
<!--<PublishRepositoryUrl>true</PublishRepositoryUrl>-->
|
||||
<!--<EmbedUntrackedSources>true</EmbedUntrackedSources>-->
|
||||
<!--<IncludeSymbols>true</IncludeSymbols>-->
|
||||
<!--<SymbolPackageFormat>snupkg</SymbolPackageFormat>-->
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<LibraryProjectZip Include="Jars\*.aar" />
|
||||
<TransformFile Include="Transforms\*.xml" />
|
||||
<None Remove="Transforms\*.xml" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Xamarin.AndroidX.AppCompat" />
|
||||
<PackageReference Include="Xamarin.KotlinX.Coroutines.Core" />
|
||||
<PackageReference Include="Xamarin.KotlinX.Coroutines.Android" />
|
||||
<!--<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />-->
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,17 +0,0 @@
|
||||
<metadata>
|
||||
<!--
|
||||
This sample removes the class: android.support.v4.content.AsyncTaskLoader.LoadTask:
|
||||
<remove-node path="/api/package[@name='android.support.v4.content']/class[@name='AsyncTaskLoader.LoadTask']" />
|
||||
|
||||
This sample removes the method: android.support.v4.content.CursorLoader.loadInBackground:
|
||||
<remove-node path="/api/package[@name='android.support.v4.content']/class[@name='CursorLoader']/method[@name='loadInBackground']" />
|
||||
-->
|
||||
<remove-node path="/api/package[@name='net.steampp.app.shadowsocks.bg']/class[@name='Executable']" />
|
||||
<remove-node path="/api/package[@name='net.steampp.app.shadowsocks.bg']/class[@name='GuardedProcessPool']" />
|
||||
<remove-node path="/api/package[@name='net.steampp.app.shadowsocks.utils']" />
|
||||
<remove-node path="/api/package[@name='net.steampp.app.shadowsocks']/class[@name='BuildConfig']" />
|
||||
<attr path="/api/package[@name='net.steampp.app.shadowsocks.bg']"
|
||||
name="managedName">Shadowsocks</attr>
|
||||
<attr path="/api/package[@name='net.steampp.app.shadowsocks']"
|
||||
name="managedName">Shadowsocks</attr>
|
||||
</metadata>
|
||||
Binary file not shown.
@@ -1,46 +0,0 @@
|
||||
<Project Sdk="MSBuild.Sdk.Extras">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>MonoAndroid12.0</TargetFramework>
|
||||
<IsBindingProject>true</IsBindingProject>
|
||||
<!--<GeneratePackageOnBuild>true</GeneratePackageOnBuild>-->
|
||||
<PackageLicenseExpression>GPL-3.0-only</PackageLicenseExpression>
|
||||
<Version>1.0.0</Version>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<PackageProjectUrl>https://github.com/AigioL/xamarin-bindings</PackageProjectUrl>
|
||||
<RepositoryUrl>https://github.com/AigioL/xamarin-bindings.git</RepositoryUrl>
|
||||
<PackageTags>v2rayNG V2Ray Xamarin Plugin Binding Xamarin.Android</PackageTags>
|
||||
<Product>v2rayNG</Product>
|
||||
<Company />
|
||||
<PackageId>XAB.v2rayNG</PackageId>
|
||||
<Title>Xamarin Android Binding Library - v2rayNG</Title>
|
||||
<Authors>https://github.com/AigioL</Authors>
|
||||
<Description>
|
||||
v2rayNG Binding for Xamarin Android. https://github.com/2dust/v2rayNG
|
||||
|
||||
Commonly Used Types:
|
||||
com.v2ray.ang.service.V2RayVpnService -> V2RayNG.V2RayVpnService
|
||||
</Description>
|
||||
<!--<GenerateDocumentationFile>true</GenerateDocumentationFile>-->
|
||||
<!--<AllowUnsafeBlocks>true</AllowUnsafeBlocks>-->
|
||||
<!--<PublishRepositoryUrl>true</PublishRepositoryUrl>-->
|
||||
<!--<EmbedUntrackedSources>true</EmbedUntrackedSources>-->
|
||||
<!--<IncludeSymbols>true</IncludeSymbols>-->
|
||||
<!--<SymbolPackageFormat>snupkg</SymbolPackageFormat>-->
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<LibraryProjectZip Include="Jars\*.aar" />
|
||||
<TransformFile Include="Transforms\*.xml" />
|
||||
<None Remove="Transforms\*.xml" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="XAB.AndroidLibV2rayLite" />
|
||||
<PackageReference Include="Xamarin.AndroidX.AppCompat" />
|
||||
<PackageReference Include="Xamarin.KotlinX.Coroutines.Core" />
|
||||
<PackageReference Include="Xamarin.KotlinX.Coroutines.Android" />
|
||||
<PackageReference Include="Xamarin.Android.ReactiveX.RxJava3.RxJava" />
|
||||
<!--<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />-->
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,15 +0,0 @@
|
||||
<metadata>
|
||||
<!--
|
||||
This sample removes the class: android.support.v4.content.AsyncTaskLoader.LoadTask:
|
||||
<remove-node path="/api/package[@name='android.support.v4.content']/class[@name='AsyncTaskLoader.LoadTask']" />
|
||||
|
||||
This sample removes the method: android.support.v4.content.CursorLoader.loadInBackground:
|
||||
<remove-node path="/api/package[@name='android.support.v4.content']/class[@name='CursorLoader']/method[@name='loadInBackground']" />
|
||||
-->
|
||||
<remove-node path="/api/package[@name='net.steampp.app.v2ray.util']" />
|
||||
<remove-node path="/api/package[@name='net.steampp.app.v2ray']" />
|
||||
<remove-node path="/api/package[@name='net.steampp.app.v2ray.service.ServiceControl']" />
|
||||
<attr path="/api/package[@name='net.steampp.app.v2ray.service']"
|
||||
name="managedName">V2RayNG</attr>
|
||||
<remove-node path="/api/package[@name='net.steampp.app.v2ray.extension']" />
|
||||
</metadata>
|
||||
@@ -18,13 +18,13 @@ namespace System
|
||||
if (value.HasValue)
|
||||
{
|
||||
checkBox.Checked = value.Value;
|
||||
if (checkBox.GetTag(R.Id.checkbox_indeterminate_state) is Drawable d && checkBox.GetButtonDrawableCompat() != d) drawable = d;
|
||||
if (checkBox.GetTag(R.Id.checkbox_indeterminate_state) is Drawable d && checkBox.ButtonDrawable != d) drawable = d;
|
||||
checkBox.SetTag(R.Id.checkbox_indeterminate_state, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (checkBox.GetTag(R.Id.checkbox_indeterminate_state) == null)
|
||||
checkBox.SetTag(R.Id.checkbox_indeterminate_state, checkBox.GetButtonDrawableCompat());
|
||||
checkBox.SetTag(R.Id.checkbox_indeterminate_state, checkBox.ButtonDrawable);
|
||||
drawable = checkBox.Context!.GetDrawableCompat(R.Drawable.bg_checkbox_indeterminate);
|
||||
}
|
||||
if (drawable != null) checkBox.SetButtonDrawable(drawable);
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
using Android.Graphics.Drawables;
|
||||
using Android.Widget;
|
||||
using AndroidX.Core.Widget;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace System
|
||||
{
|
||||
/// <summary>
|
||||
/// <see cref="CompoundButton"/> 扩展
|
||||
/// </summary>
|
||||
public static partial class CompoundButtonExtensions
|
||||
{
|
||||
public static Drawable? GetButtonDrawableCompat(this CompoundButton button) => CompoundButtonCompat.GetButtonDrawable(button);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using Android.Content;
|
||||
using Android.Flexbox;
|
||||
using Android.Graphics;
|
||||
using Android.Graphics.Drawables;
|
||||
using AndroidX.Annotations;
|
||||
@@ -26,16 +25,6 @@ namespace System
|
||||
recycleView.SetLayoutManager(layout);
|
||||
}
|
||||
|
||||
public static void SetFlexboxLayoutManager(this RecyclerView recycleView, int flexDirection = FlexDirection.Row, int justifyContent = JustifyContent.FlexStart)
|
||||
{
|
||||
var layout = new FlexboxLayoutManager(recycleView.Context!)
|
||||
{
|
||||
FlexDirection = flexDirection,
|
||||
JustifyContent = justifyContent,
|
||||
};
|
||||
recycleView.SetLayoutManager(layout);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加纵向列表组项间距,使用 <see cref="VerticalGroupItemDecoration(int)"/>
|
||||
/// </summary>
|
||||
|
||||
@@ -6,8 +6,6 @@ using AndroidUri = Android.Net.Uri;
|
||||
using Fragment = AndroidX.Fragment.App.Fragment;
|
||||
using JFile = Java.IO.File;
|
||||
using ASettings = Android.Provider.Settings;
|
||||
using Android.Security;
|
||||
using System.IO;
|
||||
|
||||
namespace System.Application
|
||||
{
|
||||
@@ -84,38 +82,34 @@ namespace System.Application
|
||||
return default;
|
||||
}
|
||||
|
||||
// [Obsolete]
|
||||
// public static void StartActivity(Activity activity, Type activityType, object viewModel, Type? viewModelType = null)
|
||||
// {
|
||||
// viewModelType ??= viewModel.GetType();
|
||||
// var viewModel_ = Serializable.SMP(viewModelType, viewModel);
|
||||
//#if DEBUG
|
||||
// var t = Serializable.DMP(viewModelType, viewModel_);
|
||||
//#endif
|
||||
// StartActivity(activity, activityType, viewModel_);
|
||||
// }
|
||||
public static void StartActivity(Activity activity, Type activityType, object viewModel, Type? viewModelType = null)
|
||||
{
|
||||
viewModelType ??= viewModel.GetType();
|
||||
var viewModel_ = Serializable.SMP(viewModelType, viewModel);
|
||||
#if DEBUG
|
||||
var t = Serializable.DMP(viewModelType, viewModel_);
|
||||
#endif
|
||||
StartActivity(activity, activityType, viewModel_);
|
||||
}
|
||||
|
||||
// [Obsolete]
|
||||
// public static void StartActivity(Fragment fragment, Type activityType, object viewModel, Type? viewModelType = null)
|
||||
// {
|
||||
// var activity = fragment.Activity;
|
||||
// if (activity == null) return;
|
||||
// StartActivity(activity, activityType, viewModel, viewModelType);
|
||||
// }
|
||||
public static void StartActivity(Fragment fragment, Type activityType, object viewModel, Type? viewModelType = null)
|
||||
{
|
||||
var activity = fragment.Activity;
|
||||
if (activity == null) return;
|
||||
StartActivity(activity, activityType, viewModel, viewModelType);
|
||||
}
|
||||
|
||||
// [Obsolete]
|
||||
// public static void StartActivity<TActivity>(Activity activity, object viewModel, Type? viewModelType = null)
|
||||
// {
|
||||
// StartActivity(activity, typeof(TActivity), viewModel, viewModelType);
|
||||
// }
|
||||
public static void StartActivity<TActivity>(Activity activity, object viewModel, Type? viewModelType = null)
|
||||
{
|
||||
StartActivity(activity, typeof(TActivity), viewModel, viewModelType);
|
||||
}
|
||||
|
||||
// [Obsolete]
|
||||
// public static void StartActivity<TActivity>(Fragment fragment, object viewModel, Type? viewModelType = null)
|
||||
// {
|
||||
// var activity = fragment.Activity;
|
||||
// if (activity == null) return;
|
||||
// StartActivity<TActivity>(activity, viewModel, viewModelType);
|
||||
// }
|
||||
public static void StartActivity<TActivity>(Fragment fragment, object viewModel, Type? viewModelType = null)
|
||||
{
|
||||
var activity = fragment.Activity;
|
||||
if (activity == null) return;
|
||||
StartActivity<TActivity>(activity, viewModel, viewModelType);
|
||||
}
|
||||
|
||||
public static void StartActivity<TViewModel>(Activity activity, Type activityType, TViewModel viewModel)
|
||||
{
|
||||
@@ -145,16 +139,12 @@ namespace System.Application
|
||||
StartActivity<TActivity, TViewModel>(activity, viewModel);
|
||||
}
|
||||
|
||||
public static bool OpenFile(Context context, JFile jFile, string mime, string? name = null)
|
||||
public static bool OpenFile(Context context, JFile jFile, string mime)
|
||||
{
|
||||
try
|
||||
{
|
||||
var sdkInt = (int)Build.VERSION.SdkInt;
|
||||
var intent = new Intent(Intent.ActionView);
|
||||
if (!string.IsNullOrWhiteSpace(name))
|
||||
{
|
||||
intent.PutExtra("name", name);
|
||||
}
|
||||
AndroidUri apkUri;
|
||||
if (sdkInt >= (int)BuildVersionCodes.N) // 7.0 FileProvider
|
||||
{
|
||||
@@ -178,54 +168,16 @@ namespace System.Application
|
||||
|
||||
public static bool InstallApk(Context context, JFile apkFile) => OpenFile(context, apkFile, MediaTypeNames.APK);
|
||||
|
||||
public static bool InstallApk(Context context, string apkFilePath)
|
||||
public static void InstallApk(Context context, string apkFilePath)
|
||||
{
|
||||
JFile apkFile = new(apkFilePath);
|
||||
return InstallApk(context, apkFile);
|
||||
}
|
||||
|
||||
public static Intent? GetInstallCertificateIntent(string filePath, string name)
|
||||
{
|
||||
try
|
||||
{
|
||||
// com.adguard.android.service.q(HttpsFilteringServiceImpl).f()
|
||||
var intent = KeyChain.CreateInstallIntent();
|
||||
intent.PutExtra("name", name);
|
||||
intent.PutExtra("CERT", File.ReadAllBytes(filePath));
|
||||
intent.AddFlags(ActivityFlags.NewTask);
|
||||
return intent;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool InstallCertificate(Context context, string filePath, string name)
|
||||
{
|
||||
try
|
||||
{
|
||||
var intent = GetInstallCertificateIntent(filePath, name);
|
||||
if (intent == null) return false;
|
||||
context.StartActivity(intent);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public static Intent GetNewTaskIntent(string action)
|
||||
{
|
||||
var intent = new Intent(action);
|
||||
intent.AddFlags(ActivityFlags.NewTask);
|
||||
return intent;
|
||||
InstallApk(context, apkFile);
|
||||
}
|
||||
|
||||
static void StartNewTaskActivity(Context context, string action)
|
||||
{
|
||||
var intent = GetNewTaskIntent(action);
|
||||
var intent = new Intent(action);
|
||||
intent.AddFlags(ActivityFlags.NewTask);
|
||||
context.StartActivity(intent);
|
||||
}
|
||||
|
||||
|
||||
@@ -15,13 +15,6 @@ namespace System.Application
|
||||
ConfigChanges.LayoutDirection |
|
||||
ConfigChanges.SmallestScreenSize;
|
||||
|
||||
public const ConfigChanges ConfigurationChangesWithOutOrientationLocale =
|
||||
ConfigChanges.ScreenSize |
|
||||
ConfigChanges.Keyboard |
|
||||
ConfigChanges.KeyboardHidden |
|
||||
ConfigChanges.ScreenLayout |
|
||||
ConfigChanges.SmallestScreenSize;
|
||||
|
||||
public const string MainTheme2 = "@style/MainTheme2";
|
||||
public const string MainTheme2_NoActionBar = "@style/MainTheme2.NoActionBar";
|
||||
public const string MainTheme2_Splash = "@style/MainTheme2.Splash";
|
||||
|
||||
@@ -4,8 +4,7 @@
|
||||
<TargetFrameworks>MonoAndroid12.0</TargetFrameworks>
|
||||
<RootNamespace>System.Application</RootNamespace>
|
||||
<AssemblyName>Xamarin.Forms.Platform.Android.UnitTests</AssemblyName>
|
||||
<DefineConstants>SHADOWSOCKS;__HAVE_ANDROIDX__;$(DefineConstants)</DefineConstants>
|
||||
<!--<DefineConstants>SHADOWSOCKS;V2RAY;__HAVE_ANDROIDX__;$(DefineConstants)</DefineConstants>-->
|
||||
<DefineConstants>__HAVE_ANDROIDX__;$(DefineConstants)</DefineConstants>
|
||||
<SupportedOSPlatformVersion Condition="$(TargetFramework.Contains('-android'))">21.0</SupportedOSPlatformVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -113,10 +112,6 @@
|
||||
<Compile Include="..\ST.Client.Desktop.Avalonia\ServiceCollectionExtensions.AddWindowManager.cs" />
|
||||
<Compile Include="..\ST.Client.Desktop.Avalonia\ServiceCollectionExtensions.AddApplicationUpdateService.cs" />
|
||||
<AndroidResource Include="Resources\**\*" />
|
||||
<Compile Remove="Services\V2Ray\**" />
|
||||
<EmbeddedResource Remove="Services\V2Ray\**" />
|
||||
<None Remove="Services\V2Ray\**" />
|
||||
<Compile Remove="Services\Native\ProxyForegroundService.JNI.tun2http.cs" />
|
||||
<None Remove="Resources\layout\controls_btntext.xml" />
|
||||
<Compile Include="..\AboutAppInfoPopup.cs">
|
||||
<LinkBase>UI</LinkBase>
|
||||
@@ -124,7 +119,6 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="XAB.FlexboxLayout" />
|
||||
<PackageReference Include="de.hdodenhof.circleimageview" />
|
||||
<PackageReference Include="Xamarin.AndroidX.AppCompat" />
|
||||
<PackageReference Include="Xamarin.AndroidX.SwipeRefreshLayout" />
|
||||
@@ -161,8 +155,6 @@
|
||||
</ItemGroup>-->
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Condition=" $(DefineConstants.Contains(`V2RAY`)) " Include="..\ST.Client.Android.V2Ray\ST.Client.Android.V2Ray.csproj" />
|
||||
<ProjectReference Condition=" $(DefineConstants.Contains(`SHADOWSOCKS`)) " Include="..\ST.Client.Android.Shadowsocks\ST.Client.Android.Shadowsocks.csproj" />
|
||||
<ProjectReference Include="..\ST.Client.XamarinForms\ST.Client.XamarinForms.csproj" Condition=" $(DefineConstants.Contains(`__XAMARIN_FORMS__`)) " />
|
||||
<ProjectReference Include="..\ST.Client\ST.Client.csproj" />
|
||||
</ItemGroup>
|
||||
@@ -323,9 +315,6 @@
|
||||
<AndroidResource Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\drawable\bg_textbox.xml">
|
||||
<Link>Resources\drawable\bg_textbox.xml</Link>
|
||||
</AndroidResource>
|
||||
<AndroidResource Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\drawable\bg_vpn_shape_gradient.xml">
|
||||
<Link>Resources\drawable\bg_vpn_shape_gradient.xml</Link>
|
||||
</AndroidResource>
|
||||
<AndroidResource Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\drawable\icon_apple_24.xml">
|
||||
<Link>Resources\drawable\icon_apple_24.xml</Link>
|
||||
</AndroidResource>
|
||||
@@ -374,18 +363,9 @@
|
||||
<AndroidResource Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\drawable\ic_baseline_remove_circle_outline_24.xml">
|
||||
<Link>Resources\drawable\ic_baseline_remove_circle_outline_24.xml</Link>
|
||||
</AndroidResource>
|
||||
<AndroidResource Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\drawable\ic_baseline_security_24.xml">
|
||||
<Link>Resources\drawable\ic_baseline_security_24.xml</Link>
|
||||
</AndroidResource>
|
||||
<AndroidResource Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\drawable\ic_baseline_stop_24.xml">
|
||||
<Link>Resources\drawable\ic_baseline_stop_24.xml</Link>
|
||||
</AndroidResource>
|
||||
<AndroidResource Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\drawable\ic_baseline_vpn_key_24.xml">
|
||||
<Link>Resources\drawable\ic_baseline_vpn_key_24.xml</Link>
|
||||
</AndroidResource>
|
||||
<AndroidResource Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\drawable\ic_fluent_certificate_24_regular.xml">
|
||||
<Link>Resources\drawable\ic_fluent_certificate_24_regular.xml</Link>
|
||||
</AndroidResource>
|
||||
<AndroidResource Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\drawable\mdi_rocket_black_24.xml">
|
||||
<Link>Resources\drawable\mdi_rocket_black_24.xml</Link>
|
||||
</AndroidResource>
|
||||
@@ -452,12 +432,6 @@
|
||||
<AndroidResource Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\drawable-xxhdpi\logo.png">
|
||||
<Link>Resources\drawable-xxhdpi\logo.png</Link>
|
||||
</AndroidResource>
|
||||
<AndroidResource Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\drawable-xxhdpi\logo_kotlin_20.png">
|
||||
<Link>Resources\drawable-xxhdpi\logo_kotlin_20.png</Link>
|
||||
</AndroidResource>
|
||||
<AndroidResource Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\drawable-xxhdpi\logo_xamarin_20.png">
|
||||
<Link>Resources\drawable-xxhdpi\logo_xamarin_20.png</Link>
|
||||
</AndroidResource>
|
||||
<AndroidResource Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\drawable-xxhdpi\splash_logo.png">
|
||||
<Link>Resources\drawable-xxhdpi\splash_logo.png</Link>
|
||||
</AndroidResource>
|
||||
@@ -482,9 +456,6 @@
|
||||
<AndroidBoundLayout Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\layout\activity_detail_auth.xml">
|
||||
<Link>Resources\layout\activity_detail_auth.xml</Link>
|
||||
</AndroidBoundLayout>
|
||||
<AndroidBoundLayout Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\layout\activity_donate.xml">
|
||||
<Link>Resources\layout\activity_donate.xml</Link>
|
||||
</AndroidBoundLayout>
|
||||
<AndroidBoundLayout Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\layout\activity_encryption_auth.xml">
|
||||
<Link>Resources\layout\activity_encryption_auth.xml</Link>
|
||||
</AndroidBoundLayout>
|
||||
@@ -494,15 +465,6 @@
|
||||
<AndroidBoundLayout Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\layout\activity_export_auth.xml">
|
||||
<Link>Resources\layout\activity_export_auth.xml</Link>
|
||||
</AndroidBoundLayout>
|
||||
<AndroidBoundLayout Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\layout\activity_guide_ca_cert.xml">
|
||||
<Link>Resources\layout\activity_guide_ca_cert.xml</Link>
|
||||
</AndroidBoundLayout>
|
||||
<AndroidBoundLayout Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\layout\activity_guide_vpn.xml">
|
||||
<Link>Resources\layout\activity_guide_vpn.xml</Link>
|
||||
</AndroidBoundLayout>
|
||||
<AndroidBoundLayout Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\layout\activity_guide_vpn_content.xml">
|
||||
<Link>Resources\layout\activity_guide_vpn_content.xml</Link>
|
||||
</AndroidBoundLayout>
|
||||
<AndroidBoundLayout Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\layout\activity_login_or_register.xml">
|
||||
<Link>Resources\layout\activity_login_or_register.xml</Link>
|
||||
</AndroidBoundLayout>
|
||||
@@ -554,18 +516,6 @@
|
||||
<AndroidBoundLayout Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\layout\fragment_basic_profile_content.xml">
|
||||
<Link>Resources\layout\fragment_basic_profile_content.xml</Link>
|
||||
</AndroidBoundLayout>
|
||||
<AndroidBoundLayout Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\layout\fragment_bind_phone_number.xml">
|
||||
<Link>Resources\layout\fragment_bind_phone_number.xml</Link>
|
||||
</AndroidBoundLayout>
|
||||
<AndroidBoundLayout Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\layout\fragment_bind_phone_number_content.xml">
|
||||
<Link>Resources\layout\fragment_bind_phone_number_content.xml</Link>
|
||||
</AndroidBoundLayout>
|
||||
<AndroidBoundLayout Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\layout\fragment_change_bind_phone_number.xml">
|
||||
<Link>Resources\layout\fragment_change_bind_phone_number.xml</Link>
|
||||
</AndroidBoundLayout>
|
||||
<AndroidBoundLayout Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\layout\fragment_change_bind_phone_number_content.xml">
|
||||
<Link>Resources\layout\fragment_change_bind_phone_number_content.xml</Link>
|
||||
</AndroidBoundLayout>
|
||||
<AndroidBoundLayout Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\layout\fragment_community_fix.xml">
|
||||
<Link>Resources\layout\fragment_community_fix.xml</Link>
|
||||
</AndroidBoundLayout>
|
||||
@@ -578,18 +528,6 @@
|
||||
<AndroidBoundLayout Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\layout\fragment_game_list.xml">
|
||||
<Link>Resources\layout\fragment_game_list.xml</Link>
|
||||
</AndroidBoundLayout>
|
||||
<AndroidBoundLayout Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\layout\fragment_guide_export_ca_cert.xml">
|
||||
<Link>Resources\layout\fragment_guide_export_ca_cert.xml</Link>
|
||||
</AndroidBoundLayout>
|
||||
<AndroidBoundLayout Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\layout\fragment_guide_export_ca_cert_content.xml">
|
||||
<Link>Resources\layout\fragment_guide_export_ca_cert_content.xml</Link>
|
||||
</AndroidBoundLayout>
|
||||
<AndroidBoundLayout Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\layout\fragment_guide_how_install_ca_cert.xml">
|
||||
<Link>Resources\layout\fragment_guide_how_install_ca_cert.xml</Link>
|
||||
</AndroidBoundLayout>
|
||||
<AndroidBoundLayout Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\layout\fragment_guide_how_install_ca_cert_content.xml">
|
||||
<Link>Resources\layout\fragment_guide_how_install_ca_cert_content.xml</Link>
|
||||
</AndroidBoundLayout>
|
||||
<AndroidBoundLayout Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\layout\fragment_local_auth.xml">
|
||||
<Link>Resources\layout\fragment_local_auth.xml</Link>
|
||||
</AndroidBoundLayout>
|
||||
@@ -644,9 +582,6 @@
|
||||
<AndroidBoundLayout Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\layout\layout_card_steam_auth_trade_confirmation_content.xml">
|
||||
<Link>Resources\layout\layout_card_steam_auth_trade_confirmation_content.xml</Link>
|
||||
</AndroidBoundLayout>
|
||||
<AndroidBoundLayout Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\layout\layout_donate_user.xml">
|
||||
<Link>Resources\layout\layout_donate_user.xml</Link>
|
||||
</AndroidBoundLayout>
|
||||
<AndroidBoundLayout Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\layout\layout_file_or_dir.xml">
|
||||
<Link>Resources\layout\layout_file_or_dir.xml</Link>
|
||||
</AndroidBoundLayout>
|
||||
@@ -752,9 +687,6 @@
|
||||
<AndroidResource Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\navigation\mobile_navigation.xml">
|
||||
<Link>Resources\navigation\mobile_navigation.xml</Link>
|
||||
</AndroidResource>
|
||||
<AndroidResource Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\navigation\nav_graph_guide_ca_cert.xml">
|
||||
<Link>Resources\navigation\nav_graph_guide_ca_cert.xml</Link>
|
||||
</AndroidResource>
|
||||
<AndroidResource Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\navigation\nav_graph_login_or_register.xml">
|
||||
<Link>Resources\navigation\nav_graph_login_or_register.xml</Link>
|
||||
</AndroidResource>
|
||||
@@ -779,21 +711,6 @@
|
||||
<AndroidResource Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\values\themes.xml">
|
||||
<Link>Resources\values\themes.xml</Link>
|
||||
</AndroidResource>
|
||||
<AndroidResource Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\values-en\strings.xml">
|
||||
<Link>Resources\values-en\strings.xml</Link>
|
||||
</AndroidResource>
|
||||
<AndroidResource Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\values-es\strings.xml">
|
||||
<Link>Resources\values-es\strings.xml</Link>
|
||||
</AndroidResource>
|
||||
<AndroidResource Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\values-it\strings.xml">
|
||||
<Link>Resources\values-it\strings.xml</Link>
|
||||
</AndroidResource>
|
||||
<AndroidResource Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\values-ja\strings.xml">
|
||||
<Link>Resources\values-ja\strings.xml</Link>
|
||||
</AndroidResource>
|
||||
<AndroidResource Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\values-ko\strings.xml">
|
||||
<Link>Resources\values-ko\strings.xml</Link>
|
||||
</AndroidResource>
|
||||
<AndroidResource Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\values-land\dimens_fixed_width.xml">
|
||||
<Link>Resources\values-land\dimens_fixed_width.xml</Link>
|
||||
</AndroidResource>
|
||||
@@ -803,20 +720,37 @@
|
||||
<AndroidResource Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\values-night\themes.xml">
|
||||
<Link>Resources\values-night\themes.xml</Link>
|
||||
</AndroidResource>
|
||||
<AndroidResource Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\values-ru\strings.xml">
|
||||
<Link>Resources\values-ru\strings.xml</Link>
|
||||
</AndroidResource>
|
||||
<AndroidResource Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\values-v23\themes.xml">
|
||||
<Link>Resources\values-v23\themes.xml</Link>
|
||||
</AndroidResource>
|
||||
<AndroidResource Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\values-v28\themes.xml">
|
||||
<Link>Resources\values-v28\themes.xml</Link>
|
||||
</AndroidResource>
|
||||
<AndroidResource Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\values-zh-rHK\strings.xml">
|
||||
<Link>Resources\values-zh-rHK\strings.xml</Link>
|
||||
</AndroidResource>
|
||||
<AndroidResource Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\xml\local_auth_appwidget_info.xml">
|
||||
<Link>Resources\xml\local_auth_appwidget_info.xml</Link>
|
||||
</AndroidResource>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ namespace System.Application.Services.Implementation
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(level), level, null),
|
||||
};
|
||||
|
||||
static (NotificationCompat.Builder builder, NotificationManagerCompat manager) BuildNotify(
|
||||
static NotificationCompat.Builder BuildNotify(
|
||||
Context context,
|
||||
NotificationManagerCompat? manager,
|
||||
string text,
|
||||
@@ -182,7 +182,7 @@ namespace System.Application.Services.Implementation
|
||||
var pendingIntent = PendingIntent.GetActivity(context, 0, intent, PendingIntentFlags.Immutable | PendingIntentFlags.UpdateCurrent);
|
||||
builder.SetContentIntent(pendingIntent);
|
||||
}
|
||||
return (builder, manager);
|
||||
return builder;
|
||||
}
|
||||
|
||||
public void Notify(string text,
|
||||
@@ -194,7 +194,7 @@ namespace System.Application.Services.Implementation
|
||||
var notificationEntrance = GetEntrance(entrance);
|
||||
var context = AndroidApplication.Context;
|
||||
var manager = NotificationManagerCompat.From(context);
|
||||
var (builder, _) = BuildNotify(context, manager, text, notificationType,
|
||||
var builder = BuildNotify(context, manager, text, notificationType,
|
||||
autoCancel, title, entrance: notificationEntrance);
|
||||
var notifyId = GetNotifyId(notificationType);
|
||||
manager.Notify(notifyId, builder.Build());
|
||||
@@ -207,7 +207,7 @@ namespace System.Application.Services.Implementation
|
||||
{
|
||||
var context = AndroidApplication.Context;
|
||||
var manager = NotificationManagerCompat.From(context);
|
||||
var (builder, _) = BuildNotify(context, manager,
|
||||
var builder = BuildNotify(context, manager,
|
||||
text: text(),
|
||||
notificationType,
|
||||
title: title);
|
||||
@@ -290,13 +290,13 @@ namespace System.Application.Services.Implementation
|
||||
/// <param name="notificationType"></param>
|
||||
/// <param name="text"></param>
|
||||
/// <param name="entranceAction"></param>
|
||||
public (NotificationCompat.Builder builder, NotificationManagerCompat manager, int notifyId) StartForeground(Service service,
|
||||
public void StartForeground(Service service,
|
||||
NotificationType notificationType,
|
||||
string text,
|
||||
string? entranceAction = null)
|
||||
{
|
||||
var stopAction = BuildStopServiceAction(service);
|
||||
var (builder, manager) = BuildNotify(service, null,
|
||||
var builder = BuildNotify(service, null,
|
||||
text, notificationType,
|
||||
entrance: GetEntrance(Entrance.Main),
|
||||
actions: new NotificationCompat.Action[] {
|
||||
@@ -306,7 +306,6 @@ namespace System.Application.Services.Implementation
|
||||
var notification = builder.Build();
|
||||
var notifyId = GetNotifyId(notificationType);
|
||||
service.StartForeground(notifyId, notification);
|
||||
return (builder, manager, notifyId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-67
@@ -1,67 +0,0 @@
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using Java.Security;
|
||||
using Javax.Net.Ssl;
|
||||
|
||||
namespace System.Application.Services.Implementation
|
||||
{
|
||||
partial class AndroidPlatformServiceImpl
|
||||
{
|
||||
static IX509TrustManager? X509TrustManager
|
||||
{
|
||||
get
|
||||
{
|
||||
var instance = KeyStore.GetInstance("AndroidCAStore");
|
||||
if (instance == null) return null;
|
||||
instance.Load(null);
|
||||
var instance2 = TrustManagerFactory.GetInstance(TrustManagerFactory.DefaultAlgorithm);
|
||||
if (instance2 == null) return null;
|
||||
instance2.Init(instance);
|
||||
var trustManager = instance2.GetTrustManagers()?
|
||||
.Select(Convert)
|
||||
.FirstOrDefault(x => x != null);
|
||||
return trustManager;
|
||||
}
|
||||
}
|
||||
|
||||
static IX509TrustManager? Convert(ITrustManager? trustManager)
|
||||
{
|
||||
if (trustManager == null) return null;
|
||||
if (trustManager is IX509TrustManager x509TrustManager) return x509TrustManager;
|
||||
try
|
||||
{
|
||||
return Android.Runtime.Extensions.JavaCast<IX509TrustManager>(trustManager);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
internal static bool IsCertificateInstalled(X509Certificate2 certificate2)
|
||||
{
|
||||
var x509TrustManager = X509TrustManager;
|
||||
if (x509TrustManager == null) return false;
|
||||
using var certificate = certificate2.Convert();
|
||||
var authType = certificate.SigAlgName;
|
||||
try
|
||||
{
|
||||
x509TrustManager.CheckServerTrusted(new[] { certificate }, authType);
|
||||
return true;
|
||||
}
|
||||
#if DEBUG
|
||||
catch (Exception e)
|
||||
#else
|
||||
catch
|
||||
#endif
|
||||
{
|
||||
#if DEBUG
|
||||
//Toast.Show($"[DEBUG] {e}");
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool IPlatformService.IsCertificateInstalled(X509Certificate2 certificate2) => IsCertificateInstalled(certificate2);
|
||||
}
|
||||
}
|
||||
-39
@@ -1,39 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using ASF_FS = System.Application.Services.Native.ArchiSteamFarmForegroundService;
|
||||
using XEPlatform = Xamarin.Essentials.Platform;
|
||||
using Android.App;
|
||||
using System.Application.Services.Native;
|
||||
|
||||
namespace System.Application.Services.Implementation
|
||||
{
|
||||
partial class AndroidPlatformServiceImpl
|
||||
{
|
||||
bool IPlatformService.UsePlatformForegroundService => true;
|
||||
|
||||
public static void StartOrStopForegroundService(Activity activity, string serviceName, bool? startOrStop = null)
|
||||
{
|
||||
switch (serviceName)
|
||||
{
|
||||
case nameof(ASFService):
|
||||
var s = ASFService.Current;
|
||||
if (s.IsASFRunOrStoping) return;
|
||||
var isASFRuning = s.IsASFRuning;
|
||||
if (isASFRuning == startOrStop) return;
|
||||
activity.StartOrStopForegroundService<ASF_FS>(!isASFRuning);
|
||||
break;
|
||||
case nameof(ProxyService):
|
||||
if (!startOrStop.HasValue) startOrStop = !ProxyService.Current.ProxyStatus;
|
||||
ProxyForegroundService.StartOrStop(activity, startOrStop.Value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
async Task IPlatformService.StartOrStopForegroundServiceAsync(string serviceName, bool? startOrStop)
|
||||
{
|
||||
var activity = await XEPlatform.WaitForActivityAsync();
|
||||
StartOrStopForegroundService(activity, serviceName, startOrStop);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23,7 +23,7 @@ namespace System.Application.Services.Native
|
||||
{
|
||||
public static async void StartOrStop(Activity activity, bool startOrStop)
|
||||
{
|
||||
if (ProxySettings.ProxyModeValue == ProxyMode.VPN)
|
||||
if (ProxySettings.IsVpnMode.Value)
|
||||
{
|
||||
if (startOrStop)
|
||||
{
|
||||
@@ -33,15 +33,8 @@ namespace System.Application.Services.Native
|
||||
{
|
||||
void OnResult(Intent intent)
|
||||
=> activity.StartOrStopForegroundService<VpnService>(true);
|
||||
try
|
||||
{
|
||||
await IntermediateActivity.StartAsync(intent,
|
||||
requestCodeVpnService, onResult: OnResult);
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
|
||||
}
|
||||
await IntermediateActivity.StartAsync(intent,
|
||||
requestCodeVpnService, onResult: OnResult);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -83,164 +76,167 @@ namespace System.Application.Services.Native
|
||||
[Register(JavaPackageConstants.Services + TAG)]
|
||||
[Service(Permission = Manifest.Permission.BindVpnService, Exported = true)]
|
||||
[IntentFilter(new[] { "android.net.VpnService" })]
|
||||
sealed partial class VpnService /*: AndroidNetVpnService*/
|
||||
sealed partial class VpnService : AndroidNetVpnService
|
||||
{
|
||||
const string TAG = nameof(ProxyForegroundService) + "_VPN";
|
||||
|
||||
//bool isStart;
|
||||
//ParcelFileDescriptor? localTunnel;
|
||||
bool isStart;
|
||||
ParcelFileDescriptor? localTunnel;
|
||||
|
||||
//public override void OnCreate()
|
||||
//{
|
||||
// jni_init();
|
||||
// base.OnCreate();
|
||||
//}
|
||||
public override void OnCreate()
|
||||
{
|
||||
jni_init();
|
||||
base.OnCreate();
|
||||
}
|
||||
|
||||
//public void OnStart()
|
||||
//{
|
||||
// if (isStart) return;
|
||||
// isStart = true;
|
||||
public /*async*/ void OnStart()
|
||||
{
|
||||
if (isStart) return;
|
||||
isStart = true;
|
||||
|
||||
// IForegroundService f = this;
|
||||
// AndroidNotificationServiceImpl.Instance.StartForeground(this, f.NotificationType, f.NotificationText, f.NotificationEntranceAction);
|
||||
IForegroundService f = this;
|
||||
AndroidNotificationServiceImpl.Instance.StartForeground(this, f.NotificationType, f.NotificationText, f.NotificationEntranceAction);
|
||||
|
||||
// ProxyService.Current.ProxyStatus = true;
|
||||
ProxyService.Current.ProxyStatus = true;
|
||||
|
||||
// if (localTunnel != null) return;
|
||||
// wait ???
|
||||
//await Task.Delay(3500);
|
||||
|
||||
// // Configure a new interface from our VpnService instance. This must be done
|
||||
// // from inside a VpnService.
|
||||
// var builder = new Builder(this).SetSession(AssemblyTrademark);
|
||||
if (localTunnel != null) return;
|
||||
|
||||
// // Create a local TUN interface using predetermined addresses. In your app,
|
||||
// // you typically use values returned from the VPN gateway during handshaking.
|
||||
// builder.AddAddress("10.1.10.1", 32);
|
||||
// builder.AddAddress("fd00:1:fd00:1:fd00:1:fd00:1", 128);
|
||||
// builder.AddRoute("0.0.0.0", 0);
|
||||
// builder.AddRoute("0:0:0:0:0:0:0:0", 0);
|
||||
// Configure a new interface from our VpnService instance. This must be done
|
||||
// from inside a VpnService.
|
||||
var builder = new Builder(this).SetSession(AssemblyTrademark);
|
||||
|
||||
// //var dnss = GetDefaultDNS();
|
||||
// //Array.ForEach(dnss, x => builder.AddDnsServer(x));
|
||||
// Create a local TUN interface using predetermined addresses. In your app,
|
||||
// you typically use values returned from the VPN gateway during handshaking.
|
||||
builder.AddAddress("10.1.10.1", 32);
|
||||
//builder.AddAddress("fd00:1:fd00:1:fd00:1:fd00:1", 128);
|
||||
builder.AddRoute("0.0.0.0", 0);
|
||||
//builder.AddRoute("0:0:0:0:0:0:0:0", 0);
|
||||
|
||||
// int mtu = jni_get_mtu();
|
||||
// builder.SetMtu(mtu);
|
||||
var dnss = GetDefaultDNS();
|
||||
Array.ForEach(dnss, x => builder.AddDnsServer(x));
|
||||
|
||||
// var pkg = PackageName!;
|
||||
// builder.AddDisallowedApplication(pkg);
|
||||
int mtu = jni_get_mtu();
|
||||
builder.SetMtu(mtu);
|
||||
|
||||
// localTunnel = builder.Establish()!;
|
||||
var pkg = PackageName!;
|
||||
builder.AddDisallowedApplication(pkg);
|
||||
|
||||
// var httpProxyService = IHttpProxyService.Instance;
|
||||
// var address = httpProxyService.ProxyIp;
|
||||
// var port = httpProxyService.ProxyPort;
|
||||
// jni_start(localTunnel.Fd, false, 3, address!.ToString(), port);
|
||||
//}
|
||||
localTunnel = builder.Establish()!;
|
||||
|
||||
//public void OnStop()
|
||||
//{
|
||||
// if (!isStart) return;
|
||||
// isStart = false;
|
||||
var httpProxyService = IHttpProxyService.Instance;
|
||||
var address = httpProxyService.ProxyIp;
|
||||
var port = httpProxyService.ProxyPort;
|
||||
jni_start(localTunnel.Fd, false, 3, address!.ToString(), port);
|
||||
}
|
||||
|
||||
// StopForeground(true);
|
||||
public void OnStop()
|
||||
{
|
||||
if (!isStart) return;
|
||||
isStart = false;
|
||||
|
||||
// if (localTunnel != null)
|
||||
// {
|
||||
// try
|
||||
// {
|
||||
// jni_stop(localTunnel.Fd);
|
||||
// }
|
||||
// catch (Java.Lang.Throwable ex)
|
||||
// {
|
||||
// Log.Error(TAG, ex, "jni_stop");
|
||||
// jni_stop(-1);
|
||||
// }
|
||||
// try
|
||||
// {
|
||||
// localTunnel.Close();
|
||||
// }
|
||||
// catch (Java.IO.IOException ex)
|
||||
// {
|
||||
// Log.Error(TAG, ex, "localTunnel.Close");
|
||||
// }
|
||||
// localTunnel.Dispose();
|
||||
// localTunnel = null;
|
||||
// }
|
||||
StopForeground(true);
|
||||
|
||||
// ProxyService.Current.ProxyStatus = false;
|
||||
//}
|
||||
if (localTunnel != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
jni_stop(localTunnel.Fd);
|
||||
}
|
||||
catch (Java.Lang.Throwable ex)
|
||||
{
|
||||
Log.Error(TAG, ex, "jni_stop");
|
||||
jni_stop(-1);
|
||||
}
|
||||
try
|
||||
{
|
||||
localTunnel.Close();
|
||||
}
|
||||
catch (Java.IO.IOException ex)
|
||||
{
|
||||
Log.Error(TAG, ex, "localTunnel.Close");
|
||||
}
|
||||
localTunnel.Dispose();
|
||||
localTunnel = null;
|
||||
}
|
||||
|
||||
//[return: GeneratedEnum]
|
||||
//public override StartCommandResult OnStartCommand(Intent? intent, [GeneratedEnum] StartCommandFlags flags, int startId)
|
||||
//{
|
||||
// if (intent != null)
|
||||
// {
|
||||
// var action = intent.Action;
|
||||
// switch (action)
|
||||
// {
|
||||
// case START:
|
||||
// OnStart();
|
||||
// return StartCommandResult.RedeliverIntent;
|
||||
// case STOP:
|
||||
// default:
|
||||
// OnStop();
|
||||
// StopSelf();
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// return StartCommandResult.NotSticky;
|
||||
//}
|
||||
ProxyService.Current.ProxyStatus = false;
|
||||
}
|
||||
|
||||
//public override void OnRevoke()
|
||||
//{
|
||||
// OnStop();
|
||||
// base.OnRevoke();
|
||||
//}
|
||||
[return: GeneratedEnum]
|
||||
public override StartCommandResult OnStartCommand(Intent? intent, [GeneratedEnum] StartCommandFlags flags, int startId)
|
||||
{
|
||||
if (intent != null)
|
||||
{
|
||||
var action = intent.Action;
|
||||
switch (action)
|
||||
{
|
||||
case START:
|
||||
OnStart();
|
||||
return StartCommandResult.RedeliverIntent;
|
||||
case STOP:
|
||||
default:
|
||||
OnStop();
|
||||
StopSelf();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return StartCommandResult.NotSticky;
|
||||
}
|
||||
|
||||
//public override void OnDestroy()
|
||||
//{
|
||||
// OnStop();
|
||||
// base.OnDestroy();
|
||||
//}
|
||||
public override void OnRevoke()
|
||||
{
|
||||
OnStop();
|
||||
base.OnRevoke();
|
||||
}
|
||||
|
||||
//string[] GetDefaultDNS()
|
||||
//{
|
||||
// //return new[] {
|
||||
// // IDnsAnalysisService.PrimaryDNS_Ali,
|
||||
// // IDnsAnalysisService.SecondaryDNS_Ali,
|
||||
// //};
|
||||
// var context = Android.App.Application.Context;
|
||||
// string? dns1 = null, dns2 = null;
|
||||
// if (Build.VERSION.SdkInt > BuildVersionCodes.NMr1)
|
||||
// {
|
||||
// var cm = context.GetSystemService<ConnectivityManager>();
|
||||
// var an = cm.ActiveNetwork;
|
||||
// if (an != null)
|
||||
// {
|
||||
// var lp = cm.GetLinkProperties(an);
|
||||
// if (lp != null)
|
||||
// {
|
||||
// var dns = lp.DnsServers;
|
||||
// if (dns != null)
|
||||
// {
|
||||
// if (dns.Count > 0)
|
||||
// dns1 = dns[0].HostAddress;
|
||||
// if (dns.Count > 1)
|
||||
// dns2 = dns[1].HostAddress;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// dns1 = jni_getprop("net.dns1");
|
||||
// dns2 = jni_getprop("net.dns2");
|
||||
// }
|
||||
// return new[]
|
||||
// {
|
||||
// string.IsNullOrEmpty(dns1) ? IDnsAnalysisService.PrimaryDNS_Ali : dns1!,
|
||||
// string.IsNullOrEmpty(dns2) ? IDnsAnalysisService.SecondaryDNS_Ali : dns2!,
|
||||
//};
|
||||
//}
|
||||
public override void OnDestroy()
|
||||
{
|
||||
OnStop();
|
||||
base.OnDestroy();
|
||||
}
|
||||
|
||||
string[] GetDefaultDNS()
|
||||
{
|
||||
//return new[] {
|
||||
// IDnsAnalysisService.PrimaryDNS_Ali,
|
||||
// IDnsAnalysisService.SecondaryDNS_Ali,
|
||||
//};
|
||||
var context = Android.App.Application.Context;
|
||||
string? dns1 = null, dns2 = null;
|
||||
if (Build.VERSION.SdkInt > BuildVersionCodes.NMr1)
|
||||
{
|
||||
var cm = context.GetSystemService<ConnectivityManager>();
|
||||
var an = cm.ActiveNetwork;
|
||||
if (an != null)
|
||||
{
|
||||
var lp = cm.GetLinkProperties(an);
|
||||
if (lp != null)
|
||||
{
|
||||
var dns = lp.DnsServers;
|
||||
if (dns != null)
|
||||
{
|
||||
if (dns.Count > 0)
|
||||
dns1 = dns[0].HostAddress;
|
||||
if (dns.Count > 1)
|
||||
dns2 = dns[1].HostAddress;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dns1 = jni_getprop("net.dns1");
|
||||
dns2 = jni_getprop("net.dns2");
|
||||
}
|
||||
return new[]
|
||||
{
|
||||
string.IsNullOrEmpty(dns1) ? IDnsAnalysisService.PrimaryDNS_Ali : dns1!,
|
||||
string.IsNullOrEmpty(dns2) ? IDnsAnalysisService.SecondaryDNS_Ali : dns2!,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
const NotificationType notificationType
|
||||
|
||||
@@ -1,162 +0,0 @@
|
||||
#if SHADOWSOCKS
|
||||
using Android.App;
|
||||
using Android.Content;
|
||||
using Android.Runtime;
|
||||
using System.Application.Services.Implementation;
|
||||
using static System.Application.Services.Native.IServiceBase;
|
||||
using AndroidX.Core.App;
|
||||
using static System.Properties.ThisAssembly;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace System.Application.Services.Native
|
||||
{
|
||||
partial class ProxyForegroundService
|
||||
{
|
||||
partial class VpnService : Shadowsocks.VpnService
|
||||
{
|
||||
bool isStart;
|
||||
int notifyId;
|
||||
NotificationCompat.Builder? builder;
|
||||
NotificationManagerCompat? mNotificationManager;
|
||||
NotificationManagerCompat NotificationManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if (mNotificationManager == null)
|
||||
{
|
||||
mNotificationManager = NotificationManagerCompat.From(this);
|
||||
}
|
||||
return mNotificationManager;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnStart()
|
||||
{
|
||||
if (isStart) return;
|
||||
isStart = true;
|
||||
|
||||
// 先显示通知 UI
|
||||
IForegroundService f = this;
|
||||
(builder, mNotificationManager, notifyId) = AndroidNotificationServiceImpl.Instance.StartForeground(this, f.NotificationType, f.NotificationText, f.NotificationEntranceAction);
|
||||
|
||||
// 启动本地代理服务
|
||||
ProxyService.Current.ProxyStatus = true;
|
||||
|
||||
// 启动 VPN tun2socks
|
||||
base.OnStart();
|
||||
}
|
||||
|
||||
public override void OnStop()
|
||||
{
|
||||
if (!isStart) return;
|
||||
isStart = false;
|
||||
|
||||
// 停止通知栏 UI
|
||||
StopForeground(true);
|
||||
|
||||
// 停止 VPN tun2socks
|
||||
base.OnStop();
|
||||
|
||||
// 停止本地代理服务
|
||||
ProxyService.Current.ProxyStatus = false;
|
||||
}
|
||||
|
||||
public override void OnRevoke()
|
||||
{
|
||||
OnStop();
|
||||
base.OnRevoke();
|
||||
}
|
||||
|
||||
[return: GeneratedEnum]
|
||||
public override StartCommandResult OnStartCommand(Intent? intent, [GeneratedEnum] StartCommandFlags flags, int startId)
|
||||
{
|
||||
if (intent != null)
|
||||
{
|
||||
var action = intent.Action;
|
||||
switch (action)
|
||||
{
|
||||
case START:
|
||||
OnStart();
|
||||
return StartCommandResult.RedeliverIntent;
|
||||
case STOP:
|
||||
default:
|
||||
OnStop();
|
||||
StopSelf();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return StartCommandResult.NotSticky;
|
||||
}
|
||||
|
||||
public override string SocksServerAddress
|
||||
{
|
||||
get
|
||||
{
|
||||
var s = ProxyService.Current;
|
||||
return $"{s.ProxyIp}:{s.Socks5ProxyPortId}";
|
||||
}
|
||||
}
|
||||
|
||||
const int VPN_MTU = 1500;
|
||||
const string VPN_MTU_STR = "1500";
|
||||
|
||||
public override void OnConfigure(Builder builder)
|
||||
{
|
||||
builder.SetSession(AssemblyTrademark);
|
||||
//builder.AddDnsServer(IDnsAnalysisService.PrimaryDNS_Ali);
|
||||
// https://github.com/2dust/v2rayNG/blob/master/AndroidLibV2rayLite/CoreI/Status.go#L56
|
||||
builder.SetMtu(VPN_MTU);
|
||||
builder.AddAddress("26.26.26.1", 30);
|
||||
AddRouteByPassPrivateIPAddress(builder);
|
||||
builder.AddAddress("da26:2626::1", 126);
|
||||
builder.AddRoute("2000::", 3);
|
||||
builder.AddDisallowedApplication(PackageName!);
|
||||
}
|
||||
|
||||
public override IList<string> Tun2socksArgs
|
||||
{
|
||||
get
|
||||
{
|
||||
// https://github.com/2dust/v2rayNG/blob/master/AndroidLibV2rayLite/CoreI/Status.go#L28
|
||||
return new JavaList<string>
|
||||
{
|
||||
Tun2socksExecutablePath,
|
||||
"--netif-ipaddr",
|
||||
"26.26.26.2",
|
||||
"--netif-netmask",
|
||||
"255.255.255.252",
|
||||
"--socks-server-addr",
|
||||
SocksServerAddress,
|
||||
"--tunmtu",
|
||||
VPN_MTU_STR,
|
||||
"--loglevel",
|
||||
"notice",
|
||||
"--enable-udprelay",
|
||||
"--sock-path",
|
||||
"sock_path",
|
||||
"--netif-ip6addr",
|
||||
"da26:2626::2"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
public override void OnError(string msg, Java.Lang.Throwable tr)
|
||||
{
|
||||
base.OnError(msg, tr);
|
||||
}
|
||||
|
||||
public override string SockPath
|
||||
{
|
||||
get
|
||||
{
|
||||
var value = base.SockPath;
|
||||
Log.Info(nameof(VpnService), $"SockPath: {value}");
|
||||
return value;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1,136 +0,0 @@
|
||||
#if V2RAY
|
||||
using V2RayNG;
|
||||
using Android.App;
|
||||
using Android.Content;
|
||||
using Android.Runtime;
|
||||
using System.Application.Services.Implementation;
|
||||
using static System.Application.Services.Native.IServiceBase;
|
||||
using SR = System.Application.Properties.SR;
|
||||
using AndroidX.Core.App;
|
||||
using static System.Properties.ThisAssembly;
|
||||
|
||||
namespace System.Application.Services.Native
|
||||
{
|
||||
partial class ProxyForegroundService
|
||||
{
|
||||
partial class VpnService : V2RayVpnService, IV2RayServiceManager
|
||||
{
|
||||
bool isStart;
|
||||
int notifyId;
|
||||
NotificationCompat.Builder? builder;
|
||||
NotificationManagerCompat? mNotificationManager;
|
||||
NotificationManagerCompat NotificationManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if (mNotificationManager == null)
|
||||
{
|
||||
mNotificationManager = NotificationManagerCompat.From(this);
|
||||
}
|
||||
return mNotificationManager;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnStart()
|
||||
{
|
||||
if (isStart) return;
|
||||
isStart = true;
|
||||
|
||||
// 先显示通知 UI
|
||||
IForegroundService f = this;
|
||||
(builder, mNotificationManager, notifyId) = AndroidNotificationServiceImpl.Instance.StartForeground(this, f.NotificationType, f.NotificationText, f.NotificationEntranceAction);
|
||||
|
||||
// 启动本地代理服务
|
||||
ProxyService.Current.ProxyStatus = true;
|
||||
|
||||
// 启动 VPN tun2socks
|
||||
base.OnStart();
|
||||
}
|
||||
|
||||
public override void OnStop()
|
||||
{
|
||||
if (!isStart) return;
|
||||
isStart = false;
|
||||
|
||||
// 停止通知栏 UI
|
||||
StopForeground(true);
|
||||
|
||||
// 停止 VPN tun2socks
|
||||
base.OnStop();
|
||||
|
||||
// 停止本地代理服务
|
||||
ProxyService.Current.ProxyStatus = false;
|
||||
}
|
||||
|
||||
[return: GeneratedEnum]
|
||||
public override StartCommandResult OnStartCommand(Intent? intent, [GeneratedEnum] StartCommandFlags flags, int startId)
|
||||
{
|
||||
if (intent != null)
|
||||
{
|
||||
var action = intent.Action;
|
||||
switch (action)
|
||||
{
|
||||
case START:
|
||||
OnStart();
|
||||
return StartCommandResult.RedeliverIntent;
|
||||
case STOP:
|
||||
default:
|
||||
OnStop();
|
||||
StopSelf();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return StartCommandResult.NotSticky;
|
||||
}
|
||||
|
||||
public override string Session => AssemblyTrademark;
|
||||
|
||||
string IV2RayServiceManager.ConfigureFileContent
|
||||
{
|
||||
get
|
||||
{
|
||||
var text = SR.v2rayPoint_configure;
|
||||
var s = ProxyService.Current;
|
||||
text = text.Replace("${ProxyIp}", s.ProxyIp.ToString());
|
||||
text = text.Replace("${ProxyPort}", s.Socks5ProxyPortId.ToString());
|
||||
text = text.Replace("${VpnDns}", IDnsAnalysisService.PrimaryDNS_Ali);
|
||||
return text;
|
||||
}
|
||||
}
|
||||
|
||||
string IV2RayServiceManager.DomainName
|
||||
{
|
||||
get
|
||||
{
|
||||
var s = ProxyService.Current;
|
||||
return $"{s.ProxyIp}:{s.Socks5ProxyPortId}";
|
||||
}
|
||||
}
|
||||
|
||||
bool IV2RayServiceManager.ForwardIpv6 => true;
|
||||
|
||||
void IV2RayServiceManager.UpdateNotification(string? contentText, long proxyTraffic, long directTraffic)
|
||||
{
|
||||
if (builder == null) return;
|
||||
//if (proxyTraffic < NOTIFICATION_ICON_THRESHOLD && directTraffic < NOTIFICATION_ICON_THRESHOLD) {
|
||||
// mBuilder?.setSmallIcon(R.drawable.ic_v)
|
||||
//} else if (proxyTraffic > directTraffic) {
|
||||
// mBuilder?.setSmallIcon(R.drawable.ic_stat_proxy)
|
||||
//} else {
|
||||
// mBuilder?.setSmallIcon(R.drawable.ic_stat_direct)
|
||||
//}
|
||||
builder.SetStyle(new NotificationCompat.BigTextStyle().BigText(contentText));
|
||||
builder.SetContentText(contentText);
|
||||
NotificationManager.Notify(notifyId, builder.Build());
|
||||
}
|
||||
|
||||
public override void OnConfigure(Builder builder)
|
||||
{
|
||||
builder.AddDisallowedApplication(PackageName!);
|
||||
}
|
||||
|
||||
public override string RoutingMode => "3";
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1,7 +0,0 @@
|
||||
namespace System.Application.Services.V2Ray
|
||||
{
|
||||
static class AppConfig
|
||||
{
|
||||
public const string DNS_AGENT = "1.1.1.1";
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
using Android.App;
|
||||
|
||||
namespace System.Application.Services.V2Ray
|
||||
{
|
||||
interface IServiceControl
|
||||
{
|
||||
Service Service { get; }
|
||||
|
||||
void StartService(string parameters);
|
||||
|
||||
void StopService();
|
||||
|
||||
bool VpnProtect(int socket);
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
namespace System.Application.Services.V2Ray
|
||||
{
|
||||
enum RoutingMode : byte
|
||||
{
|
||||
全局,
|
||||
绕过局域网地址,
|
||||
绕过大陆地址,
|
||||
绕过局域网及大陆地址,
|
||||
}
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
using Kotlin.Text;
|
||||
using Android.Content;
|
||||
|
||||
namespace System.Application.Services.V2Ray
|
||||
{
|
||||
static class V2RayUtils
|
||||
{
|
||||
public static string[] VpnDnsServers
|
||||
{
|
||||
get
|
||||
{
|
||||
return new[] { AppConfig.DNS_AGENT };
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsPureIpAddress(string value) => IsIpv4Address(value) || IsIpv6Address(value);
|
||||
|
||||
public static bool IsIpv4Address(string value)
|
||||
{
|
||||
var regV4 = new Regex("^([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])\\.([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])\\.([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])\\.([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])$");
|
||||
return regV4.Matches(value);
|
||||
}
|
||||
|
||||
public static bool IsIpv6Address(string value)
|
||||
{
|
||||
if (value.IndexOf('[') == 0 && value.LastIndexOf(']') > 0)
|
||||
{
|
||||
value = StringsKt.Drop(value, 1);
|
||||
value = StringsKt.DropLast(value, value.Length - value.LastIndexOf(']'));
|
||||
}
|
||||
var regV6 = new Regex("^((?:[0-9A-Fa-f]{1,4}))?((?::[0-9A-Fa-f]{1,4}))*::((?:[0-9A-Fa-f]{1,4}))?((?::[0-9A-Fa-f]{1,4}))*|((?:[0-9A-Fa-f]{1,4}))((?::[0-9A-Fa-f]{1,4})){7}$");
|
||||
return regV6.Matches(value);
|
||||
}
|
||||
|
||||
public static string PackagePath(Context context)
|
||||
{
|
||||
var path = context.FilesDir!.ToString();
|
||||
path = path.Replace("files", "");
|
||||
//path += "tun2socks"
|
||||
return path;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
using Java.Lang.Ref;
|
||||
using Libv2ray;
|
||||
using JObject = Java.Lang.Object;
|
||||
|
||||
namespace System.Application.Services.V2Ray
|
||||
{
|
||||
static class V2RayServiceManager
|
||||
{
|
||||
static readonly V2RayPoint v2rayPoint = Libv2ray.Libv2ray.NewV2RayPoint(new V2RayCallback());
|
||||
|
||||
static SoftReference? mServiceControl;
|
||||
|
||||
public static SoftReference? ServiceControl
|
||||
{
|
||||
set
|
||||
{
|
||||
mServiceControl = value;
|
||||
if (value?.Get() is IServiceControl serviceControl)
|
||||
{
|
||||
var context = serviceControl.Service?.ApplicationContext;
|
||||
}
|
||||
}
|
||||
get
|
||||
{
|
||||
return mServiceControl;
|
||||
}
|
||||
}
|
||||
|
||||
sealed class V2RayCallback : JObject, IV2RayVPNServiceSupportsSet
|
||||
{
|
||||
public long OnEmitStatus(long p0, string p1)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public long Prepare()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public long Protect(long p0)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public long Setup(string p0)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public long Shutdown()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public static void StartV2rayPoint()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,311 +0,0 @@
|
||||
using Android.App;
|
||||
using Android.Content;
|
||||
using Android.OS;
|
||||
using Android.Runtime;
|
||||
using static System.Application.Services.Native.IServiceBase;
|
||||
using System.Application.Services.V2Ray;
|
||||
using Java.Lang.Ref;
|
||||
using AndroidAppService = Android.App.Service;
|
||||
using static System.Properties.ThisAssembly;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using Android.Net;
|
||||
using JException = Java.Lang.Exception;
|
||||
using Utils = System.Application.Services.V2Ray.V2RayUtils;
|
||||
using File = Java.IO.File;
|
||||
using KotlinX.Coroutines;
|
||||
|
||||
namespace System.Application.Services.Native
|
||||
{
|
||||
partial class ProxyForegroundService
|
||||
{
|
||||
partial class VpnService : IServiceControl
|
||||
{
|
||||
ParcelFileDescriptor? mInterface;
|
||||
|
||||
#region lazy
|
||||
|
||||
/**
|
||||
* Unfortunately registerDefaultNetworkCallback is going to return our VPN interface: https://android.googlesource.com/platform/frameworks/base/+/dda156ab0c5d66ad82bdcf76cda07cbc0a9c8a2e
|
||||
*
|
||||
* This makes doing a requestNetwork with REQUEST necessary so that we don't get ALL possible networks that
|
||||
* satisfies default network capabilities but only THE default network. Unfortunately we need to have
|
||||
* android.permission.CHANGE_NETWORK_STATE to be able to call requestNetwork.
|
||||
*
|
||||
* Source: https://android.googlesource.com/platform/frameworks/base/+/2df4c7d/services/core/java/com/android/server/ConnectivityService.java#887
|
||||
*/
|
||||
NetworkRequest? mDefaultNetworkRequest;
|
||||
NetworkRequest DefaultNetworkRequest
|
||||
{
|
||||
get
|
||||
{
|
||||
if (mDefaultNetworkRequest == null)
|
||||
{
|
||||
mDefaultNetworkRequest = new NetworkRequest.Builder()
|
||||
.AddCapability(NetCapability.Internet)!
|
||||
.AddCapability(NetCapability.NotRestricted)!
|
||||
.Build()!;
|
||||
}
|
||||
return mDefaultNetworkRequest;
|
||||
}
|
||||
}
|
||||
|
||||
ConnectivityManager? mConnectivity;
|
||||
ConnectivityManager Connectivity
|
||||
{
|
||||
get
|
||||
{
|
||||
if (mConnectivity == null)
|
||||
{
|
||||
mConnectivity = this.GetSystemService<ConnectivityManager>();
|
||||
}
|
||||
return mConnectivity;
|
||||
}
|
||||
}
|
||||
|
||||
ConnectivityManager.NetworkCallback? mDefaultNetworkCallback;
|
||||
ConnectivityManager.NetworkCallback DefaultNetworkCallback
|
||||
{
|
||||
get
|
||||
{
|
||||
if (mDefaultNetworkCallback == null)
|
||||
{
|
||||
mDefaultNetworkCallback = new DefaultNetworkCallback2(this);
|
||||
}
|
||||
return mDefaultNetworkCallback;
|
||||
}
|
||||
}
|
||||
|
||||
sealed class DefaultNetworkCallback2 : ConnectivityManager.NetworkCallback
|
||||
{
|
||||
readonly VpnService thiz;
|
||||
|
||||
public DefaultNetworkCallback2(VpnService thiz)
|
||||
{
|
||||
this.thiz = thiz;
|
||||
}
|
||||
|
||||
public override void OnAvailable(Network network)
|
||||
{
|
||||
thiz.SetUnderlyingNetworks(new[] { network });
|
||||
}
|
||||
|
||||
public override void OnCapabilitiesChanged(Network network, NetworkCapabilities networkCapabilities)
|
||||
{
|
||||
// it's a good idea to refresh capabilities
|
||||
thiz.SetUnderlyingNetworks(new[] { network });
|
||||
}
|
||||
|
||||
public override void OnLost(Network network)
|
||||
{
|
||||
thiz.SetUnderlyingNetworks(null);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public override void OnCreate()
|
||||
{
|
||||
base.OnCreate();
|
||||
var policy = new StrictMode.ThreadPolicy.Builder().PermitAll().Build();
|
||||
StrictMode.SetThreadPolicy(policy);
|
||||
V2RayServiceManager.ServiceControl = new SoftReference(this);
|
||||
}
|
||||
|
||||
public override void OnRevoke()
|
||||
{
|
||||
StopV2Ray();
|
||||
base.OnRevoke();
|
||||
}
|
||||
|
||||
public override void OnLowMemory()
|
||||
{
|
||||
StopV2Ray();
|
||||
base.OnLowMemory();
|
||||
}
|
||||
|
||||
public override void OnDestroy()
|
||||
{
|
||||
StopV2Ray();
|
||||
base.OnDestroy();
|
||||
}
|
||||
|
||||
void Setup(string parameters)
|
||||
{
|
||||
var prepare = Prepare(this);
|
||||
if (prepare != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// If the old interface has exactly the same parameters, use it!
|
||||
// Configure a builder while parsing the parameters.
|
||||
var builder = new Builder(this).SetSession(AssemblyTrademark);
|
||||
const bool enableLocalDns = false;
|
||||
const RoutingMode routingMode = RoutingMode.绕过局域网地址;
|
||||
|
||||
var parametersArray = parameters.Split(' ', StringSplitOptions.RemoveEmptyEntries)
|
||||
.Select(x => x.Split(',', StringSplitOptions.RemoveEmptyEntries)).ToArray();
|
||||
Array.ForEach(parametersArray, it =>
|
||||
{
|
||||
_ = it.FirstOrDefault().FirstOrDefault() switch
|
||||
{
|
||||
'm' => it.Length >= 2 && int.TryParse(it[1], out var mtu)
|
||||
? builder.SetMtu(mtu) : builder,
|
||||
's' => it.Length >= 2
|
||||
? builder.AddSearchDomain(it[1]) : builder,
|
||||
'a' => it.Length >= 3 && int.TryParse(it[2], out var prefixLength)
|
||||
? builder.AddAddress(it[1], prefixLength) : builder,
|
||||
'r' => routingMode switch
|
||||
{
|
||||
RoutingMode.绕过局域网地址 or RoutingMode.绕过局域网及大陆地址 => it.Length >= 2 &&
|
||||
it[1] == "::" //not very elegant, should move Vpn setting in Kotlin, simplify go code
|
||||
? builder.AddRoute("2000::", 3)
|
||||
: AddRoutes(builder, Resources!.GetStringArray(Resource.Array.bypass_private_ip_address)),
|
||||
_ => it.Length >= 3 && int.TryParse(it[2], out var prefixLength)
|
||||
? builder.AddRoute(it[1], prefixLength) : builder,
|
||||
},
|
||||
'd' => it.Length >= 2
|
||||
? builder.AddDnsServer(it[1]) : builder,
|
||||
_ => builder,
|
||||
};
|
||||
});
|
||||
|
||||
static Builder AddRoutes(Builder builder, IEnumerable<string> values)
|
||||
{
|
||||
foreach (var value in values)
|
||||
{
|
||||
var array = value.Split('/', StringSplitOptions.RemoveEmptyEntries);
|
||||
if (array.Length >= 2 && int.TryParse(array[1], out var prefixLength))
|
||||
{
|
||||
builder.AddRoute(array[0], prefixLength);
|
||||
}
|
||||
}
|
||||
return builder;
|
||||
}
|
||||
|
||||
if (!enableLocalDns)
|
||||
{
|
||||
//Array.ForEach(Utils.VpnDnsServers, it =>
|
||||
//{
|
||||
// if (Utils.IsPureIpAddress(it))
|
||||
// {
|
||||
// builder.AddDnsServer(it);
|
||||
// }
|
||||
//});
|
||||
|
||||
builder.AddDnsServer(AppConfig.DNS_AGENT);
|
||||
}
|
||||
|
||||
// Close the old interface since the parameters have been changed.
|
||||
try
|
||||
{
|
||||
mInterface?.Close();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// ignored
|
||||
}
|
||||
|
||||
var sdkInt = Build.VERSION.SdkInt;
|
||||
|
||||
if (sdkInt >= BuildVersionCodes.P)
|
||||
{
|
||||
try
|
||||
{
|
||||
Connectivity.RequestNetwork(DefaultNetworkRequest, DefaultNetworkCallback);
|
||||
}
|
||||
catch (JException e)
|
||||
{
|
||||
e.PrintStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
if (sdkInt >= BuildVersionCodes.Q)
|
||||
{
|
||||
builder.SetMetered(false);
|
||||
}
|
||||
|
||||
// Create a new interface using the builder and save the parameters.
|
||||
try
|
||||
{
|
||||
mInterface = builder.Establish()!;
|
||||
}
|
||||
catch (JException e)
|
||||
{
|
||||
// non-nullable lateinit var
|
||||
e.PrintStackTrace();
|
||||
StopV2Ray();
|
||||
}
|
||||
|
||||
SendFd();
|
||||
}
|
||||
|
||||
void SendFd()
|
||||
{
|
||||
var fd = mInterface!.FileDescriptor;
|
||||
var path = new File(Utils.PackagePath(ApplicationContext!), "sock_path").AbsolutePath;
|
||||
|
||||
BuildersKt.Launch(GlobalScope.Instance, Dispatchers.IO,
|
||||
CoroutineStart.Default, null);
|
||||
}
|
||||
|
||||
sealed class B : IFunction2
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
[return: GeneratedEnum]
|
||||
public override StartCommandResult OnStartCommand(Intent? intent, [GeneratedEnum] StartCommandFlags flags, int startId)
|
||||
{
|
||||
if (intent != null)
|
||||
{
|
||||
var action = intent.Action;
|
||||
switch (action)
|
||||
{
|
||||
case START:
|
||||
V2RayServiceManager.StartV2rayPoint();
|
||||
return StartCommandResult.RedeliverIntent;
|
||||
case STOP:
|
||||
default:
|
||||
StopV2Ray();
|
||||
StopSelf();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return StartCommandResult.NotSticky;
|
||||
}
|
||||
|
||||
void StopV2Ray(bool isForced = true)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#region IServiceControl
|
||||
|
||||
AndroidAppService IServiceControl.Service => this;
|
||||
|
||||
void IServiceControl.StartService(string parameters) => Setup(parameters);
|
||||
|
||||
void IServiceControl.StopService()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
bool IServiceControl.VpnProtect(int socket)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IServiceBase
|
||||
|
||||
void IServiceBase.OnStart() => Setup("");
|
||||
|
||||
void IServiceBase.OnStop() => StopV2Ray();
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,140 +0,0 @@
|
||||
using Android.App;
|
||||
using Android.Content.PM;
|
||||
using Android.OS;
|
||||
using Android.Runtime;
|
||||
using Android.Views;
|
||||
using Binding;
|
||||
using System.Linq;
|
||||
using System.Collections.Specialized;
|
||||
using System.Application.UI.Adapters;
|
||||
using System.Application.UI.ViewModels;
|
||||
using System.Application.UI.Resx;
|
||||
using Google.Android.Material.DatePicker;
|
||||
using Android.Flexbox;
|
||||
|
||||
namespace System.Application.UI.Activities
|
||||
{
|
||||
[Register(JavaPackageConstants.Activities + nameof(DonateActivity))]
|
||||
[Activity(Theme = ManifestConstants.MainTheme2_NoActionBar,
|
||||
LaunchMode = LaunchMode.SingleTask,
|
||||
ConfigurationChanges = ManifestConstants.ConfigurationChanges)]
|
||||
internal sealed class DonateActivity : BaseActivity<activity_donate, AboutPageViewModel>, DatePickerHelper.IOnPositiveButtonClickListener
|
||||
{
|
||||
protected override int? LayoutResource => Resource.Layout.activity_donate;
|
||||
|
||||
protected override AboutPageViewModel? OnCreateViewModel() => AboutPageViewModel.Instance;
|
||||
|
||||
NotifyCollectionChangedEventHandler? handlerDonateList;
|
||||
DonateUserAdapter? adapter;
|
||||
|
||||
protected override void OnCreate2(Bundle? savedInstanceState)
|
||||
{
|
||||
base.OnCreate2(savedInstanceState);
|
||||
|
||||
this.SetSupportActionBarWithNavigationClick(binding!.toolbar, true);
|
||||
|
||||
R.Subscribe(() =>
|
||||
{
|
||||
Title = AppResources.About_Donate;
|
||||
if (binding == null) return;
|
||||
binding.tvTitle.Text = AppResources.About_Donate_Title;
|
||||
binding.btnUID.Text = AppResources.ClickHereCopyUIDToClipboard;
|
||||
binding.tvDesc.Text = AppResources.About_Donate_Desc;
|
||||
binding.tvDonateType.Text = AppResources.About_DonateType;
|
||||
binding.tvDonateRecord.Text = AppResources.About_DonateRecord;
|
||||
binding.tvDonateRecordPrompt.Text = AppResources.About_DonateRecord_Prompt;
|
||||
binding.tvDonateRecordNoData.Text = AppResources.About_DonateRecord_NoData;
|
||||
}).AddTo(this);
|
||||
|
||||
binding.btn_afdian.Text = "爱发电";
|
||||
binding.btn_ko_fi.Text = "Ko-fi";
|
||||
binding.btn_patreon.Text = "Patreon";
|
||||
|
||||
if (!ViewModel!.DonateList.Any_Nullable())
|
||||
{
|
||||
ViewModel.LoadDonateRankListData();
|
||||
}
|
||||
|
||||
handlerDonateList = (_, _) =>
|
||||
{
|
||||
var hasValue = ViewModel.DonateList.Any();
|
||||
binding.rvDonateList.Visibility = hasValue ? ViewStates.Visible : ViewStates.Gone;
|
||||
binding.tvDonateRecordNoData.Visibility = !hasValue ? ViewStates.Visible : ViewStates.Gone;
|
||||
};
|
||||
ViewModel.DonateList!.CollectionChanged += handlerDonateList;
|
||||
|
||||
SetDateText();
|
||||
|
||||
adapter = new DonateUserAdapter(ViewModel);
|
||||
binding.rvDonateList.SetFlexboxLayoutManager(justifyContent: JustifyContent.Center);
|
||||
binding.rvDonateList.SetAdapter(adapter);
|
||||
|
||||
SetOnClickListener(
|
||||
binding.btnUID,
|
||||
binding.clickDate,
|
||||
binding.btn_afdian,
|
||||
binding.btn_ko_fi,
|
||||
binding.btn_patreon);
|
||||
}
|
||||
|
||||
void SetDateText() => binding!.tbDate.Text = ViewModel!.DonateFliterDate.ToString(DateTimeFormat.YearMonth);
|
||||
|
||||
protected override void OnClick(View view)
|
||||
{
|
||||
base.OnClick(view);
|
||||
|
||||
if (view.Id == Resource.Id.btnUID)
|
||||
{
|
||||
ViewModel!.UIDCommand.Invoke();
|
||||
return;
|
||||
}
|
||||
else if (view.Id == Resource.Id.clickDate)
|
||||
{
|
||||
this.ShowBirthDatePicker(ViewModel!.DonateFliterDate.Date, title: AppResources.PleaseSelect);
|
||||
return;
|
||||
}
|
||||
else if (view.Id == Resource.Id.btn_afdian)
|
||||
{
|
||||
ViewModel!.OpenBrowserCommand.Invoke(UrlConstants.DonateUrl_afdian);
|
||||
return;
|
||||
}
|
||||
else if (view.Id == Resource.Id.btn_ko_fi)
|
||||
{
|
||||
ViewModel!.OpenBrowserCommand.Invoke(UrlConstants.DonateUrl_ko_fi);
|
||||
return;
|
||||
}
|
||||
else if (view.Id == Resource.Id.btn_patreon)
|
||||
{
|
||||
ViewModel!.OpenBrowserCommand.Invoke(UrlConstants.DonateUrl_patreon);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnDestroy()
|
||||
{
|
||||
base.OnDestroy();
|
||||
handlerDonateList = null;
|
||||
if (binding != null)
|
||||
{
|
||||
binding.rvDonateList.SetAdapter(null);
|
||||
}
|
||||
adapter = null;
|
||||
if (ViewModel != null)
|
||||
{
|
||||
if (ViewModel.DonateList != null)
|
||||
{
|
||||
ViewModel.DonateList.CollectionChanged -= handlerDonateList;
|
||||
ViewModel.DonateList = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DatePickerHelper.IOnPositiveButtonClickListener.OnPositiveButtonClick(DateTimeOffset selection)
|
||||
{
|
||||
ViewModel!.DonateFliterDate = selection.GetCurrentMonth();
|
||||
SetDateText();
|
||||
}
|
||||
|
||||
void IMaterialPickerOnPositiveButtonClickListener.OnPositiveButtonClick(Java.Lang.Object p0) => this.OnPositiveButtonClick(p0);
|
||||
}
|
||||
}
|
||||
@@ -19,16 +19,6 @@ namespace System.Application.UI.Activities
|
||||
{
|
||||
protected override int? LayoutResource => Resource.Layout.activity_explorer;
|
||||
|
||||
protected override ExplorerPageViewModel? OnCreateViewModel()
|
||||
{
|
||||
var path = this.GetViewModel<string>();
|
||||
if (!string.IsNullOrWhiteSpace(path))
|
||||
{
|
||||
return new(path!);
|
||||
}
|
||||
return new();
|
||||
}
|
||||
|
||||
protected override void OnCreate2(Bundle? savedInstanceState)
|
||||
{
|
||||
base.OnCreate2(savedInstanceState);
|
||||
|
||||
@@ -1,171 +0,0 @@
|
||||
using Android.App;
|
||||
using Android.Content;
|
||||
using Android.Content.PM;
|
||||
using Android.OS;
|
||||
using Android.Runtime;
|
||||
using Android.Text;
|
||||
using Android.Text.Style;
|
||||
using AndroidX.Navigation.Fragment;
|
||||
using AndroidX.Navigation.UI;
|
||||
using Binding;
|
||||
using ReactiveUI;
|
||||
using System.Application.UI.Resx;
|
||||
using System.Application.UI.ViewModels;
|
||||
using System.Collections.Generic;
|
||||
using System.Application.UI.Fragments;
|
||||
using System.Text;
|
||||
using Android.Views;
|
||||
using System.Application.Services;
|
||||
using ASettings = Android.Provider.Settings;
|
||||
using static AndroidX.Activity.Result.ActivityResultTask;
|
||||
using System.Threading.Tasks;
|
||||
using XEPlatform = Xamarin.Essentials.Platform;
|
||||
|
||||
namespace System.Application.UI.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// 引导导入证书页面
|
||||
/// </summary>
|
||||
[Register(JavaPackageConstants.Activities + nameof(GuideCACertActivity))]
|
||||
[Activity(Theme = ManifestConstants.MainTheme2_NoActionBar,
|
||||
LaunchMode = LaunchMode.SingleTask,
|
||||
ConfigurationChanges = ManifestConstants.ConfigurationChangesWithOutOrientationLocale)]
|
||||
internal sealed class GuideCACertActivity : BaseActivity<activity_guide_ca_cert>
|
||||
{
|
||||
protected override int? LayoutResource => Resource.Layout.activity_guide_ca_cert;
|
||||
|
||||
protected override void OnCreate2(Bundle? savedInstanceState)
|
||||
{
|
||||
base.OnCreate2(savedInstanceState);
|
||||
|
||||
this.SetSupportActionBarWithNavigationClick(binding!.toolbar, true);
|
||||
|
||||
Title = string.Empty;
|
||||
|
||||
var appBarConfiguration = new AppBarConfiguration.Builder(Resource.Id.navigation_guide_export_ca_cert).Build();
|
||||
navController = ((NavHostFragment)SupportFragmentManager.FindFragmentById(Resource.Id.nav_host_fragment)).NavController;
|
||||
NavigationUI.SetupActionBarWithNavController(this, navController, appBarConfiguration);
|
||||
|
||||
SupportActionBar.SetDisplayHomeAsUpEnabled(true);
|
||||
}
|
||||
|
||||
[Register(JavaPackageConstants.Fragments + nameof(GuideExportCACertFragment))]
|
||||
internal sealed class GuideExportCACertFragment : BaseFragment<fragment_guide_export_ca_cert, CommunityProxyPageViewModel>
|
||||
{
|
||||
protected override int? LayoutResource => Resource.Layout.fragment_guide_export_ca_cert;
|
||||
|
||||
protected override CommunityProxyPageViewModel? OnCreateViewModel()
|
||||
{
|
||||
return IViewModelManager.Instance.GetMainPageViewModel<CommunityProxyPageViewModel>();
|
||||
}
|
||||
|
||||
bool canInstalledCACert;
|
||||
public override void OnCreateView(View view)
|
||||
{
|
||||
base.OnCreateView(view);
|
||||
|
||||
var sdkInt = (int)Build.VERSION.SdkInt;
|
||||
canInstalledCACert = !(sdkInt > 29 || (sdkInt == 29 && Build.VERSION.PreviewSdkInt > 0));
|
||||
// com.adguard.kit.compatibility.h()
|
||||
// com.adguard.android.ui.fragments.https_ca_installation.b()
|
||||
// return com.adguard.kit.compatibility.a.h() ? super.b() : R.l.https_ca_installation_guide_install_ca;
|
||||
// Android 10+ 只能通过系统设置从存储区导入 CA 证书
|
||||
|
||||
if (canInstalledCACert)
|
||||
{
|
||||
binding!.tvDesc3.Visibility = ViewStates.Gone;
|
||||
binding!.btnDone.Text = GetString(Resource.String.guide_export_ca_cert_btn_install);
|
||||
}
|
||||
|
||||
SetOnClickListener(binding!.btnDone);
|
||||
}
|
||||
|
||||
public override void OnResume()
|
||||
{
|
||||
base.OnResume();
|
||||
|
||||
if (IHttpProxyService.Instance.IsCurrentCertificateInstalled)
|
||||
{
|
||||
var intent = IntermediateActivity.SetResult(new(), Result.Ok);
|
||||
var a = RequireActivity();
|
||||
a.SetResult(Result.Ok, intent);
|
||||
a.Finish();
|
||||
}
|
||||
}
|
||||
|
||||
protected override bool OnClick(View view)
|
||||
{
|
||||
if (view.Id == Resource.Id.btnDone)
|
||||
{
|
||||
if (canInstalledCACert)
|
||||
{
|
||||
CommunityFixFragment.InstallCertificate(RequireContext(), ViewModel!);
|
||||
}
|
||||
else
|
||||
{
|
||||
ExportCertificateFile();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return base.OnClick(view);
|
||||
}
|
||||
|
||||
async void ExportCertificateFile()
|
||||
{
|
||||
var isOK = await ViewModel!.ExportCertificateFileAsync();
|
||||
if (isOK)
|
||||
{
|
||||
await GoToGuideHowInstallCACertPageAsync();
|
||||
}
|
||||
}
|
||||
|
||||
async Task GoToGuideHowInstallCACertPageAsync()
|
||||
{
|
||||
int count = 0;
|
||||
while (XEPlatform.CurrentActivity != RequireActivity() && count < 10)
|
||||
{
|
||||
await Task.Delay(200);
|
||||
count++;
|
||||
}
|
||||
var navController = this.GetNavController();
|
||||
navController?.Navigate(Resource.Id.action_navigation_guide_export_ca_cert_to_navigation_guide_how_install_ca_cert);
|
||||
}
|
||||
}
|
||||
|
||||
[Register(JavaPackageConstants.Fragments + nameof(GuideHowInstallCACertFragment))]
|
||||
internal sealed class GuideHowInstallCACertFragment : BaseFragment<fragment_guide_how_install_ca_cert>
|
||||
{
|
||||
protected override int? LayoutResource => Resource.Layout.fragment_guide_how_install_ca_cert;
|
||||
|
||||
public override void OnCreateView(View view)
|
||||
{
|
||||
base.OnCreateView(view);
|
||||
|
||||
SetOnClickListener(binding!.btnDone);
|
||||
}
|
||||
|
||||
public override void OnResume()
|
||||
{
|
||||
base.OnResume();
|
||||
|
||||
if (IHttpProxyService.Instance.IsCurrentCertificateInstalled)
|
||||
{
|
||||
var intent = IntermediateActivity.SetResult(new(), Result.Ok);
|
||||
var a = RequireActivity();
|
||||
a.SetResult(Result.Ok, intent);
|
||||
a.Finish();
|
||||
}
|
||||
}
|
||||
|
||||
protected override bool OnClick(View view)
|
||||
{
|
||||
if (view.Id == Resource.Id.btnDone)
|
||||
{
|
||||
GoToPlatformPages.SystemSettingsSecurity(RequireActivity());
|
||||
return true;
|
||||
}
|
||||
return base.OnClick(view);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,80 +0,0 @@
|
||||
using Android.App;
|
||||
using Android.Content;
|
||||
using Android.Content.PM;
|
||||
using Android.OS;
|
||||
using Android.Runtime;
|
||||
using Android.Text;
|
||||
using Android.Text.Style;
|
||||
using AndroidX.Navigation.Fragment;
|
||||
using AndroidX.Navigation.UI;
|
||||
using Binding;
|
||||
using ReactiveUI;
|
||||
using System.Application.UI.Resx;
|
||||
using System.Application.UI.ViewModels;
|
||||
using System.Collections.Generic;
|
||||
using System.Application.UI.Fragments;
|
||||
using System.Text;
|
||||
using Android.Views;
|
||||
using Android.Net;
|
||||
using static AndroidX.Activity.Result.ActivityResultTask;
|
||||
|
||||
namespace System.Application.UI.Activities
|
||||
{
|
||||
/// <summary>
|
||||
/// 引导开启 VPN 页面
|
||||
/// </summary>
|
||||
[Register(JavaPackageConstants.Activities + nameof(GuideVPNActivity))]
|
||||
[Activity(Theme = ManifestConstants.MainTheme2_NoActionBar,
|
||||
LaunchMode = LaunchMode.SingleTask,
|
||||
ConfigurationChanges = ManifestConstants.ConfigurationChangesWithOutOrientationLocale)]
|
||||
internal sealed class GuideVPNActivity : BaseActivity<activity_guide_vpn>
|
||||
{
|
||||
protected override int? LayoutResource => Resource.Layout.activity_guide_vpn;
|
||||
|
||||
protected override void OnCreate2(Bundle? savedInstanceState)
|
||||
{
|
||||
base.OnCreate2(savedInstanceState);
|
||||
|
||||
this.SetSupportActionBarWithNavigationClick(binding!.toolbar, true);
|
||||
|
||||
Title = string.Empty;
|
||||
|
||||
SetOnClickListener(binding.btnDone);
|
||||
}
|
||||
|
||||
async void Prepare()
|
||||
{
|
||||
var intent = VpnService.Prepare(this);
|
||||
if (intent != null)
|
||||
{
|
||||
void OnResult(Intent intent)
|
||||
{
|
||||
intent = IntermediateActivity.SetResult(intent, Result.Ok);
|
||||
SetResult(Result.Ok, intent);
|
||||
Finish();
|
||||
}
|
||||
try
|
||||
{
|
||||
await IntermediateActivity.StartAsync(intent,
|
||||
NextRequestCode(), onResult: OnResult);
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Finish();
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnClick(View view)
|
||||
{
|
||||
if (view.Id == Resource.Id.btnDone)
|
||||
{
|
||||
Prepare();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
using Android.App;
|
||||
using Android.Content.PM;
|
||||
using Android.Graphics;
|
||||
using Android.OS;
|
||||
using Android.Runtime;
|
||||
using Android.Views;
|
||||
@@ -40,7 +39,6 @@ namespace System.Application.UI.Activities
|
||||
|
||||
this.SetSupportActionBarWithNavigationClick(binding!.toolbar, true);
|
||||
|
||||
|
||||
R.Subscribe(() =>
|
||||
{
|
||||
Title = ViewModel!.Title;
|
||||
@@ -71,19 +69,7 @@ namespace System.Application.UI.Activities
|
||||
if (binding == null) return;
|
||||
var hasValue = value != null;
|
||||
binding.ivQRCode.Visibility = !hasValue ? ViewStates.Gone : ViewStates.Visible;
|
||||
int imgSize;
|
||||
if (value != null)
|
||||
{
|
||||
imgSize = Resources!.DisplayMetrics!.WidthPixels;
|
||||
imgSize -= Resources.GetDimensionPixelSize(Resource.Dimension.activity_horizontal_margin) * 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
imgSize = default;
|
||||
}
|
||||
#pragma warning disable CS0618 // 类型或成员已过时
|
||||
binding.ivQRCode.SetImageSource(value, targetW: imgSize, inPreferredConfig: Bitmap.Config.Argb4444);
|
||||
#pragma warning restore CS0618 // 类型或成员已过时
|
||||
binding.ivQRCode.SetImageSource(value);
|
||||
}).AddTo(this);
|
||||
ViewModel!.WhenAnyValue(x => x.IsExporting).SubscribeInMainThread(value =>
|
||||
{
|
||||
@@ -103,7 +89,7 @@ namespace System.Application.UI.Activities
|
||||
{
|
||||
ViewModel!.VerifyPassword = binding.tbPassword2.Text;
|
||||
};
|
||||
binding.swExportQRCode.CheckedChange += (_, e) =>
|
||||
binding!.swExportQRCode.CheckedChange += (_, e) =>
|
||||
{
|
||||
ViewModel!.IsExportQRCode = e.IsChecked;
|
||||
};
|
||||
|
||||
@@ -187,7 +187,7 @@ namespace System.Application.UI.Activities
|
||||
ViewModel!.WhenAnyValue(x => x.CaptchaImage).SubscribeInMainThread(value =>
|
||||
{
|
||||
if (binding == null) return;
|
||||
binding.ivCaptchaImage.SetImageSource(value, Resource.Dimension.img_size_captcha_w, Resource.Dimension.img_size_captcha_h);
|
||||
binding.ivCaptchaImage.SetImageSource(value);
|
||||
}).AddTo(this);
|
||||
ViewModel!.WhenAnyValue(x => x.ConfirmationsConutMessage).SubscribeInMainThread(value =>
|
||||
{
|
||||
|
||||
@@ -176,8 +176,12 @@ namespace System.Application.UI.Activities
|
||||
}
|
||||
else if (view.Id == Resource.Id.layoutRootIsVpnMode)
|
||||
{
|
||||
ProxyModeValue = ProxyModeValue == ProxyMode.VPN ? ProxyMode.ProxyOnly : ProxyMode.VPN;
|
||||
IsVpnMode.Value = !IsVpnMode.Value;
|
||||
SetIsVpnMode();
|
||||
if (IsVpnMode.Value)
|
||||
{
|
||||
CommunityFixFragment.ShowTipKnownIssues();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -188,6 +192,6 @@ namespace System.Application.UI.Activities
|
||||
void SetOnlyEnableProxyScript() => binding!.swOnlyEnableProxyScript.Checked = OnlyEnableProxyScript.Value;
|
||||
void SetProxySettingsSocks5() => binding!.swProxySettingsSocks5.Checked = Socks5ProxyEnable.Value;
|
||||
void SetProxySettingsTwoLevelAgent() => binding!.swProxySettingsTwoLevelAgent.Checked = TwoLevelAgentEnable.Value;
|
||||
void SetIsVpnMode() => binding!.swIsVpnMode.Checked = ProxyModeValue == ProxyMode.VPN;
|
||||
void SetIsVpnMode() => binding!.swIsVpnMode.Checked = IsVpnMode.Value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
using Android.App;
|
||||
using Android.Content.PM;
|
||||
using Android.OS;
|
||||
using Android.Runtime;
|
||||
|
||||
namespace System.Application.UI.Activities
|
||||
{
|
||||
[Authorize]
|
||||
[Register(JavaPackageConstants.Activities + nameof(BindPhoneNumberActivity))]
|
||||
[Activity(Theme = ManifestConstants.MainTheme2,
|
||||
LaunchMode = LaunchMode.SingleTask,
|
||||
ConfigurationChanges = ManifestConstants.ConfigurationChanges)]
|
||||
internal sealed class BindPhoneNumberActivity : BaseActivity
|
||||
{
|
||||
protected override int? LayoutResource => throw new NotImplementedException();
|
||||
|
||||
protected override void OnCreate2(Bundle? savedInstanceState)
|
||||
{
|
||||
base.OnCreate2(savedInstanceState);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
using Android.App;
|
||||
using Android.Content.PM;
|
||||
using Android.OS;
|
||||
using Android.Runtime;
|
||||
|
||||
namespace System.Application.UI.Activities
|
||||
{
|
||||
[Authorize]
|
||||
[Register(JavaPackageConstants.Activities + nameof(ChangePhoneNumberActivity))]
|
||||
[Activity(Theme = ManifestConstants.MainTheme2,
|
||||
LaunchMode = LaunchMode.SingleTask,
|
||||
ConfigurationChanges = ManifestConstants.ConfigurationChanges)]
|
||||
internal sealed class ChangePhoneNumberActivity : BaseActivity
|
||||
{
|
||||
protected override int? LayoutResource => throw new NotImplementedException();
|
||||
|
||||
protected override void OnCreate2(Bundle? savedInstanceState)
|
||||
{
|
||||
base.OnCreate2(savedInstanceState);
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user