fix: v2ray-plugin

This commit is contained in:
xream 2024-01-30 03:24:42 +08:00
parent d0f255d9c6
commit 1248e6b32a
No known key found for this signature in database
GPG Key ID: 1D2C5225471789F9
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "sub-store", "name": "sub-store",
"version": "2.14.193", "version": "2.14.194",
"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

@ -45,7 +45,7 @@ function URI_SS() {
const parsed = query.match(/(&|\?)v2ray-plugin=(.*?)(&|$)/); const parsed = query.match(/(&|\?)v2ray-plugin=(.*?)(&|$)/);
let v2rayPlugin = parsed[2]; let v2rayPlugin = parsed[2];
if (v2rayPlugin) { if (v2rayPlugin) {
proxy.obfs = 'v2ray-plugin'; proxy.plugin = 'v2ray-plugin';
proxy['plugin-opts'] = JSON.parse( proxy['plugin-opts'] = JSON.parse(
Base64.decode(v2rayPlugin), Base64.decode(v2rayPlugin),
); );
@ -89,7 +89,7 @@ function URI_SS() {
}; };
break; break;
case 'v2ray-plugin': case 'v2ray-plugin':
proxy.obfs = 'v2ray-plugin'; proxy.plugin = 'v2ray-plugin';
proxy['plugin-opts'] = { proxy['plugin-opts'] = {
mode: 'websocket', mode: 'websocket',
host: getIfNotBlank(params['obfs-host']), host: getIfNotBlank(params['obfs-host']),