mirror of
https://github.com/TheSmallHanCat/flow2api.git
synced 2026-05-23 04:39:35 +08:00
- Add helper function to detect headless/Docker environments in main.py - Implement auto-downgrade from personal to browser captcha mode in headless environments - Show warning messages when switching modes automatically - Update FlowClient to accept database instance for captcha configuration config: update default server port and enable proxy by default - Change default server port from 8000 to 18282 in config/setting.toml - Enable proxy by default with localhost:7897 URL - Update Docker and docker-compose configurations to use port 38000 for API build: add China mirror sources for faster dependency installation - Configure Debian apt to use Tsinghua University mirrors - Set PyPI to use Tsinghua University index with trusted host - Configure Playwright to download from npmmirror for faster installation chore: update gitignore to exclude data and config files - Add data directory to .gitignore - Exclude config/setting.toml and config/setting_warp.toml from version control docs: update docker-compose configurations for new port mappings - Change exposed port from 8000 to 38000 in docker-compose.yml - Update proxy service port from 1080 to 31080 in docker-compose.proxy.yml - Ensure proper volume mapping for Cloudflare WARP data persistence
43 lines
864 B
TOML
43 lines
864 B
TOML
[global]
|
|
api_key = "han1234"
|
|
admin_username = "admin"
|
|
admin_password = "admin"
|
|
|
|
[flow]
|
|
labs_base_url = "https://labs.google/fx/api"
|
|
api_base_url = "https://aisandbox-pa.googleapis.com/v1"
|
|
timeout = 120
|
|
poll_interval = 3.0
|
|
max_poll_attempts = 200
|
|
|
|
[server]
|
|
host = "0.0.0.0"
|
|
port = 18282
|
|
|
|
[debug]
|
|
enabled = false
|
|
log_requests = true
|
|
log_responses = true
|
|
mask_token = true
|
|
|
|
[proxy]
|
|
proxy_enabled = true
|
|
proxy_url = "http://localhost:7897"
|
|
|
|
[generation]
|
|
image_timeout = 300
|
|
video_timeout = 1500
|
|
|
|
[admin]
|
|
error_ban_threshold = 3
|
|
|
|
[cache]
|
|
enabled = false
|
|
timeout = 7200 # 缓存超时时间(秒), 默认2小时
|
|
base_url = "" # 缓存文件访问的基础URL, 留空则使用服务器地址
|
|
|
|
[captcha]
|
|
captcha_method = "browser" # 打码方式: yescaptcha 或 browser
|
|
yescaptcha_api_key = "" # YesCaptcha API密钥
|
|
yescaptcha_base_url = "https://api.yescaptcha.com"
|