diff --git a/config/setting.toml b/config/setting.toml index fe48545..051cfd3 100644 --- a/config/setting.toml +++ b/config/setting.toml @@ -12,7 +12,7 @@ max_poll_attempts = 200 [server] host = "0.0.0.0" -port = 8106 +port = 8000 [debug] enabled = false diff --git a/request.py b/request.py index 80de579..48f73e5 100644 --- a/request.py +++ b/request.py @@ -7,7 +7,7 @@ import asyncio # --- 配置区域 --- -BASE_URL = os.getenv('GEMINI_FLOW2API_URL', 'http://127.0.0.1:8106') +BASE_URL = os.getenv('GEMINI_FLOW2API_URL', 'http://127.0.0.1:8000') BACKEND_URL = BASE_URL + "/v1/chat/completions" API_KEY = os.getenv('GEMINI_FLOW2API_APIKEY', 'Bearer han1234') if API_KEY is None: diff --git a/src/main.py b/src/main.py index 0688623..0b4e1fd 100644 --- a/src/main.py +++ b/src/main.py @@ -74,7 +74,7 @@ async def lifespan(app: FastAPI): # Initialize browser captcha service if needed browser_service = None - if True: + if captcha_config.captcha_method == "personal": from .services.browser_captcha_personal import BrowserCaptchaService browser_service = await BrowserCaptchaService.get_instance(db) await browser_service.open_login_window() diff --git a/src/services/flow_client.py b/src/services/flow_client.py index 691e8db..924e068 100644 --- a/src/services/flow_client.py +++ b/src/services/flow_client.py @@ -687,7 +687,8 @@ class FlowClient: """获取reCAPTCHA token - 支持两种方式""" captcha_method = config.captcha_method - if True: + # 恒定浏览器打码 + if captcha_method == "personal": try: from .browser_captcha_personal import BrowserCaptchaService service = await BrowserCaptchaService.get_instance(self.proxy_manager) @@ -695,7 +696,7 @@ class FlowClient: except Exception as e: debug_logger.log_error(f"[reCAPTCHA Browser] error: {str(e)}") return None - # 浏览器打码 + # 无头浏览器打码 elif captcha_method == "browser": try: from .browser_captcha import BrowserCaptchaService diff --git a/static/manage.html b/static/manage.html index 537337b..a8b7261 100644 --- a/static/manage.html +++ b/static/manage.html @@ -269,7 +269,8 @@

选择验证码获取方式