Compare commits

...

65 Commits

Author SHA1 Message Date
Aigio Liu 88b4aac622 🔖 3.0.0-rc.15 2025-02-13 00:42:17 +08:00
yingpanwang 9504413ff7 Merge branch 'develop' of https://github.com/BeyondDimension/SteamTools into develop 2025-02-12 16:59:28 +08:00
yingpanwang 0f28de1e94 🐛 解决登陆时、确认报价时未携带Origin的请求头导致请求失败的问题 2025-02-12 16:58:27 +08:00
john.jiang ad11654cb4 🎨 修复挂卡登录缓存问题,增加本地储存 token 过期检查并生成新 token 2025-02-12 16:26:47 +08:00
ff m f43aa16c6a 🐛 fix Linux 不编译 ASF 2025-01-23 20:36:33 +08:00
Aigio Liu c0e757dc12 🔖 3.0.0-rc.14 2025-01-23 14:31:08 +08:00
RMBGAME fcecb2c14c 💄 文案调整 2025-01-23 14:25:51 +08:00
RMBGAME 408911de4a 🐛 修复 MacOS 中 挂时长游戏功能按钮显示问题 2025-01-23 14:15:40 +08:00
lxy829 23932298fc ⬆️ Common 1.25.10122.11624 2025-01-23 11:54:06 +08:00
lxy829 7c554190af Revert "🎨 Version_BDCommon"
This reverts commit 2f2065e453.
2025-01-23 11:18:19 +08:00
lxy829 2f2065e453 🎨 Version_BDCommon 2025-01-22 18:54:19 +08:00
RMBGAME 1480b5d4df 🐛 新增启用时检查 DNS 可用性 2025-01-21 16:45:43 +08:00
RMBGAME 9ae326ce9f 🐛 临时处理 Avalonia 11.2.3 导致的 FluentAvalonia Icon 宽度不正确问题 2025-01-21 00:42:01 +08:00
Lxy829 3dd83886b8 Merge pull request #3571 from NeKoOuO/patch-1
Translate TW
2025-01-09 10:32:21 +08:00
RMBGAME 3a1a256198 ⬆️ Avalonia 11.2.3 2025-01-06 17:49:03 +08:00
RMBGAME 84f9ae5227 🐛 Name Fix 2024-12-19 17:50:58 +08:00
lxy829 ce85b39328 🎨 Strings.ru 2024-12-16 17:02:21 +08:00
Lxy829 6c23ac30a3 Merge pull request #3527 from kotovasia5120/develop
translate RU,EN
2024-12-16 16:14:20 +08:00
ɴᴇᴋᴏ bbe9596d8d Update Strings.zh-Hant.resx 2024-12-09 09:50:52 +08:00
Aigio Liu 5c42a2336d 🔖 v3.0.1320.0 2024-12-02 19:01:31 +08:00
k1mlka afa4ad9e91 🐛 紧急修复证书有效期检查 Timer 报错 2024-12-02 18:48:40 +08:00
Aigio Liu 50a3c7624e 🎨 SupportedOSPlatformVersion macos 12.0 2024-12-02 14:35:36 +08:00
RMBGAME b40dac00b9 🐛 修复战网安装有多个存在时保存账号闪退问题 2024-12-01 01:18:46 +08:00
Aigio Liu 35be6db96e 🔖 rc.13 2024-12-01 00:39:38 +08:00
RMBGAME 35641d5c79 🐛 修复战网账号切换对旧版本数据支持问题 2024-11-30 20:57:44 +08:00
Aigio Liu 07f1a9f43b 🐛 CLR: Assert failure(PID 16164 [0x00003f24], Thread: 8032 [0x1f60]): !AreShadowStacksEnabled() || UseSpecialUserModeApc()
File: D:\a\_work\1\s\src\coreclr\vm\threads.cpp:7938 Image:
2024-11-30 12:49:45 +08:00
Mossimo 002e550149 ✨ 设置 macOS 菜单 2024-11-29 17:27:55 +08:00
RMBGAME cc8dbeb3f0 🚧 Misc 2024-11-28 16:45:52 +08:00
Aigio Liu e96fcd5f1b 🐛 Settings Reset 2024-11-28 15:54:53 +08:00
Aigio Liu d5c87efea9 🚑 macos build 2024-11-28 15:13:54 +08:00
Aigio Liu 8044cee366 🐛 macos build 2024-11-28 14:44:36 +08:00
Aigio Liu 2bbbf14ea6 🐛 BasicPlatformSwitcher(DeleteRegistryKey) 2024-11-27 23:35:54 +08:00
Aigio Liu 2737f9ae01 🐛 BasicPlatformSwitcher(SetRegistryKey) 2024-11-27 23:05:24 +08:00
Aigio Liu 078d4623f9 ⬆️ .NET 9.0 2024-11-27 20:02:12 +08:00
RMBGAME 593c170ee5 🐛 fix ClickAd OpenBrowserCommand 2024-11-27 17:38:17 +08:00
Aigio Liu a0279bf8f1 🔥 Remove ProxyMode.DNSIntercept with REMOVE_DNS_INTERCEPT" 2024-11-27 17:27:29 +08:00
Aigio Liu dcda15a33c 🐛 Fix 未使用 IsAuth 参数 2024-11-27 17:05:22 +08:00
Aigio Liu 39ef48dbec ⬆️ .NET 9.0 2024-11-27 16:40:05 +08:00
k1mlka c3d9c4525f 🐛 修复证书过期后加速失效的问题 (#3553)
* 🐛 修复证书过期后加速失效的问题

* 🐛 修复证书过期跨天情况下的加速error情景

* 🎨 CertService 使用证书默认到期时间
2024-11-26 13:58:25 +08:00
RMBGAME 039eb60c4b 🚧 NewUrl 2024-11-25 18:01:45 +08:00
RMBGAME 0a6aae5c97 🚧 改进需要登录的提示 2024-11-25 17:38:20 +08:00
RMBGAME 08ffcfc50d Merge pull request #3544 from BeyondDimension/feature/info_icon
✨ 网络测试页面延迟后增加info图标
2024-11-25 17:25:32 +08:00
RMBGAME c93db63297 🚧 Misc 2024-11-25 17:24:26 +08:00
RMBGAME 36339154dc 🚧 文本调整 2024-11-25 17:06:06 +08:00
Aigio Liu 1648d65c47 🎨 BD_AppCenter.Start 2024-11-25 12:29:05 +08:00
Aigio Liu 815e426ecc 🎨 BD.AppCenter 2024-11-25 10:18:50 +08:00
Aigio Liu f37454fe9b ⬆️ Avalonia v11.1.5 2024-11-24 20:24:13 +08:00
Aigio Liu b79debc968 🎨 Tracepoint 2024-11-24 20:21:28 +08:00
Aigio Liu c2bb1ea80a ➕ AppCenter 2024-11-24 20:20:33 +08:00
Aigio Liu 1e9d647de8 🐛 ipc 2024-11-23 18:31:55 +08:00
Aigio Liu 774e75848a 🐛 pkg ref 2024-11-22 15:57:58 +08:00
Aigio Liu ebbb2d90ba ➕ TracepointHelper 2024-11-22 15:21:47 +08:00
k1mlka 77b43918f1 💄 去除StringNotEmptyToVisibilityConverter 2024-11-22 10:20:36 +08:00
RMBGAME e505e91931 🐛 fix #3519 #3530
增加战网账号切换支持国服国际服切换(建议重新保存一次账号)
修复国服国际服战网邮箱相同时无法同时保存账号问题
修复了一个账号切换的炸弹,可能会让GOG切换变好(未测试)
2024-11-22 00:57:29 +08:00
k1mlka c9118b5abe ✨ ASF 对低版本操作系统提供下载 2024-11-21 11:39:16 +08:00
BuknSS 9843c01904 Revert "✨ AdvertisementDTO 增加带 IsAuth 的版本"
This reverts commit e5abea1474.
2024-11-20 14:34:22 +08:00
k1mlka 4986266268 ✨ ASF 默认允许打开额外菜单下的文档链接 2024-11-20 14:33:19 +08:00
ff m e629bffde8 ↑ 升级 SDK 子模块 2024-11-20 14:28:44 +08:00
ff m 6cf351bac5 🐛 修复判断打开广告地址带登录信息错误判断 2024-11-20 14:25:37 +08:00
RMBGAME e32c0bbf97 🚧 Misc 2024-11-20 14:09:11 +08:00
BuknSS e5abea1474 ✨ AdvertisementDTO 增加带 IsAuth 的版本 2024-11-19 19:34:18 +08:00
k1mlka 3ae002db91 ✨ 网络测试页面延迟后增加info图标 2024-11-19 15:54:13 +08:00
Aigio L 063ca17403 🐛 AvaloniaToastServiceImpl.Show 2024-11-18 15:37:28 +08:00
kotovasia b84fd825b3 Merge pull request #1 from kotovasia5120/kotovasia5120-patch-1
translate RU,EN
2024-10-27 16:48:28 +03:00
kotovasia 1732c84606 translate RU,EN 2024-10-25 02:37:55 +03:00
159 changed files with 10760 additions and 9413 deletions
+3
View File
@@ -37,3 +37,6 @@
[submodule "ref/Facepunch.Steamworks"]
path = ref/Facepunch.Steamworks
url = https://github.com/BeyondDimension/Facepunch.Steamworks.git
[submodule "ref/appcenter-sdk-dotnet"]
path = ref/appcenter-sdk-dotnet
url = https://github.com/BeyondDimension/appcenter-sdk-dotnet.git
+49 -33
View File
@@ -214,10 +214,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Facepunch.Steamworks.Posix"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Steam++", "src\BD.WTTS.Client.AppHost.Bridge\Steam++.csproj", "{26D8AA24-2ACE-4167-BC2B-117B9BB76AA4}"
EndProject
Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "BD.WTTS.Client.AppHost.Bridge.Package", "src\BD.WTTS.Client.AppHost.Bridge.Package\BD.WTTS.Client.AppHost.Bridge.Package.wapproj", "{27795C79-2994-4514-8656-BA34FCEE8901}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ArchiSteamFarm", "ref\ArchiSteamFarm\ArchiSteamFarm\ArchiSteamFarm.csproj", "{8C34FCD5-8C7F-4B10-A970-7DEA8A61F56B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AppCenter", "AppCenter", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BD.AppCenter.Any", "ref\appcenter-sdk-dotnet\SDK\AppCenter\BD.AppCenter.Any\BD.AppCenter.Any.csproj", "{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BD.AppCenter.Analytics.Any", "ref\appcenter-sdk-dotnet\SDK\AppCenterAnalytics\BD.AppCenter.Analytics.Any\BD.AppCenter.Analytics.Any.csproj", "{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -1232,36 +1236,6 @@ Global
{26D8AA24-2ACE-4167-BC2B-117B9BB76AA4}.Release|x64.Build.0 = Release|Any CPU
{26D8AA24-2ACE-4167-BC2B-117B9BB76AA4}.Release|x86.ActiveCfg = Release|Any CPU
{26D8AA24-2ACE-4167-BC2B-117B9BB76AA4}.Release|x86.Build.0 = Release|Any CPU
{27795C79-2994-4514-8656-BA34FCEE8901}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{27795C79-2994-4514-8656-BA34FCEE8901}.Debug|Any CPU.Build.0 = Debug|Any CPU
{27795C79-2994-4514-8656-BA34FCEE8901}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{27795C79-2994-4514-8656-BA34FCEE8901}.Debug|ARM.ActiveCfg = Debug|ARM
{27795C79-2994-4514-8656-BA34FCEE8901}.Debug|ARM.Build.0 = Debug|ARM
{27795C79-2994-4514-8656-BA34FCEE8901}.Debug|ARM.Deploy.0 = Debug|ARM
{27795C79-2994-4514-8656-BA34FCEE8901}.Debug|ARM64.ActiveCfg = Debug|ARM64
{27795C79-2994-4514-8656-BA34FCEE8901}.Debug|ARM64.Build.0 = Debug|ARM64
{27795C79-2994-4514-8656-BA34FCEE8901}.Debug|ARM64.Deploy.0 = Debug|ARM64
{27795C79-2994-4514-8656-BA34FCEE8901}.Debug|x64.ActiveCfg = Debug|x64
{27795C79-2994-4514-8656-BA34FCEE8901}.Debug|x64.Build.0 = Debug|x64
{27795C79-2994-4514-8656-BA34FCEE8901}.Debug|x64.Deploy.0 = Debug|x64
{27795C79-2994-4514-8656-BA34FCEE8901}.Debug|x86.ActiveCfg = Debug|x86
{27795C79-2994-4514-8656-BA34FCEE8901}.Debug|x86.Build.0 = Debug|x86
{27795C79-2994-4514-8656-BA34FCEE8901}.Debug|x86.Deploy.0 = Debug|x86
{27795C79-2994-4514-8656-BA34FCEE8901}.Release|Any CPU.ActiveCfg = Release|Any CPU
{27795C79-2994-4514-8656-BA34FCEE8901}.Release|Any CPU.Build.0 = Release|Any CPU
{27795C79-2994-4514-8656-BA34FCEE8901}.Release|Any CPU.Deploy.0 = Release|Any CPU
{27795C79-2994-4514-8656-BA34FCEE8901}.Release|ARM.ActiveCfg = Release|ARM
{27795C79-2994-4514-8656-BA34FCEE8901}.Release|ARM.Build.0 = Release|ARM
{27795C79-2994-4514-8656-BA34FCEE8901}.Release|ARM.Deploy.0 = Release|ARM
{27795C79-2994-4514-8656-BA34FCEE8901}.Release|ARM64.ActiveCfg = Release|ARM64
{27795C79-2994-4514-8656-BA34FCEE8901}.Release|ARM64.Build.0 = Release|ARM64
{27795C79-2994-4514-8656-BA34FCEE8901}.Release|ARM64.Deploy.0 = Release|ARM64
{27795C79-2994-4514-8656-BA34FCEE8901}.Release|x64.ActiveCfg = Release|x64
{27795C79-2994-4514-8656-BA34FCEE8901}.Release|x64.Build.0 = Release|x64
{27795C79-2994-4514-8656-BA34FCEE8901}.Release|x64.Deploy.0 = Release|x64
{27795C79-2994-4514-8656-BA34FCEE8901}.Release|x86.ActiveCfg = Release|x86
{27795C79-2994-4514-8656-BA34FCEE8901}.Release|x86.Build.0 = Release|x86
{27795C79-2994-4514-8656-BA34FCEE8901}.Release|x86.Deploy.0 = Release|x86
{8C34FCD5-8C7F-4B10-A970-7DEA8A61F56B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8C34FCD5-8C7F-4B10-A970-7DEA8A61F56B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8C34FCD5-8C7F-4B10-A970-7DEA8A61F56B}.Debug|ARM.ActiveCfg = Debug|Any CPU
@@ -1282,6 +1256,46 @@ Global
{8C34FCD5-8C7F-4B10-A970-7DEA8A61F56B}.Release|x64.Build.0 = Release|Any CPU
{8C34FCD5-8C7F-4B10-A970-7DEA8A61F56B}.Release|x86.ActiveCfg = Release|Any CPU
{8C34FCD5-8C7F-4B10-A970-7DEA8A61F56B}.Release|x86.Build.0 = Release|Any CPU
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}.Debug|ARM.ActiveCfg = Debug|Any CPU
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}.Debug|ARM.Build.0 = Debug|Any CPU
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}.Debug|ARM64.Build.0 = Debug|Any CPU
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}.Debug|x64.ActiveCfg = Debug|Any CPU
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}.Debug|x64.Build.0 = Debug|Any CPU
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}.Debug|x86.ActiveCfg = Debug|Any CPU
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}.Debug|x86.Build.0 = Debug|Any CPU
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}.Release|Any CPU.Build.0 = Release|Any CPU
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}.Release|ARM.ActiveCfg = Release|Any CPU
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}.Release|ARM.Build.0 = Release|Any CPU
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}.Release|ARM64.ActiveCfg = Release|Any CPU
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}.Release|ARM64.Build.0 = Release|Any CPU
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}.Release|x64.ActiveCfg = Release|Any CPU
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}.Release|x64.Build.0 = Release|Any CPU
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}.Release|x86.ActiveCfg = Release|Any CPU
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}.Release|x86.Build.0 = Release|Any CPU
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}.Debug|ARM.ActiveCfg = Debug|Any CPU
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}.Debug|ARM.Build.0 = Debug|Any CPU
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}.Debug|ARM64.Build.0 = Debug|Any CPU
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}.Debug|x64.ActiveCfg = Debug|Any CPU
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}.Debug|x64.Build.0 = Debug|Any CPU
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}.Debug|x86.ActiveCfg = Debug|Any CPU
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}.Debug|x86.Build.0 = Debug|Any CPU
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}.Release|Any CPU.Build.0 = Release|Any CPU
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}.Release|ARM.ActiveCfg = Release|Any CPU
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}.Release|ARM.Build.0 = Release|Any CPU
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}.Release|ARM64.ActiveCfg = Release|Any CPU
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}.Release|ARM64.Build.0 = Release|Any CPU
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}.Release|x64.ActiveCfg = Release|Any CPU
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}.Release|x64.Build.0 = Release|Any CPU
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}.Release|x86.ActiveCfg = Release|Any CPU
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -1347,8 +1361,10 @@ Global
{638745C0-B699-4009-9764-05434C511403} = {99D97BD4-3F51-48BC-8BD2-647F6D268BB0}
{35676E23-8E54-4785-A75B-98EB0650596B} = {99D97BD4-3F51-48BC-8BD2-647F6D268BB0}
{26D8AA24-2ACE-4167-BC2B-117B9BB76AA4} = {5541B406-4A9A-4AC8-AA77-CE14E133DB80}
{27795C79-2994-4514-8656-BA34FCEE8901} = {5541B406-4A9A-4AC8-AA77-CE14E133DB80}
{8C34FCD5-8C7F-4B10-A970-7DEA8A61F56B} = {99D97BD4-3F51-48BC-8BD2-647F6D268BB0}
{02EA681E-C7D8-13C7-8484-4AC65E1B71E8} = {90E88965-DB90-4B49-94F5-6D2965491988}
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {567F588F-E95C-4286-8B30-DB3B2200221C}
+9
View File
@@ -997,6 +997,15 @@
"Summary": "加速后自动唤起 Watt 加速器界面",
"IsRegionOrEndregion": null,
"IsValueType": null
},
{
"TypeName": "bool",
"PropertyName": "ProxyBeforeDNSCheck",
"DefaultValue": "true",
"DefaultValueIsConst": true,
"Summary": "加速前进行 DNS 可用性检查",
"IsRegionOrEndregion": null,
"IsValueType": null
}
],
"Usings": ""
-43
View File
@@ -1,43 +0,0 @@
# Steam++ v3.X Program File Structure for Windows
- dotnet 共享运行时,删除后将使用已安装的运行时,此目参考 ```C:\Program Files\dotnet```,可自行升级行库小版本号,二进制兼容
- host
- fxr
- x.y.z
- hostfxr.dll
- shared
- Microsoft.AspNetCore.App
- x.y.z
- Microsoft.NETCore.App
- x.y.z
- native
- win-x64
- 7z.dll
- av_libglesv2.dll
- e_sqlite3.dll
- libHarfBuzzSharp.dll
- libSkiaSharp.dll
- WebView2Loader.dll
- WinDivert.dll
- WinDivert64.sys
- assemblies 主模块程序集
- modules 可选模块
- ~~Update 自更新模块,删除该文件夹后禁用更新~~
- Steam++.Update.exe 更新程序,CDN 分发更包,下载与解压在主程序中,此进程仅退出主程执行覆盖操作
- Accelerator 网络加速
- Steam++.Accelerator.exe 控制台子服务进,使用匿名管道与主进程通信,无参数或指定某参数(待定)启动时可读取配置文件启动加速,可全独立运行,ASP.NET Core Web API 项目,支持 Docker
- Steam++.Plugins.Accelerator.dll 插件程集
- AccountSwitch 账号切换
- Steam++.Plugins.AccountSwitch.dll
- ~~ArchiSteamFarm~~
- Steam++.ArchiSteamFarm.exe
- Steam++.Plugins.ArchiSteamFarm.dll
- GameList 库存游戏
- Steam++.Plugins.GameList.dll
- LocalAuth 本地令牌
- Steam++.Plugins.LocalAuth.dll
- GameTools 游戏工具
- Steam++.Plugins.GameTools.dll
- Steam++.exe (主启动程序).NET Framework 二进制主程序
- Steam++.exe.config 使用该配置文件以允许在 .NET Framework 3.5 ~ 4.8.1 中任意版本中兼容运行(从 Windows 7 ~ 11 中所有系统自带运行时)
- ~~Steam++.Uninstall.exe 卸载程序(WinForms?AOT?)~~
+3 -3
View File
@@ -16,14 +16,14 @@ public static partial class AssemblyInfo
/// <summary>
/// 预览版本号,范围 1~9,只增不减
/// </summary>
const string ver_for_preview = "9";
const string ver_for_preview = "0";
/// <summary>
/// RC 版本号,范围 0~9,只增不减
/// </summary>
const string ver_for_rc = "12";
const string ver_for_rc = "15";
public const string FileVersion = $"{Version2}.{ver_for_rc}1{ver_for_preview}.0";
public const string FileVersion = $"{Version2}.{ver_for_rc}2{ver_for_preview}.0";
//public const string InformationalVersion = Version;
//public const string InformationalVersion = $"{Version}-preview.{ver_for_preview}";
@@ -4,7 +4,7 @@ namespace Avalonia.Controls;
public static class AvaloniaControlsInternalsWindowExtensions
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void CloseCore_(this Window window, WindowCloseReason reason, bool isProgrammatic) => window.CloseCore(reason, isProgrammatic);
public static void CloseCore_(this Window window, WindowCloseReason reason, bool isProgrammatic, bool ignoreCancel) => window.CloseCore(reason, isProgrammatic, ignoreCancel);
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void HandleResized_(this Window window, Size clientSize, WindowResizeReason reason) => window.HandleResized(clientSize, reason);
@@ -174,7 +174,7 @@ namespace Avalonia.Controls.ApplicationLifetimes
{
if (w.Owner is null)
{
w.CloseCore_(WindowCloseReason.ApplicationShutdown, isProgrammatic);
w.CloseCore_(WindowCloseReason.ApplicationShutdown, isProgrammatic, false);
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 190 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 231 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 279 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 444 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 666 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 666 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 484 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 787 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

@@ -1,83 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10"
xmlns:desktop2="http://schemas.microsoft.com/appx/manifest/desktop/windows10/2"
IgnorableNamespaces="uap rescap desktop desktop2">
<Identity
Name="4651ED44255E.47979655102CE"
Publisher="CN=A90E406B-B2D3-4A23-B061-0FA1D65C4F66"
Version="3.0.207.0" />
<Properties>
<DisplayName>Watt Toolkit</DisplayName>
<PublisherDisplayName>软妹币玩家</PublisherDisplayName>
<Logo>Images\StoreLogo.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
</Dependencies>
<Resources>
<Resource Language="x-generate"/>
</Resources>
<Applications>
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="$targetentrypoint$">
<uap:VisualElements
DisplayName="Watt Toolkit"
Description="「Watt Toolkit」是一个开源跨平台的多功能游戏工具箱,此工具的大部分功能都是需要您下载安装 Steam 才能使用。"
BackgroundColor="transparent"
Square150x150Logo="Images\Square150x150Logo.png"
Square44x44Logo="Images\Square44x44Logo.png">
<uap:DefaultTile Wide310x150Logo="Images\Wide310x150Logo.png" Square71x71Logo="Images\SmallTile.png" Square310x310Logo="Images\LargeTile.png" ShortName="Steam++">
<uap:ShowNameOnTiles>
<uap:ShowOn Tile="square150x150Logo"/>
<uap:ShowOn Tile="wide310x150Logo"/>
<uap:ShowOn Tile="square310x310Logo"/>
</uap:ShowNameOnTiles>
</uap:DefaultTile >
<uap:SplashScreen Image="Images\SplashScreen.png" />
<uap:InitialRotationPreference>
<uap:Rotation Preference="landscape"/>
</uap:InitialRotationPreference>
<uap:LockScreen BadgeLogo="Images\BadgeLogo.png" Notification="badgeAndTileText"/>
</uap:VisualElements>
<Extensions>
<desktop:Extension Category="windows.fullTrustProcess" Executable="Steam++\Steam++.exe" />
<desktop:Extension Category="windows.startupTask" Executable="Steam++\Steam++.exe" EntryPoint="Windows.FullTrustApplication">
<desktop:StartupTask TaskId="BootAutoStartTask" Enabled="true" DisplayName="Steam++ System Boot Run" />
</desktop:Extension>
<uap:Extension Category="windows.protocol">
<uap:Protocol Name="spp">
<uap:Logo>Images\Square44x44Logo.png</uap:Logo>
<uap:DisplayName>Steam++ URI Scheme</uap:DisplayName>
</uap:Protocol>
</uap:Extension>
</Extensions>
</Application>
</Applications>
<Extensions>
<desktop2:Extension Category="windows.firewallRules">
<desktop2:FirewallRules Executable="Steam++\modules\Accelerator\Steam++.Accelerator.exe">
<desktop2:Rule Direction="in" IPProtocol="TCP" Profile="all"/>
<desktop2:Rule Direction="in" IPProtocol="UDP" Profile="all"/>
</desktop2:FirewallRules>
</desktop2:Extension>
</Extensions>
<Capabilities>
<Capability Name="internetClient" />
<rescap:Capability Name="runFullTrust" />
<rescap:Capability Name="allowElevation" />
</Capabilities>
</Package>
+1 -1
View File
@@ -10,6 +10,6 @@
<legacyCorruptedStateExceptionsPolicy enabled="true"/>
</runtime>
<appSettings>
<add key="d" value="8.0.0"/>
<add key="d" value="9.0.0"/>
</appSettings>
</configuration>
+3 -3
View File
@@ -16,7 +16,7 @@ static unsafe partial class Program
{
static Program()
{
dotnet_version_major = "8";
dotnet_version_major = "9";
dotnet_version_minor = "0";
dotnet_version_build = "0";
dotnet_version = $"{dotnet_version_major}.{dotnet_version_minor}.{dotnet_version_build}";
@@ -426,8 +426,8 @@ static unsafe partial class Program
if (!File.Exists(config_path) || !File.Exists(dotnetlib_path))
{
#if DEBUG
config_path = string.Join(Path.DirectorySeparatorChar.ToString(), new[] { ProjectUtils.ProjPath, "src", "BD.WTTS.Client.Avalonia.App", "bin", "Debug", $"net{dotnet_version_major}.{dotnet_version_minor}-windows10.0.19041.0", $"{dotnet_dll_name}.runtimeconfig.json" });
dotnetlib_path = string.Join(Path.DirectorySeparatorChar.ToString(), new[] { ProjectUtils.ProjPath, "src", "BD.WTTS.Client.Avalonia.App", "bin", "Debug", $"net{dotnet_version_major}.{dotnet_version_minor}-windows10.0.19041.0", $"{dotnet_dll_name}.dll" });
config_path = string.Join(Path.DirectorySeparatorChar.ToString(), new[] { ProjectUtils.ProjPath, "src", "BD.WTTS.Client.Avalonia.App", "bin", "Debug", $"net{dotnet_version_major}.{dotnet_version_minor}-windows10.0.19041", $"{dotnet_dll_name}.runtimeconfig.json" });
dotnetlib_path = string.Join(Path.DirectorySeparatorChar.ToString(), new[] { ProjectUtils.ProjPath, "src", "BD.WTTS.Client.Avalonia.App", "bin", "Debug", $"net{dotnet_version_major}.{dotnet_version_minor}-windows10.0.19041", $"{dotnet_dll_name}.dll" });
#else
ShowErrMessageBox($"Loading assembly failed \"{dotnetlib_path}\"");
return (int)ExitCode.EntryPointFileNotFound;
@@ -95,31 +95,37 @@
<ProjectReference Include="..\BD.WTTS.Client\BD.WTTS.Client.csproj" />
</ItemGroup>
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows' AND Exists('$(NugetPackageRoot)\system.drawing.common\$(Version_System_Drawing_Common)\lib\net8.0\System.Drawing.Common.dll')">
<!-- Windows Only -->
<!-- 修复:存在 Microsoft.WindowsDesktop.App 依赖时不会将 System.Drawing.Common.dll 复制到输出目录-->
<None Include="$(NugetPackageRoot)\system.drawing.common\$(Version_System_Drawing_Common)\lib\net8.0\System.Drawing.Common.dll">
<!--<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows' AND Exists('$(NugetPackageRoot)\system.drawing.common\$(Version_System_Drawing_Common)\lib\net9.0\System.Drawing.Common.dll')">
--><!-- Windows Only --><!--
--><!-- 修复:存在 Microsoft.WindowsDesktop.App 依赖时不会将 System.Drawing.Common.dll 复制到输出目录--><!--
<None Include="$(NugetPackageRoot)\system.drawing.common\$(Version_System_Drawing_Common)\lib\net9.0\System.Drawing.Common.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<Reference Include="System.Drawing.Common">
<HintPath>$(NugetPackageRoot)\system.drawing.common\$(Version_System_Drawing_Common)\lib\net8.0\System.Drawing.Common.dll</HintPath>
<HintPath>$(NugetPackageRoot)\system.drawing.common\$(Version_System_Drawing_Common)\lib\net9.0\System.Drawing.Common.dll</HintPath>
</Reference>
<None Include="$(NugetPackageRoot)\microsoft.win32.systemevents\9.0.0\runtimes\win\lib\net9.0\Microsoft.Win32.SystemEvents.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<Reference Include="Microsoft.Win32.SystemEvents">
<HintPath>$(NugetPackageRoot)\microsoft.win32.systemevents\9.0.0\runtimes\win\lib\net9.0\Microsoft.Win32.SystemEvents.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows' AND Exists('$(NugetPackageRoot)\splat.drawing\$(Version_Splat_Drawing)\lib\net7.0\Splat.Drawing.dll')">
<!-- Windows Only -->
<!-- 修复:Splat.Drawing 包存在 WPF 的依赖项 -->
--><!-- Windows Only --><!--
--><!-- 修复:Splat.Drawing 包存在 WPF 的依赖项 --><!--
<PackageReference Include="Splat.Drawing">
<ExcludeAssets>all</ExcludeAssets>
</PackageReference>
<Reference Include="Splat.Drawing">
<HintPath>$(NugetPackageRoot)\splat.drawing\$(Version_Splat_Drawing)\lib\net7.0\Splat.Drawing.dll</HintPath>
</Reference>
<!-- 修复:System.Reactive 包存在 System.Windows.Forms 的依赖项 -->
--><!-- 修复:System.Reactive 包存在 System.Windows.Forms 的依赖项 --><!--
<Reference Include="System.Reactive">
<HintPath>$(NugetPackageRoot)\system.reactive\$(Version_System_Reactive)\lib\net6.0\System.Reactive.dll</HintPath>
</Reference>
</ItemGroup>
</ItemGroup>-->
<Import Project="..\TFM_NETX_WITH_DESKTOP.props" />
+3 -3
View File
@@ -4,12 +4,12 @@
<dict>
<key>CFBundleName</key>
<string>Watt Toolkit</string>
<key>CFBundleDisplayName</key>
<string>Watt Toolkit</string>
<key>CFBundleShortVersionString</key>
<string>3.0.0</string>
<key>CFBundleVersion</key>
<string>3.0.0.0</string>
<key>LSMinimumSystemVersion</key>
<string>10.15</string>
<string>3.0.1219.0</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
@@ -175,6 +175,10 @@ partial class Program
{
RenderingMode = GetRenderingMode().ToArray(),
});
builder.With(new MacOSPlatformOptions
{
DisableDefaultApplicationMenuItems = true,
});
#elif LINUX
builder.With(new X11PlatformOptions
{
@@ -54,8 +54,11 @@ sealed class AvaloniaToastServiceImpl : IToastService
}
}
var notificationType = GetNotificationType(icon);
NotificationManager.Show(text, notificationType: notificationType);
if (NotificationManager != null)
{
var notificationType = GetNotificationType(icon);
NotificationManager.Show(text, notificationType: notificationType);
}
}
/// <inheritdoc cref="Show(string, int?)"/>
+11 -3
View File
@@ -13,8 +13,16 @@ public sealed partial class App : Application
public App()
{
Name = AssemblyInfo.Trademark;
OpenBrowserCommand = ReactiveCommand.Create<object?>(OpenBrowserCommandCore);
CopyToClipboardCommand = ReactiveCommand.Create<object?>(CopyToClipboardCommandCore);
#if MACOS
var menus = new NativeMenu();
menus.Add(new NativeMenuItem { Header = Strings.Settings, Command = ReactiveCommand.Create(() => { INavigationService.Instance.Navigate(typeof(SettingsPage)); }) });
menus.Add(new NativeMenuItemSeparator());
menus.Add(new NativeMenuItem { Header = Strings.Exit, Command = ReactiveCommand.Create(() => { Shutdown(); }) });
NativeMenu.SetMenu(this, menus);
#endif
}
/// <summary>
@@ -76,7 +84,7 @@ public sealed partial class App : Application
Log.Error(nameof(Steamworks), ex, "Steamworks.SteamClient Init");
}
}
#endif
#endif
}
catch (Exception ex)
{
@@ -252,8 +260,8 @@ public sealed partial class App : Application
try
{
Uri uri = new(urlString);
if (uri.Host.EndsWith("steampp.net", StringComparison.OrdinalIgnoreCase) ||
uri.Host.EndsWith("mossimo.net", StringComparison.OrdinalIgnoreCase))
if (uri.Host.EndsWith(Constants.Urls.OfficialWebsiteHost, StringComparison.OrdinalIgnoreCase) &&
uri.Query.EndsWith(Constants.Urls.Komaasharu_IsAuthQuery, StringComparison.OrdinalIgnoreCase))
{
await UserService.Current.OpenAuthUrl(urlString);
return;
@@ -3,6 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ms="https://steampp.net/settings"
xmlns:sys="using:System"
xmlns:ui="using:FluentAvalonia.UI.Controls"
x:CompileBindings="True">
<Styles.Resources>
<ResourceDictionary>
@@ -39,6 +40,14 @@
<Setter Property="FontFamily" Value="{Binding Source={x:Static ms:UISettings.FontName}, Path=Value, Mode=OneWay, Converter={StaticResource NameToFontFamilyConverter}}" />
</Style>
<Style Selector="ui|FontIcon">
<Setter Property="MinWidth" Value="16" />
</Style>
<Style Selector="ui|SymbolIcon">
<Setter Property="MinWidth" Value="16" />
</Style>
<!--<Style Selector="TextBlock">
<Setter Property="FontFamily" Value="{Binding Source={x:Static ms:UISettings.FontName}, Path=Value, Mode=OneWay, Converter={StaticResource NameToFontFamilyConverter}}" />
</Style>-->
@@ -91,6 +91,12 @@
CommandParameter="{Binding Data.AssemblyLocation}"
Content="{Binding Path=Res.Plugin_OpenFolder, Mode=OneWay, Source={x:Static s:ResourceService.Current}}"
IsClickEnabled="True" />
<ui:SettingsExpanderItem
ActionIconSource="Open"
Command="{Binding $parent[spp:Settings_Plugin].((spp:SettingsPageViewModel)DataContext).OpenPluginCacheDirectory_Click}"
CommandParameter="{Binding Data.AppDataDirectory}"
Content="{Binding Path=Res.Plugin_OpenAppDataFolder, Mode=OneWay, Source={x:Static s:ResourceService.Current}}"
IsClickEnabled="True" />
<ui:SettingsExpanderItem
ActionIconSource="Open"
Command="{Binding $parent[spp:Settings_Plugin].((spp:SettingsPageViewModel)DataContext).OpenPluginCacheDirectory_Click}"
@@ -110,7 +110,7 @@
<PackageReference Include="Utf8StringInterpolation" />
</ItemGroup>
<ItemGroup Condition="$([MSBuild]::IsOSPlatform('windows')) AND ($(RuntimeIdentifier.StartsWith('win-')) OR $(RuntimeIdentifier) == '')">
<ItemGroup Condition="!$(DefineConstants.Contains('REMOVE_DNS_INTERCEPT')) AND $([MSBuild]::IsOSPlatform('windows')) AND ($(RuntimeIdentifier.StartsWith('win-')) OR $(RuntimeIdentifier) == '')">
<PackageReference Include="Aigio.WinDivertSharp" />
</ItemGroup>
@@ -148,6 +148,7 @@ public static partial class ServiceCollectionExtensions
#if WINDOWS
#if !REMOVE_DNS_INTERCEPT
/// <summary>
/// 注册数据包拦截器
/// </summary>
@@ -170,6 +171,7 @@ public static partial class ServiceCollectionExtensions
return services;
}
#endif
#endif
}
@@ -129,7 +129,7 @@ sealed partial class CertificateManagerImpl : ICertificateManager
bool SharedCreateRootCertificate()
{
RootCertificate ??= LoadRootCertificate();
RootCertificate = LoadRootCertificate();
if (RootCertificate != null)
{
@@ -83,7 +83,7 @@ sealed class CertService
entry.SetAbsoluteExpiration(notAfter);
var subjectName = new X500DistinguishedName($"CN={domain}");
using var serverCert = CertGenerator.CreateEndCertificate(caCert, subjectName, GetDomains(), notBefore, notAfter);
using var serverCert = CertGenerator.CreateEndCertificate(caCert, subjectName, GetDomains());
var serverCertPfx = serverCert.Export(X509ContentType.Pfx);
// 将生成的证书导出后重新创建一个
return new X509Certificate2(serverCertPfx);
@@ -1,6 +1,6 @@
// https://github.com/dotnetcore/FastGithub/blob/2.1.4/FastGithub.PacketIntercept/DnsInterceptHostedService.cs
#if WINDOWS
#if WINDOWS && !REMOVE_DNS_INTERCEPT
// ReSharper disable once CheckNamespace
namespace BD.WTTS.Services.Implementation;
@@ -1,6 +1,6 @@
// https://github.com/dotnetcore/FastGithub/blob/2.1.4/FastGithub.PacketIntercept/Dns/DnsInterceptor.cs
#if WINDOWS
#if WINDOWS && !REMOVE_DNS_INTERCEPT
using WinDivertSharp;
using DNS.Protocol;
@@ -1,6 +1,6 @@
// https://github.com/dotnetcore/FastGithub/blob/2.1.4/FastGithub.PacketIntercept/Tcp/GitInterceptor.cs
#if WINDOWS
#if WINDOWS && !REMOVE_DNS_INTERCEPT
using static BD.WTTS.Models.Abstractions.IReverseProxyConfig;
@@ -1,6 +1,6 @@
// https://github.com/dotnetcore/FastGithub/blob/2.1.4/FastGithub.PacketIntercept/Tcp/HttpInterceptor.cs
#if WINDOWS
#if WINDOWS && !REMOVE_DNS_INTERCEPT
using static BD.WTTS.Models.Abstractions.IReverseProxyConfig;
@@ -1,6 +1,6 @@
// https://github.com/dotnetcore/FastGithub/blob/2.1.4/FastGithub.PacketIntercept/Tcp/HttpsInterceptor.cs
#if WINDOWS
#if WINDOWS && !REMOVE_DNS_INTERCEPT
using static BD.WTTS.Models.Abstractions.IReverseProxyConfig;
@@ -1,6 +1,6 @@
// https://github.com/dotnetcore/FastGithub/blob/2.1.4/FastGithub.PacketIntercept/Tcp/SshInterceptor.cs
#if WINDOWS
#if WINDOWS && !REMOVE_DNS_INTERCEPT
using static BD.WTTS.Models.Abstractions.IReverseProxyConfig;
@@ -1,6 +1,6 @@
// https://github.com/dotnetcore/FastGithub/blob/2.1.4/FastGithub.PacketIntercept/TcpInterceptHostedService.cs
#if WINDOWS
#if WINDOWS && !REMOVE_DNS_INTERCEPT
using static BD.WTTS.Models.Abstractions.IReverseProxyConfig;
@@ -1,6 +1,6 @@
// https://github.com/dotnetcore/FastGithub/blob/2.1.4/FastGithub.PacketIntercept/Tcp/TcpInterceptor.cs
#if WINDOWS
#if WINDOWS && !REMOVE_DNS_INTERCEPT
using WinDivertSharp;
@@ -23,7 +23,7 @@ partial class YarpReverseProxyServiceImpl
services.AddReverseProxyServer();
services.AddFlowAnalyze();
#if WINDOWS
#if WINDOWS && !REMOVE_DNS_INTERCEPT
if (ProxyMode == ProxyMode.DNSIntercept)
{
services.AddPacketIntercept();
@@ -47,9 +47,55 @@ sealed partial class YarpReverseProxyServiceImpl : ReverseProxyServiceImpl, IRev
ICertificateManager.Constants.CheckRootCertificate(
platformService,
CertificateManager);
try
{
X509Certificate2? cer = CertificateManager.RootCertificatePackable;
if (cer is not null &&
DateTime.Now <= cer.NotAfter && cer.NotAfter <= DateTime.Now.AddMilliseconds(int.MaxValue))
{
var interval = cer.NotAfter - DateTime.Now;
_certificateTimer = new System.Timers.Timer(interval)
{
AutoReset = false,
};
_certificateTimer.Elapsed += async (_, _) =>
{
try
{
ICertificateManager.Constants.CheckRootCertificate(
platformService,
CertificateManager);
await StopProxyAsync();
await StartProxyImpl();
}
catch (Exception e)
{
e.LogAndShowT(TAG, msg: "CheckRootCertificate in Timer.Elapsed Error");
}
};
_certificateTimer.Start();
}
}
catch (Exception e)
{
e.LogAndShowT(TAG, msg: "CheckRootCertificate Error");
}
}
}
private System.Timers.Timer? _certificateTimer;
private void StopCertificateTimer()
{
_certificateTimer?.Stop();
_certificateTimer?.Dispose();
_certificateTimer = null;
}
protected override Task<StartProxyResult> StartProxyImpl() => Task.FromResult(StartProxyCore());
StartProxyResult StartProxyCore()
@@ -153,6 +199,7 @@ sealed partial class YarpReverseProxyServiceImpl : ReverseProxyServiceImpl, IRev
public async Task StopProxyAsync()
{
StopCertificateTimer();
Scripts = null;
if (app == null) return;
await app.StopAsync();
@@ -196,6 +196,11 @@ public interface ICertificateManager
// 生成证书
certificateManager.GenerateCertificate();
packable = GetRootCertificatePackable();
certificate2 = packable;
if (certificate2 == null)
return StartProxyResultCode.GetX509Certificate2Fail;
// 安装证书
ICertificateManager.Constants.TrustRootCertificate(
GetCerFilePath, platformService, certificate2);
@@ -124,7 +124,7 @@
</EmbeddedResource>
</ItemGroup>
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">
<ItemGroup Condition="!$(DefineConstants.Contains('REMOVE_DNS_INTERCEPT')) AND $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">
<Compile Update="Properties\WinDivertResource.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
@@ -136,7 +136,7 @@
</EmbeddedResource>
</ItemGroup>
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) != 'windows'">
<ItemGroup Condition="$(DefineConstants.Contains('REMOVE_DNS_INTERCEPT')) OR $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) != 'windows'">
<Compile Remove="Properties\WinDivertResource.Designer.cs" />
<EmbeddedResource Remove="Properties\WinDivertResource.resx" />
</ItemGroup>
@@ -1,4 +1,4 @@
#if WINDOWS
#if WINDOWS && !REMOVE_DNS_INTERCEPT
using WinDivertBinRes = BD.WTTS.Properties.WinDivertResource;
namespace Mobius.Helpers;
@@ -345,7 +345,8 @@ internal partial class NetworkTestService : INetworkTestService
)
{
using UdpClient udpClient = new UdpClient(dnsServerIp, dnsServerPort);
udpClient.Client.SendTimeout = 3000;
udpClient.Client.ReceiveTimeout = 3000;
var query = new DnsQueryUdpRequest(testDomain, dnsRecordType);
Stopwatch watch = Stopwatch.StartNew();
@@ -382,7 +383,7 @@ internal partial class NetworkTestService : INetworkTestService
Proxy = HttpNoProxy.Instance,
};
using HttpClient client = new HttpClient(handler);
client.Timeout = TimeSpan.FromSeconds(3);
string queryUrl = $"{dohServer}?name={testDomain}&type={dnsRecordType}";
Stopwatch watch = Stopwatch.StartNew();
@@ -2,6 +2,7 @@
using Avalonia.Platform.Storage;
using Avalonia.Threading;
using BD.Common.Models;
using BD.WTTS.Helpers;
using BD.WTTS.UI.Views.Controls;
using BD.WTTS.UI.Views.Pages;
using FluentAvalonia.UI.Controls;
@@ -52,7 +53,7 @@ public sealed partial class GameAcceleratorService
[Reactive]
public DateTime? VipEndTime { get; set; }
const string VipEndTimeStringDef = "新用户免费试用 2 天";
const string VipEndTimeStringDef = "新用户免费试用";
[Reactive]
public string? VipEndTimeString { get; set; } = VipEndTimeStringDef;
@@ -306,6 +307,7 @@ public sealed partial class GameAcceleratorService
Games.AddOrUpdate(CurrentAcceleratorGame);
//加速后
TracepointHelper.TrackEvent("AcceleratorGameSuccess");
Toast.Show(ToastIcon.Success, "加速成功");
if (ProxySettings.AutoShowWattAcceleratorWindow.Value)
{
@@ -353,9 +355,16 @@ public sealed partial class GameAcceleratorService
if (UserService.Current.User?.WattOpenId == null)
{
Toast.Show(ToastIcon.Warning, "需要登录账号才能使用游戏加速功能!");
UserService.Current.ShowWindow();
app.IsAccelerating = false;
return;
}
TracepointHelper.TrackEvent(nameof(GameAccelerator), new Dictionary<string, string> {
{ "GameId", app.Id.ToString() },
{ "GameName", app.Name ?? string.Empty },
});
var xunYouIsInstall = await Ioc.Get<IAcceleratorService>().XY_IsInstall();
if (xunYouIsInstall.HandleUI(out var isInstall))
{
@@ -604,6 +613,7 @@ public sealed partial class GameAcceleratorService
Toast.Show(ToastIcon.Info, "已安装Watt加速器");
return;
}
TracepointHelper.TrackEvent("DownloadInstallAccelerator");
var td = new TaskDialog
{
Title = "下载插件",
@@ -619,44 +629,45 @@ public sealed partial class GameAcceleratorService
};
var install = Ioc.Get<IAcceleratorService>().XY_Install(GameAcceleratorSettings.WattAcceleratorDirPath.Value!);
td.Opened += async (s, e) =>
td.Opened += (s, e) =>
{
await foreach (var item in install)
{
if (item.HandleUI(out var content))
{
switch (content)
{
case < 100:
Dispatcher.UIThread.Post(() => { td.Content = $"正在下载 {item.Content}%"; });
td.SetProgressBarState(item.Content, TaskDialogProgressState.Normal);
break;
case 100:
td.SetProgressBarState(item.Content, TaskDialogProgressState.Indeterminate);
Dispatcher.UIThread.Post(() => { td.Content = $"下载完成,正在安装..."; });
break;
case (int)XunYouDownLoadCode.安装成功:
//处理成功
//Dispatcher.UIThread.Post(() => { td.Content = $"安装完成"; });
Dispatcher.UIThread.Post(() => { td.Hide(TaskDialogStandardResult.OK); });
td.Hide();
break;
case int n when n > 101 && n < (int)XunYouDownLoadCode.启动安装程序失败:
//处理失败
break;
// Code 和进度重叠 递进 1000 XunYouInstallOrStartCode.默认 XunYouInstallOrStartCode.已安装
case 1000:
Dispatcher.UIThread.Post(() => { td.Content = $"默认"; });
// XunYouInstallOrStartCode.默认
break;
case 1001:
Dispatcher.UIThread.Post(() => { td.Content = $"已安装"; });
// XunYouInstallOrStartCode.已安装
Dispatcher.UIThread.Post(() => { td.Hide(TaskDialogStandardResult.OK); });
break;
}
}
}
DownloadCallbackAsync(td, install).Wait();
//await foreach (var item in install)
//{
// if (item.HandleUI(out var content))
// {
// switch (content)
// {
// case < 100:
// Dispatcher.UIThread.Post(() => { td.Content = $"正在下载 {item.Content}%"; });
// td.SetProgressBarState(item.Content, TaskDialogProgressState.Normal);
// break;
// case 100:
// td.SetProgressBarState(item.Content, TaskDialogProgressState.Indeterminate);
// Dispatcher.UIThread.Post(() => { td.Content = $"下载完成,正在安装..."; });
// break;
// case (int)XunYouDownLoadCode.安装成功:
// //处理成功
// //Dispatcher.UIThread.Post(() => { td.Content = $"安装完成"; });
// Dispatcher.UIThread.Post(() => { td.Hide(TaskDialogStandardResult.OK); });
// td.Hide();
// break;
// case int n when n > 101 && n < (int)XunYouDownLoadCode.启动安装程序失败:
// //处理失败
// break;
// // Code 和进度重叠 递进 1000 XunYouInstallOrStartCode.默认 XunYouInstallOrStartCode.已安装
// case 1000:
// Dispatcher.UIThread.Post(() => { td.Content = $"默认"; });
// // XunYouInstallOrStartCode.默认
// break;
// case 1001:
// Dispatcher.UIThread.Post(() => { td.Content = $"已安装"; });
// // XunYouInstallOrStartCode.已安装
// Dispatcher.UIThread.Post(() => { td.Hide(TaskDialogStandardResult.OK); });
// break;
// }
// }
//}
};
//_ = Task.Run(() => { XunYouSDK.InstallAsync(progress, Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles), "WattAccelerator")); });
@@ -665,6 +676,47 @@ public sealed partial class GameAcceleratorService
}
}
private static async Task DownloadCallbackAsync(TaskDialog td, IAsyncEnumerable<ApiRsp<int>> install)
{
await foreach (var item in install)
{
if (item.HandleUI(out var content))
{
switch (content)
{
case < 100:
Dispatcher.UIThread.Post(() => { td.Content = $"正在下载 {item.Content}%"; });
td.SetProgressBarState(item.Content, TaskDialogProgressState.Normal);
break;
case 100:
td.SetProgressBarState(item.Content, TaskDialogProgressState.Indeterminate);
Dispatcher.UIThread.Post(() => { td.Content = $"下载完成,正在安装..."; });
break;
case (int)XunYouDownLoadCode.安装成功:
//处理成功
//Dispatcher.UIThread.Post(() => { td.Content = $"安装完成"; });
TracepointHelper.TrackEvent("DownloadInstallSuccess");
Dispatcher.UIThread.Post(() => { td.Hide(TaskDialogStandardResult.OK); });
td.Hide();
break;
case int n when n > 101 && n < (int)XunYouDownLoadCode.启动安装程序失败:
//处理失败
break;
// Code 和进度重叠 递进 1000 XunYouInstallOrStartCode.默认 XunYouInstallOrStartCode.已安装
case 1000:
Dispatcher.UIThread.Post(() => { td.Content = $"默认"; });
// XunYouInstallOrStartCode.默认
break;
case 1001:
Dispatcher.UIThread.Post(() => { td.Content = $"已安装"; });
// XunYouInstallOrStartCode.已安装
Dispatcher.UIThread.Post(() => { td.Hide(TaskDialogStandardResult.OK); });
break;
}
}
}
}
public static async void UninstallAccelerator()
{
var xunYouIsInstall = await Ioc.Get<IAcceleratorService>().XY_IsInstall();
@@ -1,4 +1,7 @@
// ReSharper disable once CheckNamespace
using BD.WTTS.Helpers;
using BD.WTTS.Services.Implementation;
namespace BD.WTTS.Services;
partial class ProxyService
@@ -36,6 +39,11 @@ partial class ProxyService
Toast.Show(ToastIcon.Warning, Strings.CommunityFix_AccEmpty);
}
TracepointHelper.TrackEvent("StartProxy", new Dictionary<string, string> {
{ "ProxyType", ProxySettings.ProxyMode.Value.ToString() },
{ "ProxyScriptStatus", ProxySettings.IsEnableScript.Value.ToString() },
});
IReadOnlyCollection<ScriptIPCDTO>? scripts = default;
bool isEnableScript = ProxySettings.IsEnableScript.Value;
bool isOnlyWorkSteamBrowser = ProxySettings.IsOnlyWorkSteamBrowser.Value;
@@ -66,6 +74,18 @@ partial class ProxyService
bool useDoh = ProxySettings.UseDoh.Value;
string? customDohAddres = ProxySettings.CustomDohAddres2.Value;
if (ProxySettings.ProxyBeforeDNSCheck.Value)
{
if (useDoh)
{
customDohAddres = await GetFastestDNSAsync(ProxySettingsWindowViewModel.DohAddress);
}
else
{
proxyDNS = await GetFastestDNSAsync(ProxySettingsWindowViewModel.ProxyDNSs.Skip(1));
}
}
Lazy<IPAddress> proxyIp_ = new(() => ReverseProxySettings.GetProxyIp(proxyIp));
void SetProxyIp(IPAddress proxyIPAddress)
{
@@ -120,6 +140,9 @@ partial class ProxyService
switch (proxyMode)
{
#if REMOVE_DNS_INTERCEPT
case ProxyMode.DNSIntercept:
#endif
case ProxyMode.Hosts:
var inUsePort = SocketHelper.IsUsePort(proxyIp_.Value, httpsPort);
if (inUsePort)
@@ -186,7 +209,7 @@ partial class ProxyService
return Strings.CommunityFix_SetAsSystemPACProxyFail;
}
break;
#if WINDOWS
#if WINDOWS && !REMOVE_DNS_INTERCEPT
case ProxyMode.DNSIntercept:
{
await Mobius.Helpers.WinDivertInitHelper.InitializeAsync();
@@ -315,6 +338,9 @@ partial class ProxyService
#endif
switch (proxyMode) // 先停止接入代理流量
{
#if REMOVE_DNS_INTERCEPT
case ProxyMode.DNSIntercept:
#endif
case ProxyMode.Hosts:
var needClear = hostsFileService.ContainsHostsByTag();
if (needClear)
@@ -351,7 +377,7 @@ partial class ProxyService
await platformService.SetAsSystemPACProxyAsync(false);
}
break;
#if WINDOWS
#if WINDOWS && !REMOVE_DNS_INTERCEPT
case ProxyMode.DNSIntercept:
{
// 停止时也调用初始化
@@ -450,4 +476,69 @@ partial class ProxyService
return proxyStatus;
}
}
async Task<(long delayMs, string dns)> GetValidDNSAsync(string dns, CancellationToken cancellationToken = default)
{
var testDomain = "dnscheck-test.steampp.net";
try
{
long delayMs;
IPAddress[] address;
if (ProxySettings.UseDoh.Value)
{
(delayMs, address) = await INetworkTestService.Instance.TestDNSOverHttpsAsync(testDomain, dns, cancellationToken: cancellationToken);
}
else
{
(delayMs, address) = await INetworkTestService.Instance.TestDNSAsync(testDomain, dns, 53, cancellationToken: cancellationToken);
}
if (address.Length == 0)
throw new Exception("Parsing failed. Return empty ip address.");
return (delayMs, dns);
}
catch (Exception ex)
{
Log.Error(nameof(StartOrStopProxyService), ex.ToString(), "DNS检测出错");
return (0, dns);
}
}
async Task<string?> GetFastestDNSAsync(IEnumerable<string> dnsAddresses, CancellationToken cancellationToken = default)
{
var cts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken);
var tasks = new List<Task<(long delayMs, string dns)>>();
foreach (var dns in dnsAddresses)
{
tasks.Add(GetValidDNSAsync(dns, cts.Token));
}
try
{
// 等待任意一个任务完成
var completedTask = await Task.WhenAny(tasks);
// 获取任务结果
var (delayMs, dns) = await completedTask;
_ = cts.CancelAsync(); // 取消其他任务
// 如果任务成功完成(假设 delayMs > 0 表示成功)
if (delayMs > 0)
{
return dns; // 返回第一个成功的 DNS 地址
}
}
catch (OperationCanceledException)
{
// 任务被取消,忽略
}
catch (Exception ex)
{
Log.Error(nameof(StartOrStopProxyService), ex.ToString(), "DNS检测出错");
}
// 如果没有有效结果,返回默认值
return null;
}
}
@@ -1,5 +1,6 @@
// ReSharper disable once CheckNamespace
using Avalonia.Data;
using BD.WTTS.Helpers;
using Google.Protobuf.WellKnownTypes;
using Org.BouncyCastle.Bcpg.OpenPgp;
using System.Linq;

Some files were not shown because too many files have changed in this diff Show More