feat: 新增自定义配置合并到 Surge 输出
管理面板新增「自定义」面板,可按 Surge 格式书写 [Proxy]/[Rule]/ [General] 等配置片段,生成时合并进最终输出:[Proxy] 行追加到节点 之后,[Rule] 行注入到规则最顶部(优先级最高),其他段注入对应段 顶部且同名 key 覆盖模板取值(如 doh-server)。仅管理员链接生效, 游客链接不包含自定义内容。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -124,6 +124,11 @@ export const config = {
|
||||
preview: () => request<{ config: string }>('/config/preview'),
|
||||
getSurgeToken: () => request<{ token: string }>('/config/surge-token'),
|
||||
regenerateSurgeToken: () => request<{ token: string }>('/config/surge-token', { method: 'POST' }),
|
||||
getCustom: () => request<{ content: string }>('/config/custom'),
|
||||
saveCustom: (content: string) => request<{ ok: boolean }>('/config/custom', {
|
||||
method: 'PUT',
|
||||
body: JSON.stringify({ content }),
|
||||
}),
|
||||
};
|
||||
|
||||
// Guest links
|
||||
|
||||
Reference in New Issue
Block a user