feat: clash/ss suport

This commit is contained in:
2026-04-13 22:19:30 +08:00
parent 699b038a6c
commit 35e95ee777
11 changed files with 665 additions and 129 deletions

View File

@@ -50,9 +50,9 @@ export const auth = {
// Subscriptions
export const subscriptions = {
list: () => request<any[]>('/subscriptions'),
create: (name: string, url: string) => request<{ id: number }>('/subscriptions', {
create: (name: string, url: string, urlClash?: string, urlSsr?: string) => request<{ id: number }>('/subscriptions', {
method: 'POST',
body: JSON.stringify({ name, url }),
body: JSON.stringify({ name, url, url_clash: urlClash || null, url_ssr: urlSsr || null }),
}),
update: (id: number, data: any) => request<{ ok: boolean }>(`/subscriptions/${id}`, {
method: 'PUT',