mirror of
https://git.mirrors.martin98.com/https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-12 20:49:01 +08:00
Fixed QX tls issue
This commit is contained in:
parent
340e3746fe
commit
83504d42c4
4
backend/dist/sub-store-parser.loon.min.js
vendored
4
backend/dist/sub-store-parser.loon.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,4 +1,4 @@
|
|||||||
import { OpenAPI } from '../vendor/open-api';
|
import { OpenAPI } from '@/vendor/open-api';
|
||||||
|
|
||||||
const $ = new OpenAPI('sub-store');
|
const $ = new OpenAPI('sub-store');
|
||||||
export default $;
|
export default $;
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
import download from '../../utils/download';
|
import download from '@/utils/download';
|
||||||
|
|
||||||
import PROXY_PROCESSORS, { ApplyProcessor } from './processors';
|
import PROXY_PROCESSORS, { ApplyProcessor } from './processors';
|
||||||
import PROXY_PREPROCESSORS from './preprocessors';
|
import PROXY_PREPROCESSORS from './preprocessors';
|
||||||
import PROXY_PRODUCERS from './producers';
|
import PROXY_PRODUCERS from './producers';
|
||||||
import PROXY_PARSERS from './parsers';
|
import PROXY_PARSERS from './parsers';
|
||||||
import $ from '../app';
|
import $ from '@/core/app';
|
||||||
|
|
||||||
function preprocess(raw) {
|
function preprocess(raw) {
|
||||||
for (const processor of PROXY_PREPROCESSORS) {
|
for (const processor of PROXY_PREPROCESSORS) {
|
||||||
|
@ -142,6 +142,9 @@ function trojan(proxy) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// tls
|
// tls
|
||||||
|
if (needTls(proxy)) {
|
||||||
|
proxy.tls = true;
|
||||||
|
}
|
||||||
appendIfPresent(`,over-tls=${proxy.tls}`, 'tls');
|
appendIfPresent(`,over-tls=${proxy.tls}`, 'tls');
|
||||||
|
|
||||||
// tls fingerprint
|
// tls fingerprint
|
||||||
@ -249,6 +252,9 @@ function http(proxy) {
|
|||||||
appendIfPresent(`,password=${proxy.password}`, 'password');
|
appendIfPresent(`,password=${proxy.password}`, 'password');
|
||||||
|
|
||||||
// tls
|
// tls
|
||||||
|
if (needTls(proxy)) {
|
||||||
|
proxy.tls = true;
|
||||||
|
}
|
||||||
appendIfPresent(`,over-tls=${proxy.tls}`, 'tls');
|
appendIfPresent(`,over-tls=${proxy.tls}`, 'tls');
|
||||||
|
|
||||||
// tls fingerprint
|
// tls fingerprint
|
||||||
@ -286,6 +292,9 @@ function socks5(proxy) {
|
|||||||
appendIfPresent(`,password=${proxy.password}`, 'password');
|
appendIfPresent(`,password=${proxy.password}`, 'password');
|
||||||
|
|
||||||
// tls
|
// tls
|
||||||
|
if (needTls(proxy)) {
|
||||||
|
proxy.tls = true;
|
||||||
|
}
|
||||||
appendIfPresent(`,over-tls=${proxy.tls}`, 'tls');
|
appendIfPresent(`,over-tls=${proxy.tls}`, 'tls');
|
||||||
|
|
||||||
// tls fingerprint
|
// tls fingerprint
|
||||||
@ -312,3 +321,12 @@ function socks5(proxy) {
|
|||||||
|
|
||||||
return result.toString();
|
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.append(`${proxy.name}=${proxy.type},${proxy.server},${proxy.port}`);
|
||||||
result.appendIfPresent(`,username=${proxy.uuid}`, 'uuid');
|
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 (isPresent(proxy, 'network')) {
|
||||||
if (proxy.network === 'ws') {
|
if (proxy.network === 'ws') {
|
||||||
result.append(`,ws=true`);
|
result.append(`,ws=true`);
|
||||||
|
4
backend/sub-store.min.js
vendored
4
backend/sub-store.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user