mirror of
https://github.com/cnlimiter/codex-register.git
synced 2026-05-28 03:30:32 +08:00
feat(proxy): 优化代理配置管理功能
- 更新 proxy_url 属性为 get_proxy_url 方法,支持多级代理优先级 - 实现代理获取三路优先级:动态代理 > 代理池 > 静态代理 - 添加取消默认代理功能和 unset_proxy_default 接口 - 实现批量导入代理功能,支持多种格式解析 - 在前端界面添加批量导入代理按钮和模态框 - 重构代理设置页面的默认代理切换交互 - 更新支付流程中的代理获取方式 - 添加 UUID 依赖并优化支付请求头配置
This commit is contained in:
@@ -96,6 +96,7 @@
|
||||
<div style="display: flex; gap: var(--spacing-sm);">
|
||||
<button class="btn btn-secondary btn-sm" id="test-all-proxies-btn">🔌 测试全部</button>
|
||||
<button class="btn btn-danger btn-sm" id="delete-disabled-proxies-btn" disabled>🧹 删除禁用项</button>
|
||||
<button class="btn btn-secondary btn-sm" id="batch-import-proxy-btn">📋 批量导入</button>
|
||||
<button class="btn btn-primary btn-sm" id="add-proxy-btn">➕ 添加代理</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -152,6 +153,28 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 批量导入代理模态框 -->
|
||||
<div class="modal" id="batch-import-proxy-modal">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3>批量导入代理</h3>
|
||||
<button class="modal-close" id="close-batch-import-proxy-modal">×</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p class="text-muted" style="margin-bottom: var(--spacing-sm); font-size: 0.875rem;">每行一条,支持格式:<code>host:port</code>、<code>type://host:port</code>、<code>type://user:pass@host:port</code>、<code>名称|type://user:pass@host:port</code></p>
|
||||
<textarea id="batch-import-proxy-data" rows="10" style="width:100%;font-family:monospace;font-size:0.85rem;" placeholder="127.0.0.1:7890
|
||||
socks5://127.0.0.1:1080
|
||||
http://user:pass@host:port
|
||||
MyProxy|socks5://user:pass@host:port"></textarea>
|
||||
<div id="batch-import-proxy-result" style="margin-top: var(--spacing-sm); font-size: 0.875rem;"></div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-ghost" id="cancel-batch-import-proxy-btn">取消</button>
|
||||
<button class="btn btn-primary" id="confirm-batch-import-proxy-btn">导入</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 添加代理模态框 -->
|
||||
<div class="modal" id="add-proxy-modal">
|
||||
<div class="modal-content">
|
||||
|
||||
Reference in New Issue
Block a user