mirror of
https://github.com/sub-store-org/Sub-Store.git
synced 2026-11-29 16:01:38 +00:00
feat: sing-box 支持使用完整的 _ech 结构设置 tls 的 ech
This commit is contained in:
4 files changed
+19
-4
No files matched your search
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "sub-store",
|
||||
"version": "2.21.12",
|
||||
"version": "2.21.13",
|
||||
"description": "Advanced Subscription Manager for QX, Loon, Surge, Stash and Shadowrocket.",
|
||||
"main": "src/main.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import ClashMeta_Producer from './clashmeta';
|
||||
import $ from '@/core/app';
|
||||
import { isIPv4, isIPv6 } from '@/utils';
|
||||
import { isIPv4, isIPv6, isPlainObject } from '@/utils';
|
||||
|
||||
const ipVersions = {
|
||||
ipv4: 'ipv4_only',
|
||||
@@ -271,6 +271,9 @@ const tlsParser = (proxy, parsedProxy) => {
|
||||
enabled: true,
|
||||
fingerprint: proxy['client-fingerprint'],
|
||||
};
|
||||
if (proxy._ech && isPlainObject(proxy._ech)) {
|
||||
parsedProxy.tls.ech = proxy._ech;
|
||||
}
|
||||
if (proxy['_fragment']) parsedProxy.tls.fragment = !!proxy['_fragment'];
|
||||
if (proxy['_fragment_fallback_delay'])
|
||||
parsedProxy.tls.fragment_fallback_delay =
|
||||
@@ -978,7 +981,10 @@ export default function singbox_Producer() {
|
||||
}
|
||||
break;
|
||||
case 'vless':
|
||||
if (proxy.encryption && proxy.encryption !== 'none') {
|
||||
if (
|
||||
proxy.encryption &&
|
||||
proxy.encryption !== 'none'
|
||||
) {
|
||||
throw new Error(
|
||||
`VLESS encryption is not supported`,
|
||||
);
|
||||
|
||||
@@ -150,7 +150,15 @@ function formatDateTime(date, format = 'YYYY-MM-DD_HH-mm-ss') {
|
||||
);
|
||||
}
|
||||
|
||||
function isPlainObject(obj) {
|
||||
return (
|
||||
obj !== null &&
|
||||
typeof obj === 'object' &&
|
||||
[null, Object.prototype].includes(Object.getPrototypeOf(obj))
|
||||
);
|
||||
}
|
||||
export {
|
||||
isPlainObject,
|
||||
formatDateTime,
|
||||
isValidUUID,
|
||||
ipAddress,
|
||||
|
||||
+2
-1
@@ -31,7 +31,8 @@ function operator(proxies = [], targetPlatform, context) {
|
||||
// 17. `block-quic` 支持 `auto`, `on`, `off`. 不同的平台不一定都支持, 会自动转换
|
||||
// 18. `sing-box` 支持 `_fragment`, `_fragment_fallback_delay`, `_record_fragment` 设置 `tls` 的 `fragment`, `fragment_fallback_delay`, `record_fragment`
|
||||
// 19. `sing-box` 支持 `_certificate`, `_certificate_path`, `_certificate_public_key_sha256`, `_client_certificate`, `_client_certificate_path`, `_client_key`, `_client_key_path` 设置 `tls` 的 `certificate`, `certificate_path`, `certificate_public_key_sha256`, `client_certificate`, `client_certificate_path`, `client_key`, `client_key_path`
|
||||
// 20. `interface-name` 指定流量出站接口 只给 Surge 用的话, `interface` 也可以
|
||||
// 20. `sing-box` 支持使用完整的 `_ech` 结构设置 `tls` 的 `ech`
|
||||
// 21. `interface-name` 指定流量出站接口 只给 Surge 用的话, `interface` 也可以
|
||||
|
||||
// require 为 Node.js 的 require, 在 Node.js 运行环境下 可以用来引入模块
|
||||
// 例如在 Node.js 环境下, 将文件内容写入 /tmp/1.txt 文件
|
||||
|
||||
Reference in new issue
Block a user