Skip to content

Commit 8452407

Browse files
committed
feat: Loon Shadowsocks 2022 不支持 obfs
1 parent 2270a9e commit 8452407

3 files changed

Lines changed: 9 additions & 14 deletions

File tree

backend/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sub-store",
3-
"version": "2.20.27",
3+
"version": "2.20.28",
44
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.",
55
"main": "src/main.js",
66
"scripts": {
@@ -53,7 +53,6 @@
5353
"@babel/preset-env": "^7.18.0",
5454
"@babel/register": "^7.17.7",
5555
"@types/gulp": "^4.0.9",
56-
"axios": "^0.21.2",
5756
"babel-plugin-relative-path-import": "^2.0.1",
5857
"babelify": "^10.0.0",
5958
"browser-pack-flat": "^3.4.2",

backend/pnpm-lock.yaml

Lines changed: 0 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

backend/src/core/proxy-utils/producers/loon.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,14 @@ function shadowsocks(proxy) {
7777
// obfs
7878
if (isPresent(proxy, 'plugin')) {
7979
if (proxy.plugin === 'obfs') {
80+
if (
81+
proxy['plugin-opts']?.mode &&
82+
proxy.cipher.startsWith('2022-')
83+
) {
84+
throw new Error(
85+
`${proxy.cipher} ${proxy.plugin} is not supported`,
86+
);
87+
}
8088
result.append(`,obfs-name=${proxy['plugin-opts'].mode}`);
8189
result.appendIfPresent(
8290
`,obfs-host=${proxy['plugin-opts'].host}`,

0 commit comments

Comments
 (0)