fix: 修复多行订阅流量(仅传递首个订阅的流量信息)

This commit is contained in:
xream 2023-12-01 17:09:56 +08:00
parent 53dd1fd4c5
commit bf9210fc5a
No known key found for this signature in database
GPG Key ID: 1D2C5225471789F9
2 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "sub-store", "name": "sub-store",
"version": "2.14.107", "version": "2.14.108",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.", "description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
"main": "src/main.js", "main": "src/main.js",
"scripts": { "scripts": {

View File

@ -3,7 +3,10 @@ import { HTTP } from '@/vendor/open-api';
export async function getFlowHeaders(url) { export async function getFlowHeaders(url) {
const http = HTTP(); const http = HTTP();
const { headers } = await http.get({ const { headers } = await http.get({
url, url: url
.split(/[\r\n]+/)
.map((i) => i.trim())
.filter((i) => i.length)[0],
headers: { headers: {
'User-Agent': 'Quantumult%20X/1.0.30 (iPhone14,2; iOS 15.6)', 'User-Agent': 'Quantumult%20X/1.0.30 (iPhone14,2; iOS 15.6)',
}, },