WG/src/types/graph.ts
2026-01-31 19:55:33 +08:00

35 lines
603 B
TypeScript

import { Node, Edge } from '@xyflow/react';
export type AppNode = Node<NodeData>;
export type AppEdge = Edge<EdgeData>;
export type NodeData = {
// basic
label: string;
subnet: string;
privateKey: string;
publicKey: string;
// options
PostUp?: string;
PostDown?: string;
persistentKeepalive?: string;
dnsServers?: string;
disallowSubnet?: string;
allowIPs?: string;
MTU?: number
}
export type EdgeData = {
isTwoWayEdge: boolean
}
export type Settings = {
v4SubNetPrefix: string;
v6SubNetPrefix: string;
listenPort: string;
// global options
MTU?: number;
}