Files
3x-ui/frontend/src/schemas/primitives/options.ts
T
MHSanaei 814cda3fb4 feat(xray): update xray-core to v26.7.11 and adapt panel
Bump xtls/xray-core to 50231eaf (v26.7.11) and the three binary pins
(DockerInit.sh, release.yml x2) in lockstep.

Adapt the panel to the upstream changes:

- Shadowsocks "none"/"plain" and VMess "none"/"zero" were removed from
  the core. A migration rewrites stored none/plain SS methods to a
  supported cipher and none/zero VMess security to "auto" (on both the
  clients column and inbound settings JSON); the SS build-time heal does
  the same so a row injected after boot cannot brick startup. The removed
  values are dropped from every frontend option list, schema and adapter,
  and coerced to "auto" at the Go link/sub/Clash emit sites and both link
  importers. Fix the CipherType_NONE sentinel that no longer compiles.

- Unencrypted vless/trojan outbounds to a public address are now refused
  by the core. Validate outbounds through the vendored config loader when
  saving the xray template and when storing/merging outbound
  subscriptions, so one such outbound cannot keep the core from starting.

- New TCP finalmask type "xmc" (Minecraft mimicry): add it to the sub
  link allowlist, the frontend enum and the FinalMask form (hostname,
  usernames, required password), and document it.

- streamSettings gained a "method" alias for "network"; canonicalize it
  to "network" at inbound save time and in the form adapters/schema so a
  method-keyed config keeps its transport.

- New root "env" config key is passed through xray.Config, compared in
  Equals, and forces a restart in the hot diff.

- REALITY now defaults minClientVer to 26.3.27; update the form
  placeholder.
2026-07-12 00:30:47 +02:00

110 lines
2.9 KiB
TypeScript

export const UTLS_FINGERPRINT = Object.freeze({
UTLS_CHROME: 'chrome',
UTLS_FIREFOX: 'firefox',
UTLS_SAFARI: 'safari',
UTLS_IOS: 'ios',
UTLS_android: 'android',
UTLS_EDGE: 'edge',
UTLS_360: '360',
UTLS_QQ: 'qq',
UTLS_RANDOM: 'random',
UTLS_RANDOMIZED: 'randomized',
UTLS_RONDOMIZEDNOALPN: 'randomizednoalpn',
UTLS_UNSAFE: 'unsafe',
});
export const ALPN_OPTION = Object.freeze({
H3: 'h3',
H2: 'h2',
HTTP1: 'http/1.1',
});
export const SNIFFING_OPTION = Object.freeze({
HTTP: 'http',
TLS: 'tls',
QUIC: 'quic',
FAKEDNS: 'fakedns',
});
export const USERS_SECURITY = Object.freeze({
AES_128_GCM: 'aes-128-gcm',
CHACHA20_POLY1305: 'chacha20-poly1305',
AUTO: 'auto',
});
export const MODE_OPTION = Object.freeze({
AUTO: 'auto',
PACKET_UP: 'packet-up',
STREAM_UP: 'stream-up',
STREAM_ONE: 'stream-one',
});
export const WireguardDomainStrategy = Object.freeze([
'ForceIP',
'ForceIPv4',
'ForceIPv4v6',
'ForceIPv6',
'ForceIPv6v4',
] as const);
export const Address_Port_Strategy = Object.freeze({
NONE: 'none',
SRV_PORT_ONLY: 'SrvPortOnly',
SRV_ADDRESS_ONLY: 'SrvAddressOnly',
SRV_PORT_AND_ADDRESS: 'SrvPortAndAddress',
TXT_PORT_ONLY: 'TxtPortOnly',
TXT_ADDRESS_ONLY: 'TxtAddressOnly',
TXT_PORT_AND_ADDRESS: 'TxtPortAndAddress',
});
export const DNSRuleActions = Object.freeze(['direct', 'drop', 'return', 'hijack'] as const);
export const TLS_VERSION_OPTION = Object.freeze({
TLS10: '1.0',
TLS11: '1.1',
TLS12: '1.2',
TLS13: '1.3',
});
export const TLS_CIPHER_OPTION = Object.freeze({
AES_128_GCM: 'TLS_AES_128_GCM_SHA256',
AES_256_GCM: 'TLS_AES_256_GCM_SHA384',
CHACHA20_POLY1305: 'TLS_CHACHA20_POLY1305_SHA256',
ECDHE_ECDSA_AES_128_CBC: 'TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA',
ECDHE_ECDSA_AES_256_CBC: 'TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA',
ECDHE_RSA_AES_128_CBC: 'TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA',
ECDHE_RSA_AES_256_CBC: 'TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA',
ECDHE_ECDSA_AES_128_GCM: 'TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256',
ECDHE_ECDSA_AES_256_GCM: 'TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384',
ECDHE_RSA_AES_128_GCM: 'TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256',
ECDHE_RSA_AES_256_GCM: 'TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384',
ECDHE_ECDSA_CHACHA20_POLY1305: 'TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256',
ECDHE_RSA_CHACHA20_POLY1305: 'TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256',
});
export const USAGE_OPTION = Object.freeze({
ENCIPHERMENT: 'encipherment',
VERIFY: 'verify',
ISSUE: 'issue',
});
export const DOMAIN_STRATEGY_OPTION = Object.freeze({
AS_IS: 'AsIs',
USE_IP: 'UseIP',
USE_IPV6V4: 'UseIPv6v4',
USE_IPV6: 'UseIPv6',
USE_IPV4V6: 'UseIPv4v6',
USE_IPV4: 'UseIPv4',
FORCE_IP: 'ForceIP',
FORCE_IPV6V4: 'ForceIPv6v4',
FORCE_IPV6: 'ForceIPv6',
FORCE_IPV4V6: 'ForceIPv4v6',
FORCE_IPV4: 'ForceIPv4',
});
export const TCP_CONGESTION_OPTION = Object.freeze({
BBR: 'bbr',
CUBIC: 'cubic',
RENO: 'reno',
});