mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-11-30 06:24:46 +03:00
7c8889466b
TLS: add verifyPeerCertByName (vcn) to inbound settings + emit in both share-link generators (frontend + Go sub) and outbound parser; the allowInsecure replacement xray removed after 2026-06-01. Add server-side curvePreferences, masterKeyLog, echSockopt (passthrough + form) at tlsSettings top-level so they survive the panel-only settings strip. REALITY: add limitFallbackUpload/Download (afterBytes/bytesPerSec/burstBytesPerSec) with per-field tooltips, plus masterKeyLog. Verified field names/semantics against pinned xray v1.260327.1 (bytesPerSec=0 disables). Hosts: fix verify_peer_cert_by_name column bool->string (xray expects comma-separated names) with an idempotent, history-gate-free migration (SQLite typeof blank; Postgres ALTER once); emit vcn for hosts/external proxies. Server: add getCertHash (local cert DER SHA-256) and getRemoteCertHash (xray tls ping) endpoints + api-docs; wire pinned-cert field buttons. Drop the meaningless random-hash button. Xray UI: metrics endpoint (listen/tag) config in Basics; import/export for routing rules and outbounds. Fallbacks card: compact empty state, header-aligned actions, responsive labeled grid rows. i18n: add all new keys to every locale; drop unused generateRandomPin.
30 lines
1.2 KiB
TypeScript
30 lines
1.2 KiB
TypeScript
import { z } from 'zod';
|
|
|
|
import { PortSchema } from '@/schemas/primitives';
|
|
|
|
import { AlpnSchema, UtlsFingerprintSchema } from '@/schemas/protocols/security/tls';
|
|
|
|
export const ExternalProxyForceTlsSchema = z.enum(['same', 'tls', 'none']);
|
|
export type ExternalProxyForceTls = z.infer<typeof ExternalProxyForceTlsSchema>;
|
|
|
|
// An inbound can advertise external proxy fronts (CDN edges, mirror nodes)
|
|
// that share its config but vary the dest+port+SNI for the share link. The
|
|
// panel form ships rows of this shape; link generators iterate them when
|
|
// stream.externalProxy is non-empty.
|
|
export const ExternalProxyEntrySchema = z.object({
|
|
forceTls: ExternalProxyForceTlsSchema.default('same'),
|
|
dest: z.string().default(''),
|
|
port: PortSchema.default(443),
|
|
remark: z.string().default(''),
|
|
sni: z.string().optional(),
|
|
fingerprint: z.preprocess(
|
|
(val) => (val === '' ? undefined : val),
|
|
UtlsFingerprintSchema.optional(),
|
|
),
|
|
alpn: z.array(AlpnSchema).optional(),
|
|
pinnedPeerCertSha256: z.array(z.string()).optional(),
|
|
verifyPeerCertByName: z.string().optional(),
|
|
echConfigList: z.string().optional(),
|
|
});
|
|
export type ExternalProxyEntry = z.infer<typeof ExternalProxyEntrySchema>;
|