mirror of
https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-10 00:52:40 +00:00
Fixed QX tls issue
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import download from '../../utils/download';
|
||||
import download from '@/utils/download';
|
||||
|
||||
import PROXY_PROCESSORS, { ApplyProcessor } from './processors';
|
||||
import PROXY_PREPROCESSORS from './preprocessors';
|
||||
import PROXY_PRODUCERS from './producers';
|
||||
import PROXY_PARSERS from './parsers';
|
||||
import $ from '../app';
|
||||
import $ from '@/core/app';
|
||||
|
||||
function preprocess(raw) {
|
||||
for (const processor of PROXY_PREPROCESSORS) {
|
||||
|
||||
@@ -142,6 +142,9 @@ function trojan(proxy) {
|
||||
}
|
||||
|
||||
// tls
|
||||
if (needTls(proxy)) {
|
||||
proxy.tls = true;
|
||||
}
|
||||
appendIfPresent(`,over-tls=${proxy.tls}`, 'tls');
|
||||
|
||||
// tls fingerprint
|
||||
@@ -249,6 +252,9 @@ function http(proxy) {
|
||||
appendIfPresent(`,password=${proxy.password}`, 'password');
|
||||
|
||||
// tls
|
||||
if (needTls(proxy)) {
|
||||
proxy.tls = true;
|
||||
}
|
||||
appendIfPresent(`,over-tls=${proxy.tls}`, 'tls');
|
||||
|
||||
// tls fingerprint
|
||||
@@ -286,6 +292,9 @@ function socks5(proxy) {
|
||||
appendIfPresent(`,password=${proxy.password}`, 'password');
|
||||
|
||||
// tls
|
||||
if (needTls(proxy)) {
|
||||
proxy.tls = true;
|
||||
}
|
||||
appendIfPresent(`,over-tls=${proxy.tls}`, 'tls');
|
||||
|
||||
// tls fingerprint
|
||||
@@ -312,3 +321,12 @@ function socks5(proxy) {
|
||||
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
function needTls(proxy) {
|
||||
return (
|
||||
proxy.tls ||
|
||||
proxy.sni ||
|
||||
typeof proxy['skip-cert-verify'] !== 'undefined' ||
|
||||
typeof proxy['tls-host'] !== 'undefined'
|
||||
);
|
||||
}
|
||||
|
||||
@@ -107,12 +107,6 @@ function vmess(proxy) {
|
||||
result.append(`${proxy.name}=${proxy.type},${proxy.server},${proxy.port}`);
|
||||
result.appendIfPresent(`,username=${proxy.uuid}`, 'uuid');
|
||||
|
||||
// if (proxy.cipher === 'auto') {
|
||||
// result.append(`,encrypt-method=none`);
|
||||
// } else {
|
||||
// result.append(`,encrypt-method=${proxy.cipher}`);
|
||||
// }
|
||||
|
||||
if (isPresent(proxy, 'network')) {
|
||||
if (proxy.network === 'ws') {
|
||||
result.append(`,ws=true`);
|
||||
|
||||
Reference in New Issue
Block a user