UNPKG

@herbertgao/surgio

Version:

Generating rules for Surge, Clash, Quantumult like a PRO

198 lines (197 loc) 7.53 kB
import { z } from 'zod'; import { NodeTypeEnum } from '../types'; export declare const Hysteria2NodeConfigValidator: z.ZodObject<{ nodeName: z.ZodString; enable: z.ZodOptional<z.ZodBoolean>; tfo: z.ZodOptional<z.ZodBoolean>; mptcp: z.ZodOptional<z.ZodBoolean>; ecn: z.ZodOptional<z.ZodBoolean>; shadowTls: z.ZodOptional<z.ZodObject<{ version: z.ZodOptional<z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, string | number, string | number>>; password: z.ZodString; sni: z.ZodString; }, "strip", z.ZodTypeAny, { password: string; sni: string; version?: string | number | undefined; }, { password: string; sni: string; version?: string | number | undefined; }>>; blockQuic: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodLiteral<"on">, z.ZodLiteral<"off">]>>; portHopping: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; portHoppingInterval: z.ZodOptional<z.ZodNumber>; underlyingProxy: z.ZodOptional<z.ZodString>; testUrl: z.ZodOptional<z.ZodString>; testTimeout: z.ZodOptional<z.ZodNumber>; surgeConfig: z.ZodOptional<z.ZodObject<{ resolveHostname: z.ZodOptional<z.ZodBoolean>; vmessAEAD: z.ZodOptional<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { resolveHostname?: boolean | undefined; vmessAEAD?: boolean | undefined; }, { resolveHostname?: boolean | undefined; vmessAEAD?: boolean | undefined; }>>; surfboardConfig: z.ZodOptional<z.ZodObject<{ vmessAEAD: z.ZodOptional<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { vmessAEAD?: boolean | undefined; }, { vmessAEAD?: boolean | undefined; }>>; quantumultXConfig: z.ZodOptional<z.ZodObject<{ vmessAEAD: z.ZodOptional<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { vmessAEAD?: boolean | undefined; }, { vmessAEAD?: boolean | undefined; }>>; clashConfig: z.ZodOptional<z.ZodObject<{ enableTuic: z.ZodOptional<z.ZodBoolean>; enableShadowTls: z.ZodOptional<z.ZodBoolean>; enableHysteria2: z.ZodOptional<z.ZodBoolean>; enableVless: z.ZodOptional<z.ZodBoolean>; clashCore: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"clash">, z.ZodLiteral<"clash.meta">, z.ZodLiteral<"stash">]>>; }, "strip", z.ZodTypeAny, { enableTuic?: boolean | undefined; enableShadowTls?: boolean | undefined; enableHysteria2?: boolean | undefined; enableVless?: boolean | undefined; clashCore?: "clash" | "clash.meta" | "stash" | undefined; }, { enableTuic?: boolean | undefined; enableShadowTls?: boolean | undefined; enableHysteria2?: boolean | undefined; enableVless?: boolean | undefined; clashCore?: "clash" | "clash.meta" | "stash" | undefined; }>>; hostnameIp: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString, "many">>>; binPath: z.ZodOptional<z.ZodString>; localPort: z.ZodOptional<z.ZodNumber>; interfaceName: z.ZodOptional<z.ZodString>; ipVersion: z.ZodOptional<z.ZodString>; hostname: z.ZodString; port: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber]>, string | number, string | number>; tls13: z.ZodOptional<z.ZodBoolean>; skipCertVerify: z.ZodOptional<z.ZodBoolean>; sni: z.ZodOptional<z.ZodString>; alpn: z.ZodOptional<z.ZodArray<z.ZodString, "atleastone">>; serverCertFingerprintSha256: z.ZodOptional<z.ZodString>; clientFingerprint: z.ZodOptional<z.ZodString>; } & { type: z.ZodLiteral<NodeTypeEnum.Hysteria2>; password: z.ZodString; downloadBandwidth: z.ZodOptional<z.ZodNumber>; uploadBandwidth: z.ZodOptional<z.ZodNumber>; obfs: z.ZodOptional<z.ZodLiteral<"salamander">>; obfsPassword: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { port: string | number; type: NodeTypeEnum.Hysteria2; nodeName: string; password: string; hostname: string; enable?: boolean | undefined; tfo?: boolean | undefined; mptcp?: boolean | undefined; ecn?: boolean | undefined; sni?: string | undefined; shadowTls?: { password: string; sni: string; version?: string | number | undefined; } | undefined; blockQuic?: "auto" | "on" | "off" | undefined; portHopping?: string | undefined; portHoppingInterval?: number | undefined; underlyingProxy?: string | undefined; testUrl?: string | undefined; testTimeout?: number | undefined; surgeConfig?: { resolveHostname?: boolean | undefined; vmessAEAD?: boolean | undefined; } | undefined; surfboardConfig?: { vmessAEAD?: boolean | undefined; } | undefined; quantumultXConfig?: { vmessAEAD?: boolean | undefined; } | undefined; clashConfig?: { enableTuic?: boolean | undefined; enableShadowTls?: boolean | undefined; enableHysteria2?: boolean | undefined; enableVless?: boolean | undefined; clashCore?: "clash" | "clash.meta" | "stash" | undefined; } | undefined; hostnameIp?: readonly string[] | undefined; binPath?: string | undefined; localPort?: number | undefined; interfaceName?: string | undefined; ipVersion?: string | undefined; tls13?: boolean | undefined; skipCertVerify?: boolean | undefined; alpn?: [string, ...string[]] | undefined; serverCertFingerprintSha256?: string | undefined; clientFingerprint?: string | undefined; obfs?: "salamander" | undefined; downloadBandwidth?: number | undefined; uploadBandwidth?: number | undefined; obfsPassword?: string | undefined; }, { port: string | number; type: NodeTypeEnum.Hysteria2; nodeName: string; password: string; hostname: string; enable?: boolean | undefined; tfo?: boolean | undefined; mptcp?: boolean | undefined; ecn?: boolean | undefined; sni?: string | undefined; shadowTls?: { password: string; sni: string; version?: string | number | undefined; } | undefined; blockQuic?: "auto" | "on" | "off" | undefined; portHopping?: string | undefined; portHoppingInterval?: number | undefined; underlyingProxy?: string | undefined; testUrl?: string | undefined; testTimeout?: number | undefined; surgeConfig?: { resolveHostname?: boolean | undefined; vmessAEAD?: boolean | undefined; } | undefined; surfboardConfig?: { vmessAEAD?: boolean | undefined; } | undefined; quantumultXConfig?: { vmessAEAD?: boolean | undefined; } | undefined; clashConfig?: { enableTuic?: boolean | undefined; enableShadowTls?: boolean | undefined; enableHysteria2?: boolean | undefined; enableVless?: boolean | undefined; clashCore?: "clash" | "clash.meta" | "stash" | undefined; } | undefined; hostnameIp?: readonly string[] | undefined; binPath?: string | undefined; localPort?: number | undefined; interfaceName?: string | undefined; ipVersion?: string | undefined; tls13?: boolean | undefined; skipCertVerify?: boolean | undefined; alpn?: [string, ...string[]] | undefined; serverCertFingerprintSha256?: string | undefined; clientFingerprint?: string | undefined; obfs?: "salamander" | undefined; downloadBandwidth?: number | undefined; uploadBandwidth?: number | undefined; obfsPassword?: string | undefined; }>;