mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-14 02:55:54 +08:00
feat: 解析并删除旧的 ws-path ws-headers 字段
This commit is contained in:
parent
2f2dbbdb68
commit
3fc507b576
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "sub-store",
|
"name": "sub-store",
|
||||||
"version": "2.14.182",
|
"version": "2.14.183",
|
||||||
"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": {
|
||||||
|
@ -224,6 +224,19 @@ function lastParse(proxy) {
|
|||||||
.replace(/^\[/, '')
|
.replace(/^\[/, '')
|
||||||
.replace(/\]$/, '');
|
.replace(/\]$/, '');
|
||||||
}
|
}
|
||||||
|
if (proxy.network === 'ws') {
|
||||||
|
if (!proxy['ws-opts'] && (proxy['ws-path'] || proxy['ws-headers'])) {
|
||||||
|
proxy['ws-opts'] = {};
|
||||||
|
if (proxy['ws-path']) {
|
||||||
|
proxy['ws-opts'].path = proxy['ws-path'];
|
||||||
|
}
|
||||||
|
if (proxy['ws-headers']) {
|
||||||
|
proxy['ws-opts'].headers = proxy['ws-headers'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
delete proxy['ws-path'];
|
||||||
|
delete proxy['ws-headers'];
|
||||||
|
}
|
||||||
if (proxy.type === 'trojan') {
|
if (proxy.type === 'trojan') {
|
||||||
if (proxy.network === 'tcp') {
|
if (proxy.network === 'tcp') {
|
||||||
delete proxy.network;
|
delete proxy.network;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user