mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-01 17:00:21 +08:00
feat(aether-proxy): 网络层全面优化与代理耗时追踪
aether-proxy: - 新增 20+ 可配置参数:Aether API/delegate/CONNECT 各阶段超时、连接池、TCP keepalive/nodelay - AetherClient 支持指数退避重试(可配置次数/延迟)和 HTTP/2 - 新增 DNS 缓存(TTL + 容量限制)避免重复解析 - 新增并发连接数限制(Semaphore,默认基于硬件估算) - CONNECT 隧道增加建连超时和升级超时 - TLS 增加握手超时、会话缓存(session ticket + memory cache)、ALPN 协商 - 新增 ProxyMetrics 收集请求计数和延迟,通过心跳上报 - delegate 响应注入 X-Proxy-Timing 头(dns_ms/upstream_ms/total_ms) 后端: - StreamContext 和 handler 提取 X-Proxy-Timing 写入 proxy_info 追踪数据 前端: - 请求时间线展示代理分阶段耗时(DNS/上游) - Endpoint 添加按钮改为文字按钮样式
This commit is contained in:
@@ -642,14 +642,13 @@
|
||||
</SelectContent>
|
||||
</Select>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="icon"
|
||||
class="h-7 w-7 text-primary hover:text-primary"
|
||||
title="添加"
|
||||
variant="outline"
|
||||
size="sm"
|
||||
class="h-7 px-3"
|
||||
:disabled="!newEndpoint.api_format || (!newEndpoint.base_url?.trim() && !provider?.website?.trim()) || addingEndpoint"
|
||||
@click="handleAddEndpoint"
|
||||
>
|
||||
<Plus class="w-3.5 h-3.5" />
|
||||
添加
|
||||
</Button>
|
||||
</div>
|
||||
<!-- 卡片内容:URL 配置 -->
|
||||
|
||||
@@ -213,6 +213,10 @@
|
||||
v-if="currentAttempt.extra_data.proxy.ttfb_ms != null"
|
||||
class="text-xs text-muted-foreground ml-1"
|
||||
>{{ formatLatency(currentAttempt.extra_data.proxy.ttfb_ms) }}</span>
|
||||
<span
|
||||
v-if="currentAttempt.extra_data.proxy.timing"
|
||||
class="text-xs text-muted-foreground ml-1"
|
||||
>(DNS {{ formatLatency(currentAttempt.extra_data.proxy.timing.dns_ms) }} / 上游 {{ formatLatency(currentAttempt.extra_data.proxy.timing.upstream_ms) }})</span>
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user