[优化] 移除 OpenRestyResolvers 配置,统一上游渲染为带 keepalive 的 named upstream

This commit is contained in:
ryan
2026-03-18 23:24:37 +08:00
parent 782304012c
commit 007b1d8929
10 changed files with 98 additions and 221 deletions
@@ -55,7 +55,6 @@ const defaultPerformanceFields = {
OpenRestyGzipEnabled: true,
OpenRestyGzipMinLength: '1024',
OpenRestyGzipCompLevel: '5',
OpenRestyResolvers: '',
OpenRestyCacheEnabled: false,
OpenRestyCachePath: '',
OpenRestyCacheLevels: '1:2',
@@ -104,8 +103,6 @@ const performanceFieldTooltips: Record<string, string> = {
gzip_min_length:
'只有响应体超过该字节数时才会启用 gzip,避免对极小响应做无意义压缩。',
gzip_comp_level: 'gzip 压缩等级,1 更省 CPU,9 压缩更高但更耗 CPU。',
resolvers:
'可选填写运行时 DNS 解析器 IP,支持逗号、空格或换行分隔;留空时不额外生成 resolver 指令。',
proxy_cache_path: '缓存目录路径,对应 proxy_cache_path 指令中的磁盘位置。',
levels: '缓存目录层级,例如 1:2,可控制缓存文件的目录分布。',
inactive: '缓存对象在未命中访问时的失活时间,例如 30m。',
@@ -244,7 +241,6 @@ export function PerformancePage() {
OpenRestyGzipEnabled: toBoolean(optionMap.OpenRestyGzipEnabled, true),
OpenRestyGzipMinLength: optionMap.OpenRestyGzipMinLength ?? '1024',
OpenRestyGzipCompLevel: optionMap.OpenRestyGzipCompLevel ?? '5',
OpenRestyResolvers: optionMap.OpenRestyResolvers ?? '',
OpenRestyCacheEnabled: toBoolean(optionMap.OpenRestyCacheEnabled, false),
OpenRestyCachePath: optionMap.OpenRestyCachePath ?? '',
OpenRestyCacheLevels: optionMap.OpenRestyCacheLevels ?? '1:2',
@@ -424,7 +420,6 @@ export function PerformancePage() {
'OpenRestyProxyReadTimeout',
performanceFields.OpenRestyProxyReadTimeout.trim(),
],
['OpenRestyResolvers', performanceFields.OpenRestyResolvers.trim()],
[
'OpenRestyWebsocketEnabled',
String(performanceFields.OpenRestyWebsocketEnabled),
@@ -943,23 +938,6 @@ export function PerformancePage() {
}
/>
</ResourceField>
<ResourceField
label="resolver"
tooltip={performanceFieldTooltips.resolvers}
hint="留空时走 OpenResty 默认行为;填写时请使用 DNS 服务器 IP。"
>
<ResourceTextarea
value={performanceFields.OpenRestyResolvers}
onChange={(event) =>
setPerformanceFields((previous) => ({
...previous,
OpenRestyResolvers: event.target.value,
}))
}
placeholder="例如:10.0.0.2, 1.1.1.1"
rows={3}
/>
</ResourceField>
<ToggleField
label="websocket"
tooltip={performanceFieldTooltips.websocket}