mirror of
https://github.com/sub-store-org/Sub-Store.git
synced 2026-11-28 07:24:12 +00:00
feat: Egern 支持 AnyTLS. 根据请求的 User-Agent 中的版本号自动开启, 或使用 includeUnsupportedProxy 参数或开启 包含官方/商店版不支持的协议 开关
This commit is contained in:
3 files changed
+35
-11
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "sub-store",
|
||||
"version": "2.21.28",
|
||||
"version": "2.21.29",
|
||||
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.",
|
||||
"main": "src/main.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -18,9 +18,9 @@ export default function Egern_Producer() {
|
||||
'vmess',
|
||||
'tuic',
|
||||
'wireguard',
|
||||
// ...(opts['include-unsupported-proxy']
|
||||
// ? ['wireguard']
|
||||
// : []),
|
||||
...(opts['include-unsupported-proxy']
|
||||
? ['anytls']
|
||||
: []),
|
||||
].includes(proxy.type) ||
|
||||
(proxy.type === 'ss' &&
|
||||
((proxy.plugin === 'obfs' &&
|
||||
@@ -75,6 +75,14 @@ export default function Egern_Producer() {
|
||||
proxy.token.length !== 0)
|
||||
) {
|
||||
return false;
|
||||
} else if (
|
||||
['anytls'].includes(proxy.type) &&
|
||||
proxy.network &&
|
||||
(!['tcp'].includes(proxy.network) ||
|
||||
(['tcp'].includes(proxy.network) &&
|
||||
proxy['reality-opts']))
|
||||
) {
|
||||
return false;
|
||||
} else if (
|
||||
['ws'].includes(proxy.network) &&
|
||||
proxy['ws-opts']?.['v2ray-http-upgrade']
|
||||
@@ -207,6 +215,20 @@ export default function Egern_Producer() {
|
||||
skip_tls_verify: proxy['skip-cert-verify'],
|
||||
websocket: proxy.websocket,
|
||||
};
|
||||
} else if (proxy.type === 'anytls') {
|
||||
proxy = {
|
||||
type: 'anytls',
|
||||
name: proxy.name,
|
||||
server: proxy.server,
|
||||
port: proxy.port,
|
||||
password: proxy.password,
|
||||
tfo: proxy.tfo || proxy['fast-open'],
|
||||
udp_relay:
|
||||
proxy.udp || proxy.udp_relay || proxy.udp_relay,
|
||||
next_hop: proxy.next_hop,
|
||||
sni: proxy.sni,
|
||||
skip_tls_verify: proxy['skip-cert-verify'],
|
||||
};
|
||||
} else if (proxy.type === 'vmess') {
|
||||
// Egern:传输层,支持 ws/wss/http1/http2/tls,不配置则为 tcp
|
||||
let security = proxy.cipher;
|
||||
@@ -428,6 +450,7 @@ export default function Egern_Producer() {
|
||||
'trojan',
|
||||
'vless',
|
||||
'vmess',
|
||||
'anytls',
|
||||
].includes(original.type)
|
||||
) {
|
||||
if (isPresent(original, 'shadow-tls-password')) {
|
||||
@@ -463,6 +486,7 @@ export default function Egern_Producer() {
|
||||
'wireguard',
|
||||
'tuic',
|
||||
'hysteria2',
|
||||
'anytls',
|
||||
].includes(original.type)
|
||||
) {
|
||||
if (
|
||||
|
||||
@@ -75,13 +75,13 @@ export function shouldIncludeUnsupportedProxy(platform, ua) {
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
// if (
|
||||
// platform === 'Egern' &&
|
||||
// target === 'Egern' &&
|
||||
// ua.match(/build\/(\d+)/i)?.[1] >= 698
|
||||
// ) {
|
||||
// return true;
|
||||
// }
|
||||
if (
|
||||
platform === 'Egern' &&
|
||||
target === 'Egern' &&
|
||||
ua.match(/build\/(\d+)/i)?.[1] >= 718
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
// // if (
|
||||
// // platform === 'Stash' &&
|
||||
// // target === 'Stash' &&
|
||||
|
||||
Reference in new issue
Block a user