@black-duty/sing-box-schema 1.13.0 → 1.13.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -7
- package/dist/index.cjs +189 -222
- package/dist/index.d.cts +6242 -9317
- package/dist/index.d.ts +6242 -9317
- package/dist/index.js +188 -219
- package/package.json +1 -1
- package/schema.json +3052 -2709
- package/schema.zh.json +3053 -2710
package/dist/index.cjs
CHANGED
|
@@ -62,10 +62,11 @@ const CertificateOptions = zod.z.object({
|
|
|
62
62
|
store: zod.z.enum([
|
|
63
63
|
"system",
|
|
64
64
|
"mozilla",
|
|
65
|
+
"chrome",
|
|
65
66
|
"none"
|
|
66
67
|
]).optional().meta({
|
|
67
|
-
description: "The default X509 trusted CA certificate list. Options: `system` (System trusted CA certificates), `mozilla` (Mozilla Included List with China CA certificates removed), `none` (Empty list).",
|
|
68
|
-
description_zh: "默认的 X509 受信任 CA 证书列表。可选项:`system`(系统受信任的 CA 证书)、`mozilla`(移除中国 CA 证书的 Mozilla 包含列表)、`none`(空列表)。"
|
|
68
|
+
description: "The default X509 trusted CA certificate list. Options: `system` (System trusted CA certificates), `mozilla` (Mozilla Included List with China CA certificates removed), `chrome` (Chrome Root Store with China CA certificates removed), `none` (Empty list).",
|
|
69
|
+
description_zh: "默认的 X509 受信任 CA 证书列表。可选项:`system`(系统受信任的 CA 证书)、`mozilla`(移除中国 CA 证书的 Mozilla 包含列表)、`chrome`(移除中国 CA 证书的 Chrome Root Store)、`none`(空列表)。"
|
|
69
70
|
}),
|
|
70
71
|
certificate: listableString.optional().meta({
|
|
71
72
|
description: "The certificate line array to trust, in PEM format.",
|
|
@@ -123,37 +124,6 @@ const HttpHeader = zod.z.record(zod.z.string(), zod.z.string()).meta({
|
|
|
123
124
|
description: "HTTP headers.",
|
|
124
125
|
description_zh: "HTTP 标头。"
|
|
125
126
|
});
|
|
126
|
-
const InboundOptions = zod.z.object({
|
|
127
|
-
sniff: zod.z.boolean().optional().meta({
|
|
128
|
-
description: "Enable sniffing. Deprecated in sing-box 1.11.0 and removed in 1.13.0.",
|
|
129
|
-
description_zh: "启用协议探测。已在 sing-box 1.11.0 弃用,并将在 1.13.0 移除。",
|
|
130
|
-
deprecated: true
|
|
131
|
-
}),
|
|
132
|
-
sniff_override_destination: zod.z.boolean().optional().meta({
|
|
133
|
-
description: "Override the connection destination address with the sniffed domain. Deprecated in sing-box 1.11.0 and removed in 1.13.0.",
|
|
134
|
-
description_zh: "用探测出的域名覆盖连接目标地址。已在 sing-box 1.11.0 弃用,并将在 1.13.0 移除。",
|
|
135
|
-
deprecated: true
|
|
136
|
-
}),
|
|
137
|
-
sniff_timeout: zod.z.string().optional().meta({
|
|
138
|
-
description: "Timeout for sniffing (default `300ms`). Deprecated in sing-box 1.11.0 and removed in 1.13.0.",
|
|
139
|
-
description_zh: "探测超时时间(默认 `300ms`)。已在 sing-box 1.11.0 弃用,并将在 1.13.0 移除。",
|
|
140
|
-
deprecated: true
|
|
141
|
-
}),
|
|
142
|
-
domain_strategy: DomainStrategy.optional().meta({
|
|
143
|
-
description: "If set, the requested domain name will be resolved to IP before routing. Deprecated in sing-box 1.11.0 and removed in 1.13.0.",
|
|
144
|
-
description_zh: "如果设置,请求的域名将在路由之前解析为 IP。已在 sing-box 1.11.0 弃用,并将在 1.13.0 移除。",
|
|
145
|
-
deprecated: true
|
|
146
|
-
}),
|
|
147
|
-
udp_disable_domain_unmapping: zod.z.boolean().optional().meta({
|
|
148
|
-
description: "If enabled, for UDP proxy requests addressed to a domain, the original packet address will be sent in the response instead of the mapped domain. Deprecated in sing-box 1.11.0 and removed in 1.13.0.",
|
|
149
|
-
description_zh: "如果启用,对于地址为域的 UDP 代理请求,将在响应中发送原始包地址而不是映射的域。已在 sing-box 1.11.0 弃用,并将在 1.13.0 移除。",
|
|
150
|
-
deprecated: true
|
|
151
|
-
}),
|
|
152
|
-
detour: zod.z.string().optional().meta({
|
|
153
|
-
description: "If set, connections will be forwarded to the specified inbound. Requires target inbound support.",
|
|
154
|
-
description_zh: "如果设置,连接将被转发到指定的入站。需要目标入站支持。"
|
|
155
|
-
})
|
|
156
|
-
});
|
|
157
127
|
const ListenOptions = zod.z.object({
|
|
158
128
|
listen: zod.z.string().optional().meta({
|
|
159
129
|
description: "Listen address.",
|
|
@@ -207,6 +177,10 @@ const ListenOptions = zod.z.object({
|
|
|
207
177
|
description: "UDP NAT expiration time. `5m` will be used by default.",
|
|
208
178
|
description_zh: "UDP NAT 过期时间。默认使用 `5m`。"
|
|
209
179
|
}),
|
|
180
|
+
detour: zod.z.string().optional().meta({
|
|
181
|
+
description: "If set, connections will be forwarded to the specified inbound. Requires target inbound support.",
|
|
182
|
+
description_zh: "如果设置,连接将被转发到指定的入站。需要目标入站支持。"
|
|
183
|
+
}),
|
|
210
184
|
proxy_protocol: zod.z.boolean().optional().meta({
|
|
211
185
|
description: "Accept proxy protocol.",
|
|
212
186
|
description_zh: "接受代理协议。",
|
|
@@ -216,8 +190,7 @@ const ListenOptions = zod.z.object({
|
|
|
216
190
|
description: "Accept connections without proxy protocol header.",
|
|
217
191
|
description_zh: "接受没有代理协议头的连接。",
|
|
218
192
|
deprecated: true
|
|
219
|
-
})
|
|
220
|
-
...InboundOptions.shape
|
|
193
|
+
})
|
|
221
194
|
}).meta({
|
|
222
195
|
id: "ListenOptions",
|
|
223
196
|
title: "Listen Options",
|
|
@@ -1056,11 +1029,11 @@ const DNSRouteAction = zod.z.object({
|
|
|
1056
1029
|
description: "Disable cache and save cache in this query.",
|
|
1057
1030
|
description_zh: "在此查询中禁用缓存。"
|
|
1058
1031
|
}),
|
|
1059
|
-
rewrite_ttl: zod.z.number().int().optional().meta({
|
|
1032
|
+
rewrite_ttl: zod.z.number().int().optional().nullable().meta({
|
|
1060
1033
|
description: "Rewrite TTL in DNS responses.",
|
|
1061
1034
|
description_zh: "重写 DNS 回应中的 TTL。"
|
|
1062
1035
|
}),
|
|
1063
|
-
client_subnet: zod.z.string().optional().meta({
|
|
1036
|
+
client_subnet: zod.z.string().optional().nullable().meta({
|
|
1064
1037
|
description: "Append a `edns0-subnet` OPT extra record with the specified IP prefix to every query by default. If the value is an IP address instead of a prefix, `/32` or `/128` will be appended automatically. Will override `dns.client_subnet`.",
|
|
1065
1038
|
description_zh: "默认情况下,将带有指定 IP 前缀的 `edns0-subnet` OPT 附加记录附加到每个查询。如果值是 IP 地址而不是前缀,则会自动附加 `/32` 或 `/128`。将覆盖 `dns.client_subnet`。"
|
|
1066
1039
|
})
|
|
@@ -1100,11 +1073,11 @@ const DNSRouteOptionsAction = zod.z.object({
|
|
|
1100
1073
|
description: "Disable cache and save cache in this query.",
|
|
1101
1074
|
description_zh: "在此查询中禁用缓存。"
|
|
1102
1075
|
}),
|
|
1103
|
-
rewrite_ttl: zod.z.number().int().optional().meta({
|
|
1076
|
+
rewrite_ttl: zod.z.number().int().optional().nullable().meta({
|
|
1104
1077
|
description: "Rewrite TTL in DNS responses.",
|
|
1105
1078
|
description_zh: "重写 DNS 回应中的 TTL。"
|
|
1106
1079
|
}),
|
|
1107
|
-
client_subnet: zod.z.string().optional().meta({
|
|
1080
|
+
client_subnet: zod.z.string().optional().nullable().meta({
|
|
1108
1081
|
description: "Append a `edns0-subnet` OPT extra record with the specified IP prefix to every query by default. If the value is an IP address instead of a prefix, `/32` or `/128` will be appended automatically. Will override `dns.client_subnet`.",
|
|
1109
1082
|
description_zh: "默认情况下,将带有指定 IP 前缀的 `edns0-subnet` OPT 附加记录附加到每个查询。如果值是 IP 地址而不是前缀,则会自动附加 `/32` 或 `/128`。将覆盖 `dns.client_subnet`。"
|
|
1110
1083
|
})
|
|
@@ -1319,6 +1292,11 @@ const BaseDNSRule = zod.z.object({
|
|
|
1319
1292
|
description: "Make `ip_cidr` rule items in rule-sets match the source IP.",
|
|
1320
1293
|
description_zh: "使规则集中的 `ip_cidr` 规则匹配源 IP。"
|
|
1321
1294
|
}),
|
|
1295
|
+
rule_set_ipcidr_match_source: zod.z.boolean().optional().meta({
|
|
1296
|
+
description: "Deprecated in sing-box 1.10.0. `rule_set_ipcidr_match_source` is renamed to `rule_set_ip_cidr_match_source` and will be remove in sing-box 1.11.0. Make `ip_cidr` rule items in rule-sets match the source IP.",
|
|
1297
|
+
description_zh: "已在 sing-box 1.10.0 废弃。`rule_set_ipcidr_match_source` 已重命名为 `rule_set_ip_cidr_match_source` 且将在 sing-box 1.11.0 中被移除。使规则集中的 `ip_cidr` 规则匹配源 IP。",
|
|
1298
|
+
deprecated: true
|
|
1299
|
+
}),
|
|
1322
1300
|
rule_set_ip_cidr_accept_empty: zod.z.boolean().optional().meta({
|
|
1323
1301
|
description: "Make `ip_cidr` rules in rule-sets accept empty query response. Only takes effect for address requests (A/AAAA/HTTPS).",
|
|
1324
1302
|
description_zh: "使规则集中的 `ip_cidr` 规则接受空查询响应。仅对地址请求(A/AAAA/HTTPS)生效。"
|
|
@@ -1339,7 +1317,7 @@ const DefaultDNSRule = zod.z.union([
|
|
|
1339
1317
|
BaseDNSRule.extend(DNSRejectAction.shape),
|
|
1340
1318
|
BaseDNSRule.extend(DNSRouteActionPredefined.shape)
|
|
1341
1319
|
]);
|
|
1342
|
-
const
|
|
1320
|
+
const BaseLogicalDNSRule = zod.z.object({
|
|
1343
1321
|
type: zod.z.literal("logical").meta({
|
|
1344
1322
|
description: "Rule type.",
|
|
1345
1323
|
description_zh: "规则类型。"
|
|
@@ -1358,7 +1336,13 @@ const LogicalDNSRule = zod.z.object({
|
|
|
1358
1336
|
description: "Invert match result.",
|
|
1359
1337
|
description_zh: "反选匹配结果。"
|
|
1360
1338
|
})
|
|
1361
|
-
})
|
|
1339
|
+
});
|
|
1340
|
+
const LogicalDNSRule = zod.z.union([
|
|
1341
|
+
BaseLogicalDNSRule.extend(DNSRouteAction.shape),
|
|
1342
|
+
BaseLogicalDNSRule.extend(DNSRouteOptionsAction.shape),
|
|
1343
|
+
BaseLogicalDNSRule.extend(DNSRejectAction.shape),
|
|
1344
|
+
BaseLogicalDNSRule.extend(DNSRouteActionPredefined.shape)
|
|
1345
|
+
]).meta({
|
|
1362
1346
|
id: "LogicalDNSRule",
|
|
1363
1347
|
title: "Logical DNS Rule",
|
|
1364
1348
|
title_zh: "逻辑 DNS 规则"
|
|
@@ -1443,6 +1427,10 @@ const LegacyDNSServerAddress = zod.z.union([
|
|
|
1443
1427
|
})
|
|
1444
1428
|
]);
|
|
1445
1429
|
const LegacyDNSServerOptions = zod.z.object({
|
|
1430
|
+
type: zod.z.literal("legacy").optional().meta({
|
|
1431
|
+
description: "DNS server type.",
|
|
1432
|
+
description_zh: "DNS 服务器类型。"
|
|
1433
|
+
}),
|
|
1446
1434
|
tag: zod.z.string().meta({
|
|
1447
1435
|
description: "The tag of the dns server.",
|
|
1448
1436
|
description_zh: "DNS 服务器的标签。"
|
|
@@ -1637,6 +1625,10 @@ const HTTP3DNSServerOptions = zod.z.object({
|
|
|
1637
1625
|
description: "The path of the HTTP3 DNS server. `/dns-query` will be used by default.",
|
|
1638
1626
|
description_zh: "HTTP3 DNS 服务器的路径。默认使用 `/dns-query`。"
|
|
1639
1627
|
}),
|
|
1628
|
+
method: zod.z.string().optional().meta({
|
|
1629
|
+
description: "The HTTP method for DNS-over-HTTP/3 requests.",
|
|
1630
|
+
description_zh: "DNS-over-HTTP/3 请求使用的 HTTP 方法。"
|
|
1631
|
+
}),
|
|
1640
1632
|
headers: HttpHeader.optional().meta({
|
|
1641
1633
|
description: "Additional headers to be sent to the DNS server.",
|
|
1642
1634
|
description_zh: "要发送到 DNS 服务器的额外请求头。"
|
|
@@ -1712,7 +1704,7 @@ const ResolvedDNSServerOptions = zod.z.object({
|
|
|
1712
1704
|
title: "Resolved DNS Server",
|
|
1713
1705
|
title_zh: "Resolved DNS 服务器"
|
|
1714
1706
|
});
|
|
1715
|
-
const DNSServer = zod.z.discriminatedUnion("type", [
|
|
1707
|
+
const DNSServer = zod.z.union([zod.z.lazy(() => LegacyDNSServerOptions), zod.z.lazy(() => zod.z.discriminatedUnion("type", [
|
|
1716
1708
|
LocalDNSServerOptions,
|
|
1717
1709
|
HostsDNSServerOptions,
|
|
1718
1710
|
TCPDNSServerOptions,
|
|
@@ -1724,9 +1716,8 @@ const DNSServer = zod.z.discriminatedUnion("type", [
|
|
|
1724
1716
|
DHCPDNSServerOptions,
|
|
1725
1717
|
FakeIPDNSServerOptions,
|
|
1726
1718
|
TailscaleDNSServerOptions,
|
|
1727
|
-
ResolvedDNSServerOptions
|
|
1728
|
-
|
|
1729
|
-
]).meta({
|
|
1719
|
+
ResolvedDNSServerOptions
|
|
1720
|
+
]))]).meta({
|
|
1730
1721
|
id: "DNSServer",
|
|
1731
1722
|
title: "DNS Server",
|
|
1732
1723
|
title_zh: "DNS 服务器"
|
|
@@ -1964,84 +1955,6 @@ const WireGuardEndpointOptions = zod.default.object({
|
|
|
1964
1955
|
title: "WireGuard Endpoint",
|
|
1965
1956
|
title_zh: "WireGuard 端点"
|
|
1966
1957
|
});
|
|
1967
|
-
const LegacyWireGuardPeer = zod.default.object({
|
|
1968
|
-
public_key: zod.default.string().optional().meta({
|
|
1969
|
-
description: "WireGuard peer public key.",
|
|
1970
|
-
description_zh: "WireGuard 对等公钥。"
|
|
1971
|
-
}),
|
|
1972
|
-
pre_shared_key: zod.default.string().optional().meta({
|
|
1973
|
-
description: "WireGuard pre-shared key.",
|
|
1974
|
-
description_zh: "WireGuard 预共享密钥。"
|
|
1975
|
-
}),
|
|
1976
|
-
allowed_ips: zod.default.union([zod.default.string(), zod.default.array(zod.default.string())]).optional().meta({
|
|
1977
|
-
description: "WireGuard allowed IPs.",
|
|
1978
|
-
description_zh: "WireGuard 允许 IP。"
|
|
1979
|
-
}),
|
|
1980
|
-
reserved: Reserved.optional().meta({
|
|
1981
|
-
description: "WireGuard reserved field bytes.",
|
|
1982
|
-
description_zh: "WireGuard 保留字段字节。"
|
|
1983
|
-
}),
|
|
1984
|
-
...ServerOptions.shape
|
|
1985
|
-
});
|
|
1986
|
-
const LegacyWireGuardOutboundOptions = zod.default.object({
|
|
1987
|
-
type: zod.default.literal("wireguard"),
|
|
1988
|
-
tag: zod.default.string().optional(),
|
|
1989
|
-
system_interface: zod.default.boolean().optional().meta({
|
|
1990
|
-
description: "Use system interface. Requires privilege and cannot conflict with existing system interfaces. Forced if gVisor is not included in the build.",
|
|
1991
|
-
description_zh: "使用系统设备。需要特权且不能与已有系统接口冲突。如果未包含 gVisor 构建标签,则强制使用。"
|
|
1992
|
-
}),
|
|
1993
|
-
gso: zod.default.boolean().optional().meta({
|
|
1994
|
-
description: "Try to enable generic segmentation offload. Deprecated in sing-box 1.11.0; GSO will be automatically enabled when available. Only supported on Linux.",
|
|
1995
|
-
description_zh: "尝试启用通用分段卸载。已在 sing-box 1.11.0 废弃;可用时将自动启用 GSO。仅在 Linux 上支持。",
|
|
1996
|
-
deprecated: true
|
|
1997
|
-
}),
|
|
1998
|
-
interface_name: zod.default.string().optional().meta({
|
|
1999
|
-
description: "Custom interface name for system interface.",
|
|
2000
|
-
description_zh: "为系统接口自定义设备名称。"
|
|
2001
|
-
}),
|
|
2002
|
-
local_address: zod.default.union([zod.default.string(), zod.default.array(zod.default.string())]).meta({
|
|
2003
|
-
description: "List of IP (v4 or v6) address prefixes to be assigned to the interface. Required.",
|
|
2004
|
-
description_zh: "接口的 IPv4/IPv6 地址或地址段的列表(必填)。"
|
|
2005
|
-
}),
|
|
2006
|
-
private_key: zod.default.string().meta({
|
|
2007
|
-
description: "WireGuard requires base64-encoded public and private keys. These can be generated using wg(8) or `sing-box generate wg-keypair`. Required.",
|
|
2008
|
-
description_zh: "WireGuard 需要 base64 编码的公钥和私钥。可以使用 wg(8) 或 `sing-box generate wg-keypair` 生成。必填。"
|
|
2009
|
-
}),
|
|
2010
|
-
peers: zod.default.array(LegacyWireGuardPeer).optional().meta({
|
|
2011
|
-
description: "Multi-peer support. If enabled, `server`, `server_port`, `peer_public_key`, and `pre_shared_key` will be ignored.",
|
|
2012
|
-
description_zh: "多对等支持。启用后将忽略 `server`、`server_port`、`peer_public_key` 和 `pre_shared_key`。"
|
|
2013
|
-
}),
|
|
2014
|
-
peer_public_key: zod.default.string().meta({
|
|
2015
|
-
description: "WireGuard peer public key. Required if multi-peer is disabled.",
|
|
2016
|
-
description_zh: "WireGuard 对等公钥(未启用多对等支持时必填)。"
|
|
2017
|
-
}),
|
|
2018
|
-
pre_shared_key: zod.default.string().optional().meta({
|
|
2019
|
-
description: "WireGuard pre-shared key.",
|
|
2020
|
-
description_zh: "WireGuard 预共享密钥。"
|
|
2021
|
-
}),
|
|
2022
|
-
reserved: Reserved.optional().meta({
|
|
2023
|
-
description: "WireGuard reserved field bytes. `$outbound.reserved` will be used if empty.",
|
|
2024
|
-
description_zh: "WireGuard 保留字段字节。置空时将使用 `$outbound.reserved`。"
|
|
2025
|
-
}),
|
|
2026
|
-
workers: zod.default.number().int().optional().meta({
|
|
2027
|
-
description: "WireGuard worker count. CPU count is used by default.",
|
|
2028
|
-
description_zh: "WireGuard worker 数量。默认使用 CPU 数量。"
|
|
2029
|
-
}),
|
|
2030
|
-
mtu: zod.default.number().int().optional().meta({
|
|
2031
|
-
description: "WireGuard MTU. `1408` will be used if empty.",
|
|
2032
|
-
description_zh: "WireGuard MTU。默认使用 1408。"
|
|
2033
|
-
}),
|
|
2034
|
-
network: Network.optional().meta({
|
|
2035
|
-
description: "Enabled network. One of `tcp` `udp`. Both is enabled by default.",
|
|
2036
|
-
description_zh: "启用的网络协议。`tcp` 或 `udp`。默认所有。"
|
|
2037
|
-
}),
|
|
2038
|
-
...ServerOptions.shape,
|
|
2039
|
-
...DialerOptions.shape
|
|
2040
|
-
}).meta({
|
|
2041
|
-
id: "LegacyWireGuardOutboundOptions",
|
|
2042
|
-
title: "Legacy WireGuard Outbound",
|
|
2043
|
-
title_zh: "旧版 WireGuard 出站"
|
|
2044
|
-
});
|
|
2045
1958
|
|
|
2046
1959
|
//#endregion
|
|
2047
1960
|
//#region src/schema/endpoint.ts
|
|
@@ -2175,6 +2088,31 @@ const ClashAPIOptions = zod.z.object({
|
|
|
2175
2088
|
access_control_allow_private_network: zod.z.boolean().optional().meta({
|
|
2176
2089
|
description: "Allow access from private network. To access the Clash API on a private network from a public website, `access_control_allow_private_network` must be enabled.",
|
|
2177
2090
|
description_zh: "允许从私有网络访问。要从公共网站访问私有网络上的 Clash API,必须启用 `access_control_allow_private_network`。"
|
|
2091
|
+
}),
|
|
2092
|
+
store_mode: zod.z.boolean().optional().meta({
|
|
2093
|
+
description: "Store Clash mode in cache file. Deprecated in sing-box 1.8.0 and migrated to the global cache file.",
|
|
2094
|
+
description_zh: "将 Clash 模式存储在缓存文件中。已在 sing-box 1.8.0 弃用并迁移到全局缓存文件。",
|
|
2095
|
+
deprecated: true
|
|
2096
|
+
}),
|
|
2097
|
+
store_selected: zod.z.boolean().optional().meta({
|
|
2098
|
+
description: "Store selected outbound for the Selector outbound in cache file. Deprecated in sing-box 1.8.0 and migrated to the global cache file.",
|
|
2099
|
+
description_zh: "将 Selector 出站中选定的出站存储在缓存文件中。已在 sing-box 1.8.0 弃用并迁移到全局缓存文件。",
|
|
2100
|
+
deprecated: true
|
|
2101
|
+
}),
|
|
2102
|
+
store_fakeip: zod.z.boolean().optional().meta({
|
|
2103
|
+
description: "Store fakeip in cache file. Deprecated in sing-box 1.8.0 and migrated to `cache_file.store_fakeip`.",
|
|
2104
|
+
description_zh: "将 fakeip 存储在缓存文件中。已在 sing-box 1.8.0 弃用并迁移到 `cache_file.store_fakeip`。",
|
|
2105
|
+
deprecated: true
|
|
2106
|
+
}),
|
|
2107
|
+
cache_file: zod.z.string().optional().meta({
|
|
2108
|
+
description: "Cache file path. Deprecated in sing-box 1.8.0 and migrated to `cache_file.enabled` and `cache_file.path`.",
|
|
2109
|
+
description_zh: "缓存文件路径。已在 sing-box 1.8.0 弃用并迁移到 `cache_file.enabled` 和 `cache_file.path`。",
|
|
2110
|
+
deprecated: true
|
|
2111
|
+
}),
|
|
2112
|
+
cache_id: zod.z.string().optional().meta({
|
|
2113
|
+
description: "Identifier in cache file. Deprecated in sing-box 1.8.0 and migrated to `cache_file.cache_id`.",
|
|
2114
|
+
description_zh: "缓存文件中的标识符。已在 sing-box 1.8.0 弃用并迁移到 `cache_file.cache_id`。",
|
|
2115
|
+
deprecated: true
|
|
2178
2116
|
})
|
|
2179
2117
|
}).meta({
|
|
2180
2118
|
id: "ClashAPIOptions",
|
|
@@ -2340,16 +2278,6 @@ const DirectInboundOptions = zod.z.object({
|
|
|
2340
2278
|
const DirectOutboundOptions = zod.z.object({
|
|
2341
2279
|
type: zod.z.literal("direct"),
|
|
2342
2280
|
tag: zod.z.string().optional(),
|
|
2343
|
-
override_address: zod.z.string().optional().meta({
|
|
2344
|
-
description: "Override the connection destination address. Deprecated since sing-box 1.11.0 and will be removed in 1.13.0; see [Migration](/migration/#migrate-destination-override-fields-to-route-options).",
|
|
2345
|
-
description_zh: "覆盖连接目标地址。自 sing-box 1.11.0 起已废弃,并将于 1.13.0 移除;请参阅 [迁移指南](/zh/migration/#migrate-destination-override-fields-to-route-options)。",
|
|
2346
|
-
deprecated: true
|
|
2347
|
-
}),
|
|
2348
|
-
override_port: zod.z.number().int().optional().meta({
|
|
2349
|
-
description: "Override the connection destination port. Deprecated since sing-box 1.11.0 and will be removed in 1.13.0; see [Migration](/migration/#migrate-destination-override-fields-to-route-options).",
|
|
2350
|
-
description_zh: "覆盖连接目标端口。自 sing-box 1.11.0 起已废弃,并将于 1.13.0 移除;请参阅 [迁移指南](/zh/migration/#migrate-destination-override-fields-to-route-options)。",
|
|
2351
|
-
deprecated: true
|
|
2352
|
-
}),
|
|
2353
2281
|
...DialerOptions.shape
|
|
2354
2282
|
}).meta({
|
|
2355
2283
|
id: "DirectOutboundOptions",
|
|
@@ -2749,6 +2677,10 @@ const NaiveInboundOptions = zod.z.object({
|
|
|
2749
2677
|
description: "Naive users. Required.",
|
|
2750
2678
|
description_zh: "Naive 用户。必填。"
|
|
2751
2679
|
}),
|
|
2680
|
+
quic_congestion_control: zod.z.string().optional().meta({
|
|
2681
|
+
description: "QUIC congestion control algorithm.",
|
|
2682
|
+
description_zh: "QUIC 拥塞控制算法。"
|
|
2683
|
+
}),
|
|
2752
2684
|
tls: InboundTLSOptions.optional().meta({
|
|
2753
2685
|
description: "TLS configuration, see [TLS](/configuration/shared/tls/#inbound).",
|
|
2754
2686
|
description_zh: "TLS 配置,参阅 [TLS](/zh/configuration/shared/tls/#inbound)。"
|
|
@@ -2759,6 +2691,56 @@ const NaiveInboundOptions = zod.z.object({
|
|
|
2759
2691
|
title: "Naive Inbound",
|
|
2760
2692
|
title_zh: "Naive 入站"
|
|
2761
2693
|
});
|
|
2694
|
+
const NaiveOutboundOptions = zod.z.object({
|
|
2695
|
+
type: zod.z.literal("naive"),
|
|
2696
|
+
tag: zod.z.string().optional(),
|
|
2697
|
+
username: zod.z.string().optional().meta({
|
|
2698
|
+
description: "Authentication username.",
|
|
2699
|
+
description_zh: "认证用户名。"
|
|
2700
|
+
}),
|
|
2701
|
+
password: zod.z.string().optional().meta({
|
|
2702
|
+
description: "Authentication password.",
|
|
2703
|
+
description_zh: "认证密码。"
|
|
2704
|
+
}),
|
|
2705
|
+
insecure_concurrency: zod.z.number().int().optional().meta({
|
|
2706
|
+
description: "Number of concurrent tunnel connections. Multiple connections make the tunneling easier to detect through traffic analysis.",
|
|
2707
|
+
description_zh: "并发隧道连接数。多个连接会使隧道更容易通过流量分析被检测到。"
|
|
2708
|
+
}),
|
|
2709
|
+
extra_headers: HttpHeader.optional().meta({
|
|
2710
|
+
description: "Extra headers to send in HTTP requests.",
|
|
2711
|
+
description_zh: "HTTP 请求中发送的额外标头。"
|
|
2712
|
+
}),
|
|
2713
|
+
stream_receive_window: zod.z.string().optional().meta({
|
|
2714
|
+
description: "Stream receive window size.",
|
|
2715
|
+
description_zh: "流接收窗口大小。"
|
|
2716
|
+
}),
|
|
2717
|
+
udp_over_tcp: zod.z.union([zod.z.boolean(), UDPOverTCPOptions]).optional().meta({
|
|
2718
|
+
description: "UDP over TCP protocol settings. See [UDP Over TCP](/configuration/shared/udp-over-tcp/) for details.",
|
|
2719
|
+
description_zh: "UDP over TCP 协议设置。参阅 [UDP Over TCP](/zh/configuration/shared/udp-over-tcp/) 以获取详细信息。"
|
|
2720
|
+
}),
|
|
2721
|
+
quic: zod.z.boolean().optional().meta({
|
|
2722
|
+
description: "Use QUIC instead of HTTP/2.",
|
|
2723
|
+
description_zh: "使用 QUIC 而非 HTTP/2。"
|
|
2724
|
+
}),
|
|
2725
|
+
quic_congestion_control: zod.z.string().optional().meta({
|
|
2726
|
+
description: "QUIC congestion control algorithm.",
|
|
2727
|
+
description_zh: "QUIC 拥塞控制算法。"
|
|
2728
|
+
}),
|
|
2729
|
+
quic_session_receive_window: zod.z.string().optional().meta({
|
|
2730
|
+
description: "QUIC session receive window size.",
|
|
2731
|
+
description_zh: "QUIC 会话接收窗口大小。"
|
|
2732
|
+
}),
|
|
2733
|
+
tls: OutboundTLSOptions.meta({
|
|
2734
|
+
description: "TLS configuration, see [TLS](/configuration/shared/tls/#outbound). Required.",
|
|
2735
|
+
description_zh: "TLS 配置,参阅 [TLS](/zh/configuration/shared/tls/#outbound)。必填。"
|
|
2736
|
+
}),
|
|
2737
|
+
...ServerOptions.shape,
|
|
2738
|
+
...DialerOptions.shape
|
|
2739
|
+
}).meta({
|
|
2740
|
+
id: "NaiveOutboundOptions",
|
|
2741
|
+
title: "Naive Outbound",
|
|
2742
|
+
title_zh: "Naive 出站"
|
|
2743
|
+
});
|
|
2762
2744
|
|
|
2763
2745
|
//#endregion
|
|
2764
2746
|
//#region src/schema/protocols/redirect.ts
|
|
@@ -3316,6 +3298,10 @@ const TunInboundOptions = zod.z.object({
|
|
|
3316
3298
|
description: "Exclude android packages in route. Android package rules are only supported on Android and require `auto_route`.",
|
|
3317
3299
|
description_zh: "排除路由的 Android 应用包名。Android 应用规则仅在 Android 下被支持,并且需要 `auto_route`。"
|
|
3318
3300
|
}),
|
|
3301
|
+
udp_timeout: zod.z.union([zod.z.string(), zod.z.number()]).optional().meta({
|
|
3302
|
+
description: "UDP NAT expiration time. `5m` will be used by default.",
|
|
3303
|
+
description_zh: "UDP NAT 过期时间。默认使用 `5m`。"
|
|
3304
|
+
}),
|
|
3319
3305
|
stack: zod.z.enum([
|
|
3320
3306
|
"system",
|
|
3321
3307
|
"gvisor",
|
|
@@ -3327,48 +3313,7 @@ const TunInboundOptions = zod.z.object({
|
|
|
3327
3313
|
platform: TunPlatformOptions.optional().meta({
|
|
3328
3314
|
description: "Platform-specific settings, provided by client applications.",
|
|
3329
3315
|
description_zh: "平台特定的设置,由客户端应用提供。"
|
|
3330
|
-
})
|
|
3331
|
-
gso: zod.z.boolean().optional().meta({
|
|
3332
|
-
description: "Enable generic segmentation offload.",
|
|
3333
|
-
description_zh: "启用通用分段卸载。",
|
|
3334
|
-
deprecated: true
|
|
3335
|
-
}),
|
|
3336
|
-
inet4_address: listableString.optional().meta({
|
|
3337
|
-
description: "IPv4 prefix for the tun interface.",
|
|
3338
|
-
description_zh: "tun 接口的 IPv4 前缀。",
|
|
3339
|
-
deprecated: true
|
|
3340
|
-
}),
|
|
3341
|
-
inet6_address: listableString.optional().meta({
|
|
3342
|
-
description: "IPv6 prefix for the tun interface.",
|
|
3343
|
-
description_zh: "tun 接口的 IPv6 前缀。",
|
|
3344
|
-
deprecated: true
|
|
3345
|
-
}),
|
|
3346
|
-
inet4_route_address: listableString.optional().meta({
|
|
3347
|
-
description: "Use custom routes instead of default when `auto_route` is enabled.",
|
|
3348
|
-
description_zh: "启用 `auto_route` 时使用自定义路由而不是默认路由。",
|
|
3349
|
-
deprecated: true
|
|
3350
|
-
}),
|
|
3351
|
-
inet6_route_address: listableString.optional().meta({
|
|
3352
|
-
description: "Use custom routes instead of default when `auto_route` is enabled.",
|
|
3353
|
-
description_zh: "启用 `auto_route` 时使用自定义路由而不是默认路由。",
|
|
3354
|
-
deprecated: true
|
|
3355
|
-
}),
|
|
3356
|
-
inet4_route_exclude_address: listableString.optional().meta({
|
|
3357
|
-
description: "Exclude custom routes when `auto_route` is enabled.",
|
|
3358
|
-
description_zh: "启用 `auto_route` 时排除自定义路由。",
|
|
3359
|
-
deprecated: true
|
|
3360
|
-
}),
|
|
3361
|
-
inet6_route_exclude_address: listableString.optional().meta({
|
|
3362
|
-
description: "Exclude custom routes when `auto_route` is enabled.",
|
|
3363
|
-
description_zh: "启用 `auto_route` 时排除自定义路由。",
|
|
3364
|
-
deprecated: true
|
|
3365
|
-
}),
|
|
3366
|
-
endpoint_independent_nat: zod.z.boolean().optional().meta({
|
|
3367
|
-
description: "Enable endpoint-independent NAT. This item is only available on the gvisor stack; other stacks are endpoint-independent NAT by default. Performance may degrade slightly, so it is not recommended to enable when it is not needed.",
|
|
3368
|
-
description_zh: "启用独立于端点的 NAT。此项仅在 gvisor 栈上可用,其他栈默认启用独立于端点的 NAT。性能可能略有下降,因此不建议在不需要时启用。",
|
|
3369
|
-
deprecated: true
|
|
3370
|
-
}),
|
|
3371
|
-
...ListenOptions.shape
|
|
3316
|
+
})
|
|
3372
3317
|
}).meta({
|
|
3373
3318
|
id: "TunInboundOptions",
|
|
3374
3319
|
title: "Tun Inbound",
|
|
@@ -3685,24 +3630,16 @@ const URLTestOutbound = zod.z.object({
|
|
|
3685
3630
|
});
|
|
3686
3631
|
|
|
3687
3632
|
//#endregion
|
|
3688
|
-
//#region src/schema/protocols/
|
|
3689
|
-
const
|
|
3690
|
-
type: zod.z.literal("
|
|
3691
|
-
tag: zod.z.string().optional()
|
|
3692
|
-
method: zod.z.string(),
|
|
3693
|
-
password: zod.z.string(),
|
|
3694
|
-
obfs: zod.z.string().optional(),
|
|
3695
|
-
obfs_param: zod.z.string().optional(),
|
|
3696
|
-
protocol: zod.z.string().optional(),
|
|
3697
|
-
protocol_param: zod.z.string().optional(),
|
|
3698
|
-
network: Network.optional(),
|
|
3699
|
-
...ServerOptions.shape,
|
|
3700
|
-
...DialerOptions.shape
|
|
3633
|
+
//#region src/schema/protocols/block.ts
|
|
3634
|
+
const BlockOutboundOptions = zod.z.object({
|
|
3635
|
+
type: zod.z.literal("block"),
|
|
3636
|
+
tag: zod.z.string().optional()
|
|
3701
3637
|
}).meta({
|
|
3702
|
-
id: "
|
|
3703
|
-
title: "
|
|
3704
|
-
title_zh: "
|
|
3705
|
-
|
|
3638
|
+
id: "BlockOutboundOptions",
|
|
3639
|
+
title: "Block Outbound",
|
|
3640
|
+
title_zh: "Block 出站",
|
|
3641
|
+
description: "Block outbound closes all incoming requests.",
|
|
3642
|
+
description_zh: "Block 出站关闭所有传入请求。"
|
|
3706
3643
|
});
|
|
3707
3644
|
|
|
3708
3645
|
//#endregion
|
|
@@ -3787,14 +3724,14 @@ const Outbound = zod.z.discriminatedUnion("type", [
|
|
|
3787
3724
|
ShadowsocksOutboundOptions,
|
|
3788
3725
|
VMessOutboundOptions,
|
|
3789
3726
|
TrojanOutboundOptions,
|
|
3790
|
-
|
|
3727
|
+
BlockOutboundOptions,
|
|
3791
3728
|
HysteriaOutboundOptions,
|
|
3792
3729
|
ShadowTLSOutboundOptions,
|
|
3793
3730
|
AnyTLSOutboundOptions,
|
|
3794
3731
|
Hysteria2OutboundOptions,
|
|
3795
3732
|
TUICOutboundOptions,
|
|
3796
3733
|
VLESSOutboundOptions,
|
|
3797
|
-
|
|
3734
|
+
NaiveOutboundOptions,
|
|
3798
3735
|
SSHOutboundOptions,
|
|
3799
3736
|
TorOutboundOptions,
|
|
3800
3737
|
SelectorOutbound,
|
|
@@ -3827,14 +3764,6 @@ const RuleActionRouteOptions = zod.z.object({
|
|
|
3827
3764
|
description: "See Dial Fields (/configuration/shared/dial/#network_strategy) for details. Only take effect if outbound is direct without `outbound.bind_interface`, `outbound.inet4_bind_address` and `outbound.inet6_bind_address` set.",
|
|
3828
3765
|
description_zh: "详情参阅 [拨号字段](/configuration/shared/dial/#network_strategy)。仅当出站为 direct 且 `outbound.bind_interface`、`outbound.inet4_bind_address` 与 `outbound.inet6_bind_address` 均未设置时生效。"
|
|
3829
3766
|
}),
|
|
3830
|
-
network_type: listable(NetworkType).optional().meta({
|
|
3831
|
-
description: "See Dial Fields (/configuration/shared/dial/#network_type) for details.",
|
|
3832
|
-
description_zh: "详情参阅 [拨号字段](/configuration/shared/dial/#network_type)。"
|
|
3833
|
-
}),
|
|
3834
|
-
fallback_network_type: listable(NetworkType).optional().meta({
|
|
3835
|
-
description: "See Dial Fields (/configuration/shared/dial/#fallback_network_type) for details.",
|
|
3836
|
-
description_zh: "详情参阅 [拨号字段](/configuration/shared/dial/#fallback_network_type)。"
|
|
3837
|
-
}),
|
|
3838
3767
|
fallback_delay: zod.z.string().optional().meta({
|
|
3839
3768
|
description: "See Dial Fields (/configuration/shared/dial/#fallback_delay) for details.",
|
|
3840
3769
|
description_zh: "详情参阅 [拨号字段](/configuration/shared/dial/#fallback_delay)。"
|
|
@@ -3939,14 +3868,33 @@ const RuleActionRoute = zod.z.object({
|
|
|
3939
3868
|
title: "Rule Action Route",
|
|
3940
3869
|
title_zh: "规则动作路由"
|
|
3941
3870
|
});
|
|
3871
|
+
const RuleActionBypass = zod.z.object({
|
|
3872
|
+
action: zod.z.literal("bypass").meta({
|
|
3873
|
+
description: "Action type.",
|
|
3874
|
+
description_zh: "动作类型。"
|
|
3875
|
+
}),
|
|
3876
|
+
outbound: zod.z.string().optional().meta({
|
|
3877
|
+
description: "Tag of target outbound.",
|
|
3878
|
+
description_zh: "目标出站的标签。"
|
|
3879
|
+
}),
|
|
3880
|
+
...RuleActionRouteOptions.shape
|
|
3881
|
+
}).meta({
|
|
3882
|
+
id: "RuleActionBypass",
|
|
3883
|
+
title: "Rule Action Bypass",
|
|
3884
|
+
title_zh: "规则动作绕过"
|
|
3885
|
+
});
|
|
3942
3886
|
const RuleActionReject = zod.z.object({
|
|
3943
3887
|
action: zod.z.literal("reject").meta({
|
|
3944
3888
|
description: "Action type.",
|
|
3945
3889
|
description_zh: "动作类型。"
|
|
3946
3890
|
}),
|
|
3947
|
-
method: zod.z.enum([
|
|
3948
|
-
|
|
3949
|
-
|
|
3891
|
+
method: zod.z.enum([
|
|
3892
|
+
"default",
|
|
3893
|
+
"drop",
|
|
3894
|
+
"reply"
|
|
3895
|
+
]).optional().meta({
|
|
3896
|
+
description: "`default`: Reply with TCP RST for TCP connections, ICMP port unreachable for UDP packets, and ICMP host unreachable for ICMP echo requests. `drop`: Drop packets. `reply`: Reply with ICMP echo reply for ICMP echo requests.",
|
|
3897
|
+
description_zh: "`default`: 对 TCP 连接回复 RST,对 UDP 包回复 ICMP 端口不可达,并对 ICMP 回显请求回复 ICMP 主机不可达。`drop`: 丢弃数据包。`reply`: 对 ICMP 回显请求回复 ICMP 回显响应。"
|
|
3950
3898
|
}),
|
|
3951
3899
|
no_drop: zod.z.boolean().optional().meta({
|
|
3952
3900
|
description: "If not enabled, `method` will be temporarily overwritten to `drop` after 50 triggers in 30s.",
|
|
@@ -3957,12 +3905,13 @@ const RuleActionReject = zod.z.object({
|
|
|
3957
3905
|
title: "Rule Action Reject",
|
|
3958
3906
|
title_zh: "规则动作拒绝"
|
|
3959
3907
|
});
|
|
3908
|
+
const DirectActionDialerOptions = DialerOptions.omit({ detour: true });
|
|
3960
3909
|
const RuleActionDirect = zod.z.object({
|
|
3961
3910
|
action: zod.z.literal("direct").meta({
|
|
3962
3911
|
description: "Action type.",
|
|
3963
3912
|
description_zh: "动作类型。"
|
|
3964
3913
|
}),
|
|
3965
|
-
...
|
|
3914
|
+
...DirectActionDialerOptions.shape
|
|
3966
3915
|
}).meta({
|
|
3967
3916
|
id: "RuleActionDirect",
|
|
3968
3917
|
title: "Rule Action Direct",
|
|
@@ -4186,6 +4135,7 @@ const BaseRouteRule = zod.z.object({
|
|
|
4186
4135
|
const DefaultRouteRule = zod.z.union([
|
|
4187
4136
|
BaseRouteRule.extend(RuleActionRouteByDefault.shape),
|
|
4188
4137
|
BaseRouteRule.extend(RuleActionRoute.shape),
|
|
4138
|
+
BaseRouteRule.extend(RuleActionBypass.shape),
|
|
4189
4139
|
BaseRouteRule.extend(RuleActionReject.shape),
|
|
4190
4140
|
BaseRouteRule.extend(RuleActionHijackDNS.shape),
|
|
4191
4141
|
BaseRouteRule.extend(RuleActionRouteOptionsWithAction.shape),
|
|
@@ -4193,7 +4143,7 @@ const DefaultRouteRule = zod.z.union([
|
|
|
4193
4143
|
BaseRouteRule.extend(RuleActionResolve.shape),
|
|
4194
4144
|
BaseRouteRule.extend(RuleActionDirect.shape)
|
|
4195
4145
|
]);
|
|
4196
|
-
const
|
|
4146
|
+
const BaseLogicalRouteRule = zod.z.object({
|
|
4197
4147
|
type: zod.z.literal("logical").meta({
|
|
4198
4148
|
description: "Rule type.",
|
|
4199
4149
|
description_zh: "规则类型。"
|
|
@@ -4212,7 +4162,18 @@ const LogicalRouteRule = zod.z.object({
|
|
|
4212
4162
|
description: "Invert match result.",
|
|
4213
4163
|
description_zh: "反选匹配结果。"
|
|
4214
4164
|
})
|
|
4215
|
-
})
|
|
4165
|
+
});
|
|
4166
|
+
const LogicalRouteRule = zod.z.union([
|
|
4167
|
+
BaseLogicalRouteRule.extend(RuleActionRouteByDefault.shape),
|
|
4168
|
+
BaseLogicalRouteRule.extend(RuleActionRoute.shape),
|
|
4169
|
+
BaseLogicalRouteRule.extend(RuleActionBypass.shape),
|
|
4170
|
+
BaseLogicalRouteRule.extend(RuleActionReject.shape),
|
|
4171
|
+
BaseLogicalRouteRule.extend(RuleActionHijackDNS.shape),
|
|
4172
|
+
BaseLogicalRouteRule.extend(RuleActionRouteOptionsWithAction.shape),
|
|
4173
|
+
BaseLogicalRouteRule.extend(RuleActionSniff.shape),
|
|
4174
|
+
BaseLogicalRouteRule.extend(RuleActionResolve.shape),
|
|
4175
|
+
BaseLogicalRouteRule.extend(RuleActionDirect.shape)
|
|
4176
|
+
]).meta({
|
|
4216
4177
|
id: "LogicalRouteRule",
|
|
4217
4178
|
title: "Logical Route Rule",
|
|
4218
4179
|
title_zh: "逻辑路由规则"
|
|
@@ -4362,7 +4323,7 @@ const HeadlessRule = zod.z.union([DefaultHeadlessRule, LogicalHeadlessRule]).met
|
|
|
4362
4323
|
title_zh: "无头规则"
|
|
4363
4324
|
});
|
|
4364
4325
|
const InlineRuleSetOptions = zod.z.object({
|
|
4365
|
-
type: zod.z.literal("inline").meta({
|
|
4326
|
+
type: zod.z.literal("inline").optional().meta({
|
|
4366
4327
|
description: "Rule set type.",
|
|
4367
4328
|
description_zh: "规则集类型。"
|
|
4368
4329
|
}),
|
|
@@ -4431,7 +4392,7 @@ const RemoteRuleSetOptions = zod.z.object({
|
|
|
4431
4392
|
title: "Remote Rule Set Options",
|
|
4432
4393
|
title_zh: "远程规则集选项"
|
|
4433
4394
|
});
|
|
4434
|
-
const RuleSet = zod.z.
|
|
4395
|
+
const RuleSet = zod.z.union([
|
|
4435
4396
|
InlineRuleSetOptions,
|
|
4436
4397
|
LocalRuleSetOptions,
|
|
4437
4398
|
RemoteRuleSetOptions
|
|
@@ -4584,7 +4545,11 @@ const CCMServiceOptions = zod.z.object({
|
|
|
4584
4545
|
description: "TLS configuration, see [TLS](/configuration/shared/tls/#inbound).",
|
|
4585
4546
|
description_zh: "TLS 配置,参阅 [TLS](/zh/configuration/shared/tls/#inbound)。"
|
|
4586
4547
|
}),
|
|
4587
|
-
...ListenOptions.shape
|
|
4548
|
+
...ListenOptions.shape,
|
|
4549
|
+
detour: zod.z.string().optional().meta({
|
|
4550
|
+
description: "Outbound tag for connecting to the Claude API.",
|
|
4551
|
+
description_zh: "用于连接到 Claude API 的出站标签。"
|
|
4552
|
+
})
|
|
4588
4553
|
}).meta({
|
|
4589
4554
|
id: "CCMServiceOptions",
|
|
4590
4555
|
title: "CCM",
|
|
@@ -4643,7 +4608,7 @@ const DERPServiceOptions = zod.z.object({
|
|
|
4643
4608
|
description: "TLS configuration, see [TLS](/configuration/shared/tls/#inbound).",
|
|
4644
4609
|
description_zh: "TLS 配置,参阅 [TLS](/zh/configuration/shared/tls/#inbound)。"
|
|
4645
4610
|
}),
|
|
4646
|
-
config_path: zod.z.string().meta({
|
|
4611
|
+
config_path: zod.z.string().optional().meta({
|
|
4647
4612
|
description: "Derper configuration file path. Example: `derper.key`.",
|
|
4648
4613
|
description_zh: "Derper 配置文件路径。示例:`derper.key`。"
|
|
4649
4614
|
}),
|
|
@@ -4722,7 +4687,11 @@ const OCMServiceOptions = zod.z.object({
|
|
|
4722
4687
|
description: "TLS configuration, see [TLS](/configuration/shared/tls/#inbound).",
|
|
4723
4688
|
description_zh: "TLS 配置,参阅 [TLS](/zh/configuration/shared/tls/#inbound)。"
|
|
4724
4689
|
}),
|
|
4725
|
-
...ListenOptions.shape
|
|
4690
|
+
...ListenOptions.shape,
|
|
4691
|
+
detour: zod.z.string().optional().meta({
|
|
4692
|
+
description: "Outbound tag for connecting to the OpenAI API.",
|
|
4693
|
+
description_zh: "用于连接到 OpenAI API 的出站标签。"
|
|
4694
|
+
})
|
|
4726
4695
|
}).meta({
|
|
4727
4696
|
id: "OCMServiceOptions",
|
|
4728
4697
|
title: "OCM",
|
|
@@ -4849,17 +4818,18 @@ const Configuration = zod.z.object({
|
|
|
4849
4818
|
experimental: ExperimentalOptions.optional()
|
|
4850
4819
|
}).meta({
|
|
4851
4820
|
id: "Configuration",
|
|
4852
|
-
title: "Sing-box v1.13.
|
|
4853
|
-
title_zh: "Sing-box v1.13.
|
|
4854
|
-
description: "Sing-box v1.13.
|
|
4855
|
-
description_zh: "Sing-box v1.13.
|
|
4856
|
-
version: "1.13.
|
|
4821
|
+
title: "Sing-box v1.13.13 Configuration",
|
|
4822
|
+
title_zh: "Sing-box v1.13.13 配置文件",
|
|
4823
|
+
description: "Sing-box v1.13.13 configuration file schema. Sing-box uses JSON for configuration files with log, dns, ntp, certificate, endpoints, inbounds, outbounds, route, services, and experimental sections.",
|
|
4824
|
+
description_zh: "Sing-box v1.13.13 配置文件定义。sing-box 使用 JSON 作为配置文件格式,包含 log、dns、ntp、certificate、endpoints、inbounds、outbounds、route、services 与 experimental 字段。",
|
|
4825
|
+
version: "1.13.13"
|
|
4857
4826
|
});
|
|
4858
4827
|
|
|
4859
4828
|
//#endregion
|
|
4860
4829
|
exports.AnyTLSInboundOptions = AnyTLSInboundOptions;
|
|
4861
4830
|
exports.AnyTLSOutboundOptions = AnyTLSOutboundOptions;
|
|
4862
4831
|
exports.AnyTLSUser = AnyTLSUser;
|
|
4832
|
+
exports.BlockOutboundOptions = BlockOutboundOptions;
|
|
4863
4833
|
exports.CertificateOptions = CertificateOptions;
|
|
4864
4834
|
exports.Configuration = Configuration;
|
|
4865
4835
|
exports.DHCPDNSServerOptions = DHCPDNSServerOptions;
|
|
@@ -4897,19 +4867,17 @@ exports.HysteriaOutboundOptions = HysteriaOutboundOptions;
|
|
|
4897
4867
|
exports.HysteriaUser = HysteriaUser;
|
|
4898
4868
|
exports.Inbound = Inbound;
|
|
4899
4869
|
exports.InboundMultiplexOptions = InboundMultiplexOptions;
|
|
4900
|
-
exports.InboundOptions = InboundOptions;
|
|
4901
4870
|
exports.InboundTLSOptions = InboundTLSOptions;
|
|
4902
4871
|
exports.IpVersion = IpVersion;
|
|
4903
4872
|
exports.LegacyDNSFakeIPOptions = LegacyDNSFakeIPOptions;
|
|
4904
4873
|
exports.LegacyDNSServerOptions = LegacyDNSServerOptions;
|
|
4905
|
-
exports.LegacyWireGuardOutboundOptions = LegacyWireGuardOutboundOptions;
|
|
4906
|
-
exports.LegacyWireGuardPeer = LegacyWireGuardPeer;
|
|
4907
4874
|
exports.ListenOptions = ListenOptions;
|
|
4908
4875
|
exports.LocalDNSServerOptions = LocalDNSServerOptions;
|
|
4909
4876
|
exports.LogOptions = LogOptions;
|
|
4910
4877
|
exports.MixedInboundOptions = MixedInboundOptions;
|
|
4911
4878
|
exports.NTPOptions = NTPOptions;
|
|
4912
4879
|
exports.NaiveInboundOptions = NaiveInboundOptions;
|
|
4880
|
+
exports.NaiveOutboundOptions = NaiveOutboundOptions;
|
|
4913
4881
|
exports.Network = Network;
|
|
4914
4882
|
exports.NetworkStrategy = NetworkStrategy;
|
|
4915
4883
|
exports.NetworkType = NetworkType;
|
|
@@ -4931,7 +4899,6 @@ exports.ShadowTLSOutboundOptions = ShadowTLSOutboundOptions;
|
|
|
4931
4899
|
exports.ShadowsocksDestination = ShadowsocksDestination;
|
|
4932
4900
|
exports.ShadowsocksInboundOptions = ShadowsocksInboundOptions;
|
|
4933
4901
|
exports.ShadowsocksOutboundOptions = ShadowsocksOutboundOptions;
|
|
4934
|
-
exports.ShadowsocksROutboundOptions = ShadowsocksROutboundOptions;
|
|
4935
4902
|
exports.ShadowsocksUser = ShadowsocksUser;
|
|
4936
4903
|
exports.SocksInboundOptions = SocksInboundOptions;
|
|
4937
4904
|
exports.SocksOutboundOptions = SocksOutboundOptions;
|