diff --git a/.gitignore b/.gitignore index 406920b..e13f36c 100644 --- a/.gitignore +++ b/.gitignore @@ -62,11 +62,14 @@ time_analysis_result.txt # Test/diagnostic outputs output/ +artifacts/* +!artifacts/webui_checks/ artifacts/ocr_check/ artifacts/fudai_regression_runs/ artifacts/fudai_regression_samples/ artifacts/webui_checks/**/*.png artifacts/webui_checks/**/*.txt +artifacts/webui_checks/**/*.json # Local runtime state and generated caches state/ @@ -102,6 +105,7 @@ license.dat *~ # Generated tool reports and samples +*.spec tools/coords_report*.csv tools/*_report*.csv tools/*_report*.csv.gz diff --git a/assets/fudai_task_count_v2_one_task.png b/assets/fudai_task_count_v2_one_task.png new file mode 100644 index 0000000..7ec9a56 Binary files /dev/null and b/assets/fudai_task_count_v2_one_task.png differ diff --git a/assets/fudai_task_count_v2_two_task.png b/assets/fudai_task_count_v2_two_task.png new file mode 100644 index 0000000..ca8a207 Binary files /dev/null and b/assets/fudai_task_count_v2_two_task.png differ diff --git a/config/config.json b/config/config.json index de40726..31b4518 100644 --- a/config/config.json +++ b/config/config.json @@ -15,18 +15,18 @@ "/CURRENTUSER" ] }, - "min_prize_value_yuan": 300.0, + "min_prize_value_yuan": 100.0, "min_participants": 0, "max_participants": 0, - "skip_if_countdown_gt_seconds": 118, + "skip_if_countdown_gt_seconds": 10, "reset_after_swipes_enabled": true, "reset_after_swipes": 20, "reset_after_swipes_action": "swipe", - "reenter_live_entry_mode": "follow_list", + "reenter_live_entry_mode": "screen_center", "auto_join_fansclub": true, "fansclub_fail_action": "switch", "high_value_fudai_enabled": true, - "high_value_fudai_threshold_yuan": 500.0, + "high_value_fudai_threshold_yuan": 150.0, "high_value_fudai_join_ahead_seconds": 100, "high_value_fudai_max_swipe_back": 50, "high_value_fudai_max_reservations": 9999, @@ -43,7 +43,7 @@ "yanghao_fallback_enter_live_x": 540, "yanghao_fallback_enter_live_y": 1200, "fudai_find_max_attempts": 99999, - "fudai_icon_max_wait_seconds": 6.5, + "fudai_icon_max_wait_seconds": 7.0, "fudai_icon_retry_delay_seconds": 0.1, "fudai_exit_after_misses": 7, "enable_back_on_misses": false, @@ -193,9 +193,9 @@ "beautify_output": true, "show_timestamps": true, "show_execution_times": true, - "debug_detail_level": "detailed", + "debug_detail_level": "normal", "error_detail_level": "full", - "action_log_format": "detailed", + "action_log_format": "concise", "log_format_mode": "simple", "stage_diag_verbose": true, "color_output": true, @@ -259,7 +259,7 @@ "record_room_title_mapping_enabled": true, "high_value_fudai_poll_before_seconds": 10.0, "high_value_room_revisit_min_interval_seconds": 300, - "high_value_room_revisit_max_per_run": 9999, + "high_value_room_revisit_max_per_run": 20, "high_value_room_revisit_min_prize_value": 1000.0, "high_value_room_revisit_max_age_days": 1, "swipe_up_start_y": 1200, @@ -269,8 +269,234 @@ "log_unified_enabled": true, "log_unified_path": "logs/unified.log", "last_wifi_target": { - "target": "192.168.10.105:39021", + "target": "192.168.10.102:39783", "model": "PEPM00", - "saved_at": 1780417101 + "saved_at": 1782148222 + }, + "region_coords_edit_enabled": false, + "fudai_detail_body_bluepurple_threshold": 0.45, + "fudai_detail_body_dark_threshold": 0.35, + "fudai_task_status_template_threshold": 0.26, + "fudai_detail_regions": { + "legacy": { + "content": [ + 389, + 1273, + 1000, + 1534 + ], + "value": [ + 643, + 1466, + 769, + 1656 + ], + "countdown_full": [ + 390, + 1110, + 690, + 1230 + ], + "task_list": [ + 50, + 1621, + 1032, + 1960 + ], + "task_count": [ + 0, + 0, + 0, + 0 + ], + "participants": [ + 389, + 1273, + 1000, + 1534 + ], + "button": [ + 306, + 2030, + 780, + 2180 + ], + "live_title": [ + 130, + 120, + 560, + 225 + ] + }, + "v2_0_two_task": { + "content": [ + 360, + 1410, + 1035, + 1495 + ], + "value": [ + 300, + 1585, + 650, + 1685 + ], + "countdown_full": [ + 760, + 1328, + 1038, + 1398 + ], + "task_list": [ + 60, + 1840, + 1030, + 2005 + ], + "task_count": [ + 860, + 1770, + 1035, + 1875 + ], + "participants": [ + 520, + 1325, + 760, + 1415 + ], + "button": [ + 70, + 2020, + 1010, + 2165 + ], + "live_title": [ + 130, + 120, + 560, + 225 + ] + }, + "v2_0_one_task": { + "content": [ + 360, + 1460, + 1035, + 1545 + ], + "value": [ + 350, + 1640, + 760, + 1735 + ], + "countdown_full": [ + 769, + 1384, + 1029, + 1442 + ], + "info_line": [ + 430, + 1315, + 1055, + 1435 + ], + "task_list": [ + 61, + 1845, + 885, + 2005 + ], + "task_count": [ + 889, + 1855, + 1040, + 1960 + ], + "participants": [ + 516, + 1396, + 743, + 1443 + ], + "button": [ + 70, + 2050, + 1010, + 2195 + ], + "live_title": [ + 130, + 120, + 560, + 225 + ] + } + }, + "pixel_regions": { + "lottery_result": { + "button": [ + 250, + 1275, + 825, + 1435 + ], + "pixel": [ + 290, + 1300, + 790, + 1415 + ], + "click": [ + 540, + 1360, + 0, + 0 + ] + }, + "attend_button": [ + 200, + 2000, + 880, + 2120 + ], + "fansclub_join": [ + 200, + 1940, + 880, + 2140 + ], + "coupon_popup": [ + 9, + 1173, + 1079, + 2255 + ], + "shopping_redpacket": [ + 200, + 300, + 880, + 1400 + ], + "fudai_detail_body": [ + 0, + 1160, + 1080, + 2250 + ], + "fudai_task_status": [ + 820, + 1815, + 1050, + 2035 + ], + "live_room_icon_bbox": [ + 999, + 172, + 1028, + 202 + ] } } diff --git a/douyin/license/license_manager.py b/douyin/license/license_manager.py index e1fccfa..892c16c 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://110.42.57.97:18100/api/v1/activate" +DEFAULT_ACTIVATION_URL = "http://dy.absfan.cn:18100/api/v1/activate" DEFAULT_VERIFY_INTERVAL_SECONDS = 600 DEFAULT_VERIFY_FAILURES_BEFORE_EXIT = 3 diff --git a/douyin/updater/force_update.py b/douyin/updater/force_update.py index 64dff2b..de643c8 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://110.42.57.97:18100/api/v1/update/manifest" +DEFAULT_UPDATE_MANIFEST_URL = "http://dy.absfan.cn:18100/api/v1/update/manifest" class UpdateError(RuntimeError): @@ -163,11 +163,11 @@ def load_update_settings() -> UpdateSettings: or str(section.get("manifest_url", "") or "") or str(cfg.get("update_manifest_url", "") or "") ).strip() + env_enabled = os.environ.get("DOUYIN_AUTO_UPDATE_ENABLED") using_default_manifest = False if not manifest_url and getattr(sys, "frozen", False): manifest_url = DEFAULT_UPDATE_MANIFEST_URL using_default_manifest = True - env_enabled = os.environ.get("DOUYIN_AUTO_UPDATE_ENABLED") enabled_default = True if using_default_manifest else _to_bool(section.get("enabled"), False) enabled = _to_bool(env_enabled, default=enabled_default) if os.environ.get("DOUYIN_DISABLE_AUTO_UPDATE", "").strip() == "1": diff --git a/license_server/README.md b/license_server/README.md index 61d4565..f7a42fa 100644 --- a/license_server/README.md +++ b/license_server/README.md @@ -100,7 +100,7 @@ http://服务器IP:18100/admin 打包后的客户端默认读取: ```text -http://110.42.57.97:18100/api/v1/update/manifest +http://dy.absfan.cn: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 257c1e5..cb7c881 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://110.42.57.97:18100/api/v1/update/download/DouyinGuaji-3.3.4-Setup.exe", + "url": "http://dy.absfan.cn: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://110.42.57.97:18100/api/v1/update/manifest", + manifest_url="http://dy.absfan.cn: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://110.42.57.97:18100/api/v1/update/download/app.exe", + "url": "http://dy.absfan.cn: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://110.42.57.97:18100/api/v1/update/manifest", + manifest_url="http://dy.absfan.cn:18100/api/v1/update/manifest", download_dir=tmp_path, require_https=False, require_signed_manifest=True,