fix: unify backend port to 18080 and make validator targets configurable
- Set default API port to 18080 in config.py - Add configurable validation_targets to SettingsSchema and DEFAULT_SETTINGS - Update ValidatorService to support runtime test URL updates - Hot-reload validation_targets from DB on startup and on settings save - Add domestic fallback URLs (baidu.com, qq.com) to reduce foreign dependency risk - Update Settings.vue to allow adding/removing validator target URLs in UI
This commit is contained in:
@@ -16,7 +16,7 @@ class Settings(BaseSettings):
|
||||
|
||||
# API 服务配置
|
||||
host: str = "127.0.0.1"
|
||||
port: int = 9949
|
||||
port: int = 18080
|
||||
|
||||
# 验证器配置
|
||||
validator_timeout: int = 5
|
||||
@@ -40,6 +40,16 @@ class Settings(BaseSettings):
|
||||
score_min: int = 0
|
||||
score_max: int = 100
|
||||
|
||||
# 验证目标配置
|
||||
validator_test_urls: List[str] = [
|
||||
"http://httpbin.org/ip",
|
||||
"https://httpbin.org/ip",
|
||||
"http://api.ipify.org",
|
||||
"https://api.ipify.org",
|
||||
"http://www.baidu.com",
|
||||
"http://www.qq.com",
|
||||
]
|
||||
|
||||
# 插件配置
|
||||
plugins_dir: str = "plugins"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user