From 0efdc83d0be627a8b0a76b470908e575aa79c369 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 23 Jun 2026 10:11:45 +0800 Subject: [PATCH] chore: migrate license server defaults --- douyin/license/license_manager.py | 2 +- douyin/license/public_key.py | 2 +- douyin/updater/force_update.py | 2 +- license_server/README.md | 2 +- tests/test_auto_update.py | 8 ++++---- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/douyin/license/license_manager.py b/douyin/license/license_manager.py index 7dccf0e..e1fccfa 100644 --- a/douyin/license/license_manager.py +++ b/douyin/license/license_manager.py @@ -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 diff --git a/douyin/license/public_key.py b/douyin/license/public_key.py index e117646..520b911 100644 --- a/douyin/license/public_key.py +++ b/douyin/license/public_key.py @@ -4,6 +4,6 @@ """ PUBLIC_KEY_PEM = b"""-----BEGIN PUBLIC KEY----- -MCowBQYDK2VwAyEA3g7inE/9SRkEDseJIp7j5J6vWlvSgitHErypisMY29o= +MCowBQYDK2VwAyEA4qs1m9tv6c4lyLzkgBBM0GW0wZfWkHaUKkerts2Hh4c= -----END PUBLIC KEY----- """ diff --git a/douyin/updater/force_update.py b/douyin/updater/force_update.py index 752f430..64dff2b 100644 --- a/douyin/updater/force_update.py +++ b/douyin/updater/force_update.py @@ -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): diff --git a/license_server/README.md b/license_server/README.md index 1b5208b..61d4565 100644 --- a/license_server/README.md +++ b/license_server/README.md @@ -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,然后启动安装器并退出旧进程。 diff --git a/tests/test_auto_update.py b/tests/test_auto_update.py index e4af4bd..257c1e5 100644 --- a/tests/test_auto_update.py +++ b/tests/test_auto_update.py @@ -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,