chore: migrate license server defaults

This commit is contained in:
Your Name committed 2026-06-23 10:11:45 +08:00
1 parent 920c51d460
commit 0efdc83d0b
5 files changed
+8 -8

No files matched your search

+1 -1
View File
@@ -24,7 +24,7 @@ from douyin.license.public_key import PUBLIC_KEY_PEM
LICENSE_FILENAME = "license.dat"
ACTIVATION_CODE_PREFIX = "DYGJ-"
DEFAULT_ACTIVATION_URL = "http://103.236.55.219:18100/api/v1/activate"
DEFAULT_ACTIVATION_URL = "http://110.42.57.97:18100/api/v1/activate"
DEFAULT_VERIFY_INTERVAL_SECONDS = 600
DEFAULT_VERIFY_FAILURES_BEFORE_EXIT = 3
+1 -1
View File
@@ -4,6 +4,6 @@
"""
PUBLIC_KEY_PEM = b"""-----BEGIN PUBLIC KEY-----
MCowBQYDK2VwAyEA3g7inE/9SRkEDseJIp7j5J6vWlvSgitHErypisMY29o=
MCowBQYDK2VwAyEA4qs1m9tv6c4lyLzkgBBM0GW0wZfWkHaUKkerts2Hh4c=
-----END PUBLIC KEY-----
"""
+1 -1
View File
@@ -28,7 +28,7 @@ DEFAULT_INSTALLER_ARGS = (
"/NORESTART",
"/CURRENTUSER",
)
DEFAULT_UPDATE_MANIFEST_URL = "http://103.236.55.219:18100/api/v1/update/manifest"
DEFAULT_UPDATE_MANIFEST_URL = "http://110.42.57.97:18100/api/v1/update/manifest"
class UpdateError(RuntimeError):
+1 -1
View File
@@ -100,7 +100,7 @@ http://服务器IP:18100/admin
打包后的客户端默认读取:
```text
http://103.236.55.219:18100/api/v1/update/manifest
http://110.42.57.97:18100/api/v1/update/manifest
```
如果后台未发布更新,manifest 返回 `version=0.0.0`,客户端不会下载。发布高于客户端当前版本的安装包后,客户端启动时会下载、校验签名和 SHA256,然后启动安装器并退出旧进程。
+4 -4
View File
@@ -115,7 +115,7 @@ def test_forced_update_accepts_signed_manifest(tmp_path, monkeypatch):
manifest = {
"enabled": True,
"version": "3.3.4",
"url": "http://103.236.55.219:18100/api/v1/update/download/DouyinGuaji-3.3.4-Setup.exe",
"url": "http://110.42.57.97:18100/api/v1/update/download/DouyinGuaji-3.3.4-Setup.exe",
"filename": "DouyinGuaji-3.3.4-Setup.exe",
"sha256": expected_sha,
"force": True,
@@ -128,7 +128,7 @@ def test_forced_update_accepts_signed_manifest(tmp_path, monkeypatch):
result = perform_forced_update(
UpdateSettings(
enabled=True,
manifest_url="http://103.236.55.219:18100/api/v1/update/manifest",
manifest_url="http://110.42.57.97:18100/api/v1/update/manifest",
download_dir=tmp_path,
require_https=False,
require_signed_manifest=True,
@@ -150,7 +150,7 @@ def test_forced_update_rejects_bad_signed_manifest(tmp_path, monkeypatch):
monkeypatch.setattr(force_update, "PUBLIC_KEY_PEM", TEST_PUBLIC_KEY_PEM)
manifest = {
"version": "3.3.4",
"url": "http://103.236.55.219:18100/api/v1/update/download/app.exe",
"url": "http://110.42.57.97:18100/api/v1/update/download/app.exe",
"sha256": "0" * 64,
"signature": "bad",
}
@@ -159,7 +159,7 @@ def test_forced_update_rejects_bad_signed_manifest(tmp_path, monkeypatch):
perform_forced_update(
UpdateSettings(
enabled=True,
manifest_url="http://103.236.55.219:18100/api/v1/update/manifest",
manifest_url="http://110.42.57.97:18100/api/v1/update/manifest",
download_dir=tmp_path,
require_https=False,
require_signed_manifest=True,