Files
jianli-boss/client/config.py
T
lingyunxsh ee008c5915 服务端迁移到新地址,MySQL 对外端口改 3307
宿主机 3306 已被 1Panel 的 MySQL 占用,compose 起不来导致后端连不上库、
登录接口 500。容器间仍走 mysql:3306 内网,仅宿主机映射改为 3307。
2026-10-20 22:40:12 +08:00

58 lines
2.1 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""
客户端配置
"""
from pydantic_settings import BaseSettings
class ClientSettings(BaseSettings):
# -------------------------------------------------------
# 云端服务端地址(默认内置生产地址,.env 可覆盖)
# -------------------------------------------------------
SERVER_URL: str = "http://199.7.140.197:8000"
# -------------------------------------------------------
# 本地 Web 控制面板
# -------------------------------------------------------
WEB_HOST: str = "127.0.0.1"
WEB_PORT: int = 8088
# -------------------------------------------------------
# 浏览器模式:chrome = 本机真实 Chrome/Edge(默认,免费)
# adspower = AdsPower 指纹浏览器
# -------------------------------------------------------
BROWSER_MODE: str = "chrome"
# chrome 模式:浏览器可执行文件路径(空=自动探测,优先 Chrome 其次 Edge)
BROWSER_PATH: str = ""
# chrome 模式:独立用户数据目录(空=默认 client/data/chrome_profile,持久化登录态)
BROWSER_PROFILE_DIR: str = ""
# chrome 模式:CDP 调试端口
BROWSER_DEBUG_PORT: int = 9222
# adspower 模式:本地 API 与 Profile ID
ADSPOWER_API_URL: str = "http://local.adspower.net:50325"
ADSPOWER_USER_ID: str = ""
# -------------------------------------------------------
# AI 打分(模型配置与密钥由云端服务端持有并代理调用,
# 客户端只保留本地投递过滤线)
# -------------------------------------------------------
AI_MIN_SCORE: int = 65
# -------------------------------------------------------
# Token 持久化路径
# -------------------------------------------------------
TOKEN_FILE: str = "client/.token"
# -------------------------------------------------------
# 心跳(秒):需小于服务端在线窗口(90s)
# -------------------------------------------------------
HEARTBEAT_INTERVAL: int = 30
class Config:
env_file = "client/.env"
env_file_encoding = "utf-8"
client_settings = ClientSettings()