mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-11 01:18:59 +08:00
Fixed V2RayN SNI issue
This commit is contained in:
parent
0d3e6bf548
commit
d8129de848
@ -930,10 +930,6 @@ function URI_VMess() {
|
|||||||
tfo: JSON.parse(params["fast-open"] || "false"),
|
tfo: JSON.parse(params["fast-open"] || "false"),
|
||||||
};
|
};
|
||||||
|
|
||||||
if (proxy.tls) {
|
|
||||||
proxy.sni = params["obfs-host"] || proxy.server;
|
|
||||||
proxy.scert = !JSON.parse(params["tls-verification"] || "true");
|
|
||||||
}
|
|
||||||
// handle ws headers
|
// handle ws headers
|
||||||
if (params.obfs === "ws" || params.obfs === "wss") {
|
if (params.obfs === "ws" || params.obfs === "wss") {
|
||||||
proxy.network = "ws";
|
proxy.network = "ws";
|
||||||
@ -943,6 +939,16 @@ function URI_VMess() {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// handle scert
|
||||||
|
if (proxy.tls && params['"tls-verification"'] === 'false') {
|
||||||
|
proxy.scert = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// handle sni
|
||||||
|
if (proxy.tls && params["obfs-host"]) {
|
||||||
|
proxy.sni = params["obfs-host"];
|
||||||
|
}
|
||||||
|
|
||||||
return proxy;
|
return proxy;
|
||||||
} else {
|
} else {
|
||||||
// V2rayN URI format
|
// V2rayN URI format
|
||||||
@ -965,6 +971,13 @@ function URI_VMess() {
|
|||||||
proxy["ws-headers"] = {
|
proxy["ws-headers"] = {
|
||||||
Host: params.host || params.add,
|
Host: params.host || params.add,
|
||||||
};
|
};
|
||||||
|
if (proxy.tls && params.host) {
|
||||||
|
proxy.sni = params.host;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// handle scert
|
||||||
|
if (params.verify_cert === false) {
|
||||||
|
proxy.scert = true;
|
||||||
}
|
}
|
||||||
return proxy;
|
return proxy;
|
||||||
}
|
}
|
||||||
@ -1706,7 +1719,8 @@ function Surge_Producer() {
|
|||||||
}`;
|
}`;
|
||||||
}
|
}
|
||||||
if (proxy.tls) {
|
if (proxy.tls) {
|
||||||
config += `,skip-cert-verify=${proxy.scert},sni=${proxy.sni}`;
|
config += `${typeof proxy.scert !== 'undefined' ? ",skip-cert-verify=" + proxy.scert : ""}`
|
||||||
|
config += proxy.sni ? `,sni=${proxy.sni}` : "";
|
||||||
}
|
}
|
||||||
return config;
|
return config;
|
||||||
case "trojan":
|
case "trojan":
|
||||||
|
2
backend/sub-store.min.js
vendored
2
backend/sub-store.min.js
vendored
File diff suppressed because one or more lines are too long
@ -45,6 +45,8 @@
|
|||||||
</v-chip-group>
|
</v-chip-group>
|
||||||
<v-text-field
|
<v-text-field
|
||||||
placeholder="添加新关键词"
|
placeholder="添加新关键词"
|
||||||
|
clearable
|
||||||
|
clear-icon="clear"
|
||||||
solo
|
solo
|
||||||
v-model="form.keyword"
|
v-model="form.keyword"
|
||||||
append-icon="mdi-send"
|
append-icon="mdi-send"
|
||||||
|
@ -56,6 +56,8 @@
|
|||||||
</v-chip-group>
|
</v-chip-group>
|
||||||
<v-text-field
|
<v-text-field
|
||||||
placeholder="添加新关键词"
|
placeholder="添加新关键词"
|
||||||
|
clearable
|
||||||
|
clear-icon="clear"
|
||||||
solo
|
solo
|
||||||
v-model="form.keyword"
|
v-model="form.keyword"
|
||||||
append-icon="mdi-send"
|
append-icon="mdi-send"
|
||||||
|
@ -46,6 +46,8 @@
|
|||||||
<v-row>
|
<v-row>
|
||||||
<v-col>
|
<v-col>
|
||||||
<v-text-field
|
<v-text-field
|
||||||
|
clearable
|
||||||
|
clear-icon="clear"
|
||||||
placeholder="关键词"
|
placeholder="关键词"
|
||||||
solo
|
solo
|
||||||
v-model="form.keyword"
|
v-model="form.keyword"
|
||||||
@ -53,6 +55,8 @@
|
|||||||
</v-col>
|
</v-col>
|
||||||
<v-col>
|
<v-col>
|
||||||
<v-text-field
|
<v-text-field
|
||||||
|
clearable
|
||||||
|
clear-icon="clear"
|
||||||
placeholder="替换为"
|
placeholder="替换为"
|
||||||
solo
|
solo
|
||||||
v-model="form.replace"
|
v-model="form.replace"
|
||||||
|
@ -46,6 +46,8 @@
|
|||||||
</v-chip-group>
|
</v-chip-group>
|
||||||
<v-text-field
|
<v-text-field
|
||||||
placeholder="添加新关键词"
|
placeholder="添加新关键词"
|
||||||
|
clearable
|
||||||
|
clear-icon="clear"
|
||||||
solo
|
solo
|
||||||
v-model="form.keyword"
|
v-model="form.keyword"
|
||||||
append-icon="mdi-send"
|
append-icon="mdi-send"
|
||||||
|
@ -48,6 +48,8 @@
|
|||||||
</v-chip-group>
|
</v-chip-group>
|
||||||
<v-text-field
|
<v-text-field
|
||||||
placeholder="添加新正则表达式"
|
placeholder="添加新正则表达式"
|
||||||
|
clearable
|
||||||
|
clear-icon="clear"
|
||||||
solo
|
solo
|
||||||
v-model="form.regex"
|
v-model="form.regex"
|
||||||
append-icon="mdi-send"
|
append-icon="mdi-send"
|
||||||
|
@ -60,6 +60,8 @@
|
|||||||
</v-chip-group>
|
</v-chip-group>
|
||||||
<v-text-field
|
<v-text-field
|
||||||
placeholder="添加新正则表达式"
|
placeholder="添加新正则表达式"
|
||||||
|
clearable
|
||||||
|
clear-icon="clear"
|
||||||
solo
|
solo
|
||||||
v-model="form.regex"
|
v-model="form.regex"
|
||||||
append-icon="mdi-send"
|
append-icon="mdi-send"
|
||||||
|
@ -47,6 +47,8 @@
|
|||||||
<v-col>
|
<v-col>
|
||||||
<v-text-field
|
<v-text-field
|
||||||
placeholder="正则表达式"
|
placeholder="正则表达式"
|
||||||
|
clearable
|
||||||
|
clear-icon="clear"
|
||||||
solo
|
solo
|
||||||
v-model="form.regex"
|
v-model="form.regex"
|
||||||
/>
|
/>
|
||||||
@ -55,6 +57,8 @@
|
|||||||
<v-text-field
|
<v-text-field
|
||||||
placeholder="替换为"
|
placeholder="替换为"
|
||||||
solo
|
solo
|
||||||
|
clearable
|
||||||
|
clear-icon="clear"
|
||||||
v-model="form.replace"
|
v-model="form.replace"
|
||||||
append-icon="mdi-send"
|
append-icon="mdi-send"
|
||||||
@click:append="add"
|
@click:append="add"
|
||||||
|
@ -44,6 +44,8 @@
|
|||||||
</v-card-text>
|
</v-card-text>
|
||||||
<v-textarea
|
<v-textarea
|
||||||
solo
|
solo
|
||||||
|
clearable
|
||||||
|
clear-icon="clear"
|
||||||
:label="hint"
|
:label="hint"
|
||||||
v-model="content"
|
v-model="content"
|
||||||
/>
|
/>
|
||||||
|
@ -43,6 +43,8 @@
|
|||||||
</v-radio-group>
|
</v-radio-group>
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
<v-textarea
|
<v-textarea
|
||||||
|
clearable
|
||||||
|
clear-icon="clear"
|
||||||
solo
|
solo
|
||||||
:label="hint"
|
:label="hint"
|
||||||
v-model="content"
|
v-model="content"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user