Compare commits

...

5 Commits

Author SHA1 Message Date
xream
fc9ff48b1f fix: ss none 必须配置 password 2025-01-15 23:11:34 +08:00
xream
fb21890b68 fix: 修复组合订阅空 subscription-userinfo 的问题
Some checks failed
build / build (push) Has been cancelled
2025-01-14 11:34:02 +08:00
xream
2155cc9639 fix: 修复组合订阅中的单条订阅透传 User-Agent 2025-01-14 08:25:53 +08:00
xream
03e320cbd0 feat: 组合订阅中的单条订阅也支持透传 User-Agent
Some checks are pending
build / build (push) Waiting to run
2025-01-13 20:09:00 +08:00
xream
e325b9a39a feat: Loon 排除 XTLS; 切换使用 esbuild 打包 2025-01-13 16:03:52 +08:00
6 changed files with 37 additions and 20 deletions

View File

@@ -27,18 +27,18 @@ jobs:
run: |
npm install -g pnpm
cd backend && pnpm i --no-frozen-lockfile
- name: Test
run: |
cd backend
pnpm test
- name: Build
run: |
cd backend
pnpm run build
# - name: Test
# run: |
# cd backend
# pnpm test
# - name: Build
# run: |
# cd backend
# pnpm run build
- name: Bundle
run: |
cd backend
pnpm run bundle
pnpm bundle:esbuild
- id: tag
name: Generate release tag
run: |

View File

@@ -1,6 +1,6 @@
{
"name": "sub-store",
"version": "2.16.11",
"version": "2.16.16",
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and ShadowRocket.",
"main": "src/main.js",
"scripts": {
@@ -12,6 +12,7 @@
"dev:run": "nodemon -w sub-store.min.js sub-store.min.js",
"build": "gulp",
"bundle": "node bundle.js",
"bundle:esbuild": "node bundle-esbuild.js",
"changelog": "conventional-changelog -p cli -i CHANGELOG.md -s"
},
"author": "Peng-YM",

View File

@@ -343,6 +343,14 @@ function lastParse(proxy) {
if (typeof proxy.password === 'number') {
proxy.password = numberToString(proxy.password);
}
if (
['ss'].includes(proxy.type) &&
proxy.cipher === 'none' &&
!proxy.password
) {
// https://github.com/MetaCubeX/mihomo/issues/1677
proxy.password = '';
}
if (proxy.interface) {
proxy['interface-name'] = proxy.interface;
delete proxy.interface;

View File

@@ -350,8 +350,8 @@ function vmess(proxy) {
}
function vless(proxy) {
if (proxy['reality-opts']) {
throw new Error(`VLESS REALITY is unsupported`);
if (typeof proxy.flow !== 'undefined' || proxy['reality-opts']) {
throw new Error(`VLESS XTLS/REALITY is not supported`);
}
const result = new Result(proxy);
result.append(

View File

@@ -441,6 +441,7 @@ async function downloadCollection(req, res) {
$options,
proxy,
noCache,
ua: reqUA,
});
let subUserInfoOfSub;
// forward flow header from the first subscription in this collection
@@ -546,13 +547,12 @@ async function downloadCollection(req, res) {
} else {
subUserInfoOfCol = collection.subUserinfo;
}
res.set(
'subscription-userinfo',
[subUserInfoOfCol, subUserInfoOfSub]
.filter((i) => i)
.join('; '),
);
const subUserInfo = [subUserInfoOfCol, subUserInfoOfSub]
.filter((i) => i)
.join('; ');
if (subUserInfo) {
res.set('subscription-userinfo', subUserInfo);
}
if (platform === 'JSON') {
if (resultFormat === 'nezha') {
output = nezhaTransform(output);

View File

@@ -216,6 +216,14 @@ async function produceArtifact({
await Promise.all(
subnames.map(async (name) => {
const sub = findByName(allSubs, name);
const passThroughUA = sub.passThroughUA;
let reqUA = sub.ua;
if (passThroughUA) {
$.info(
`订阅开启了透传 User-Agent, 使用请求的 User-Agent: ${ua}`,
);
reqUA = ua;
}
try {
$.info(`正在处理子订阅:${sub.name}...`);
let raw;
@@ -237,7 +245,7 @@ async function produceArtifact({
try {
return await download(
url,
sub.ua,
reqUA,
undefined,
proxy ||
sub.proxy ||