feat: 测活覆盖全部代理(含死记录),拨活即复活
ListProxiesDue 去掉 alive=1 限制:死代理每小时也重测,协议级握手 成功就 MarkProxyAlive 复活(fail_count 清零),不再只能等同步时 重新出现在源列表才复活。 附带:提取页加「带协议前缀」开关,复制链接自动带 fmt=url。 Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
@@ -61,8 +61,10 @@ async function create() {
|
||||
}
|
||||
}
|
||||
|
||||
const withScheme = ref(false)
|
||||
|
||||
function extractUrl(k: proxyKeyView): string {
|
||||
return `${location.origin}/api/v1/proxy?key=${k.key}`
|
||||
return `${location.origin}/api/v1/proxy?key=${k.key}${withScheme.value ? '&fmt=url' : ''}`
|
||||
}
|
||||
|
||||
async function copyUrl(k: proxyKeyView) {
|
||||
@@ -100,6 +102,7 @@ function regionLabel(k: proxyKeyView): string {
|
||||
<div class="panel">
|
||||
<div class="panel-title">
|
||||
提取密钥 <span class="hint">{{ keys.length }} 个</span>
|
||||
<span class="fmt-toggle">带协议前缀 <n-switch v-model:value="withScheme" size="small" /></span>
|
||||
<n-button size="small" type="primary" style="margin-left:auto" @click="openCreate">
|
||||
<template #icon><n-icon><AddOutline /></n-icon></template>生成密钥
|
||||
</n-button>
|
||||
@@ -128,7 +131,7 @@ function regionLabel(k: proxyKeyView): string {
|
||||
|
||||
<div class="usage panel-inset">
|
||||
<b>使用方式</b>
|
||||
<div class="mono usage-line">GET /api/v1/proxy?key=<密钥></div>
|
||||
<div class="mono usage-line">GET /api/v1/proxy?key=<密钥>{{ withScheme ? '&fmt=url' : '' }}</div>
|
||||
<div class="dim">每次请求实时探活,返回一个可用的 <span class="mono">ip:port</span>(纯文本);加 <span class="mono">&fmt=url</span> 返回带协议的 <span class="mono">scheme://ip:port</span>(socks5h/http/socks4)。地区由密钥绑定,「全部地区」密钥随机返回任意国家。</div>
|
||||
</div>
|
||||
|
||||
@@ -175,6 +178,7 @@ function regionLabel(k: proxyKeyView): string {
|
||||
.key-stat { font-size: 12px; font-weight: 700; text-align: right; flex: none; min-width: 90px; }
|
||||
.mono { font-family: Consolas, monospace; }
|
||||
.dim { color: var(--cb-ink-3); font-weight: 500; }
|
||||
.fmt-toggle { display: inline-flex; align-items: center; gap: 6px; margin-left: 14px; font-size: 12px; font-weight: 700; color: var(--cb-ink-2); }
|
||||
.usage { margin-top: 16px; }
|
||||
.usage-line { margin: 8px 0 4px; font-size: 13px; }
|
||||
.panel-inset {
|
||||
|
||||
Reference in New Issue
Block a user