hysteria2.ts 437 B

123456789101112
  1. import { z } from 'zod';
  2. import { PortSchema } from '@/schemas/primitives';
  3. // Outbound counterpart to hysteria2 — same {address, port} connect descriptor
  4. // as hysteria, but version locked to 2.
  5. export const Hysteria2OutboundSettingsSchema = z.object({
  6. address: z.string().min(1),
  7. port: PortSchema,
  8. version: z.literal(2).default(2),
  9. });
  10. export type Hysteria2OutboundSettings = z.infer<typeof Hysteria2OutboundSettingsSchema>;