()
| 279 | * 仅在手动模式且 URL 有效时返回代理 URL,否则返回 undefined |
| 280 | */ |
| 281 | export function getActiveProxyUrl(): string | undefined { |
| 282 | const config = loadProxyConfig() |
| 283 | if (config.mode === 'manual' && config.url) { |
| 284 | const validation = validateProxyUrl(config.url) |
| 285 | if (validation.valid) { |
| 286 | return config.url |
| 287 | } |
| 288 | } |
| 289 | return undefined |
| 290 | } |
| 291 | |
| 292 | export async function resolveModelDownloadProxyUrl(): Promise<string | undefined> { |
| 293 | const config = loadProxyConfig() |
no test coverage detected