diff --git a/storage.js b/storage.js index 76f1983..e14fa7e 100644 --- a/storage.js +++ b/storage.js @@ -207,16 +207,3 @@ export async function checkJmsLine(line) { if (!res.ok) throw new Error(data.error || 'check failed'); return data; // { status: 'normal' | 'abnormal', checkedAt } } - -// 让服务器代为请求JMS的标准订阅地址,解析Subscription-Userinfo拿到流量信息 -// (浏览器直接fetch会被CORS挡住,服务器端没有这个限制) -export async function fetchJmsTraffic(subscriptionUrl) { - const res = await fetch('/api/jms/fetch-traffic', { - method: 'POST', - headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify({ subscriptionUrl }), - }); - const data = await res.json().catch(() => ({})); - if (!res.ok) throw new Error(data.error || 'fetch traffic failed'); - return data; // { ok, upload, download, total, expire } 或 { ok:false, error } -}