mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 01:10:23 +08:00
移除 HMAC 认证、TLS 自签名证书、HTTP CONNECT 代理和代发(delegate)模式, 改为 aether-proxy 主动通过 WebSocket 连接 Aether 服务端建立隧道。 Aether 服务端新增: - WebSocket 隧道端点 (proxy_tunnel.py) - TunnelManager 管理隧道连接和请求分发 - TunnelTransport 作为 httpx 自定义 transport 层 - 基于二进制帧的隧道协议 (tunnel_protocol.py) aether-proxy (Rust) 重构: - 新增 tunnel 模块 (client/dispatcher/stream_handler/protocol) - 支持多 Aether 服务端连接 ([[servers]] 配置) - 移除 proxy/auth/delegate 模块和 hyper 依赖 - 改用 tokio-tungstenite 实现 WebSocket 客户端 同时: - 添加浏览器指纹 Headers 绕过 Cloudflare 防护 - 删除节点时自动清理 Provider/Endpoint 的代理引用 - 数据库迁移: 新增 tunnel_mode/tunnel_connected/tunnel_connected_at 字段
62 lines
2.0 KiB
Plaintext
62 lines
2.0 KiB
Plaintext
# ==================== 必须配置(启动前) ====================
|
||
# 以下配置项必须在项目启动前设置
|
||
|
||
# 数据库配置
|
||
DB_HOST=localhost
|
||
DB_PORT=5432
|
||
DB_USER=postgres
|
||
DB_NAME=aether
|
||
DB_PASSWORD=your_secure_password_here
|
||
|
||
# Redis 配置
|
||
REDIS_HOST=localhost
|
||
REDIS_PORT=6379
|
||
REDIS_PASSWORD=your_redis_password_here
|
||
|
||
# JWT密钥(使用 python generate_keys.py 生成)
|
||
# 用于用户登录 token 签名,更换后所有用户需重新登录
|
||
JWT_SECRET_KEY=change-this-to-a-secure-random-string
|
||
|
||
# 独立加密密钥(用于加密 Provider API Key 等敏感数据)
|
||
# 注意:更换此密钥后需要在管理面板重新配置所有 Provider API Key
|
||
ENCRYPTION_KEY=change-this-to-another-secure-random-string
|
||
|
||
# 管理员账号(仅首次初始化时使用, 创建完成后可在系统内修改密码)
|
||
ADMIN_EMAIL=admin@example.com
|
||
ADMIN_USERNAME=admin
|
||
ADMIN_PASSWORD=admin123456
|
||
|
||
# ==================== 可选配置(有默认值) ====================
|
||
# 以下配置项有合理的默认值,可按需调整
|
||
|
||
# 应用端口(默认 8084)
|
||
# APP_PORT=8084
|
||
|
||
# Gunicorn Worker 数量(默认 4)
|
||
# 建议最小设置为 2
|
||
# GUNICORN_WORKERS=4
|
||
|
||
# Gunicorn Max Requests(默认 4000)
|
||
# Worker 处理指定数量请求后自动重启,防止内存泄漏
|
||
# max-requests-jitter 会自动设置为 MAX_REQUESTS/20 (5%)
|
||
# MAX_REQUESTS=4000
|
||
|
||
# API Key 前缀(默认 sk)
|
||
# API_KEY_PREFIX=sk
|
||
|
||
# 日志级别(默认 INFO,可选:DEBUG, INFO, WARNING, ERROR)
|
||
# LOG_LEVEL=INFO
|
||
|
||
# CORS 配置(允许跨域的源,多个源用逗号分隔)
|
||
# 示例: http://localhost:3000,https://example.com
|
||
# 默认: * (允许所有源)
|
||
# CORS_ORIGINS=*
|
||
|
||
# ==================== 计费系统(可选) ====================
|
||
# Video/Image/Audio 缺失 billing_rule 时是否拒绝请求(默认 false:允许请求但 cost=0 并告警)
|
||
# BILLING_REQUIRE_RULE=false
|
||
#
|
||
# required 维度缺失时是否拒绝请求/标记任务失败(默认 false:cost=0 + 标记 incomplete)
|
||
# BILLING_STRICT_MODE=false
|
||
#
|