mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-10 00:09:01 +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"),
|
||||
};
|
||||
|
||||
if (proxy.tls) {
|
||||
proxy.sni = params["obfs-host"] || proxy.server;
|
||||
proxy.scert = !JSON.parse(params["tls-verification"] || "true");
|
||||
}
|
||||
// handle ws headers
|
||||
if (params.obfs === "ws" || params.obfs === "wss") {
|
||||
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;
|
||||
} else {
|
||||
// V2rayN URI format
|
||||
@ -965,6 +971,13 @@ function URI_VMess() {
|
||||
proxy["ws-headers"] = {
|
||||
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;
|
||||
}
|
||||
@ -1706,7 +1719,8 @@ function Surge_Producer() {
|
||||
}`;
|
||||
}
|
||||
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;
|
||||
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-text-field
|
||||
placeholder="添加新关键词"
|
||||
clearable
|
||||
clear-icon="clear"
|
||||
solo
|
||||
v-model="form.keyword"
|
||||
append-icon="mdi-send"
|
||||
|
@ -56,6 +56,8 @@
|
||||
</v-chip-group>
|
||||
<v-text-field
|
||||
placeholder="添加新关键词"
|
||||
clearable
|
||||
clear-icon="clear"
|
||||
solo
|
||||
v-model="form.keyword"
|
||||
append-icon="mdi-send"
|
||||
|
@ -46,6 +46,8 @@
|
||||
<v-row>
|
||||
<v-col>
|
||||
<v-text-field
|
||||
clearable
|
||||
clear-icon="clear"
|
||||
placeholder="关键词"
|
||||
solo
|
||||
v-model="form.keyword"
|
||||
@ -53,6 +55,8 @@
|
||||
</v-col>
|
||||
<v-col>
|
||||
<v-text-field
|
||||
clearable
|
||||
clear-icon="clear"
|
||||
placeholder="替换为"
|
||||
solo
|
||||
v-model="form.replace"
|
||||
|
@ -46,6 +46,8 @@
|
||||
</v-chip-group>
|
||||
<v-text-field
|
||||
placeholder="添加新关键词"
|
||||
clearable
|
||||
clear-icon="clear"
|
||||
solo
|
||||
v-model="form.keyword"
|
||||
append-icon="mdi-send"
|
||||
|
@ -48,6 +48,8 @@
|
||||
</v-chip-group>
|
||||
<v-text-field
|
||||
placeholder="添加新正则表达式"
|
||||
clearable
|
||||
clear-icon="clear"
|
||||
solo
|
||||
v-model="form.regex"
|
||||
append-icon="mdi-send"
|
||||
|
@ -60,6 +60,8 @@
|
||||
</v-chip-group>
|
||||
<v-text-field
|
||||
placeholder="添加新正则表达式"
|
||||
clearable
|
||||
clear-icon="clear"
|
||||
solo
|
||||
v-model="form.regex"
|
||||
append-icon="mdi-send"
|
||||
|
@ -47,6 +47,8 @@
|
||||
<v-col>
|
||||
<v-text-field
|
||||
placeholder="正则表达式"
|
||||
clearable
|
||||
clear-icon="clear"
|
||||
solo
|
||||
v-model="form.regex"
|
||||
/>
|
||||
@ -55,6 +57,8 @@
|
||||
<v-text-field
|
||||
placeholder="替换为"
|
||||
solo
|
||||
clearable
|
||||
clear-icon="clear"
|
||||
v-model="form.replace"
|
||||
append-icon="mdi-send"
|
||||
@click:append="add"
|
||||
|
@ -44,6 +44,8 @@
|
||||
</v-card-text>
|
||||
<v-textarea
|
||||
solo
|
||||
clearable
|
||||
clear-icon="clear"
|
||||
:label="hint"
|
||||
v-model="content"
|
||||
/>
|
||||
|
@ -43,6 +43,8 @@
|
||||
</v-radio-group>
|
||||
</v-card-text>
|
||||
<v-textarea
|
||||
clearable
|
||||
clear-icon="clear"
|
||||
solo
|
||||
:label="hint"
|
||||
v-model="content"
|
||||
|
Loading…
x
Reference in New Issue
Block a user