feat(config): Protocol type

This commit is contained in:
web@ppanel
2024-12-07 17:15:13 +07:00
parent 0327b73708
commit a3b45b455d
6 changed files with 8016 additions and 2695 deletions
+18 -2
View File
@@ -558,6 +558,17 @@ declare namespace API {
data?: Record<string, any>;
};
type SecurityConfig = {
server_address?: string;
server_name?: string;
server_port?: number;
fingerprint?: string;
private_key?: string;
public_key?: string;
short_id?: string;
allow_insecure?: boolean;
};
type Server = {
id: number;
name: string;
@@ -665,6 +676,11 @@ declare namespace API {
updated_at: number;
};
type TLSConfig = {
server_name?: string;
allow_insecure?: boolean;
};
type TosConfig = {
tos_content: string;
};
@@ -873,7 +889,7 @@ declare namespace API {
network: string;
transport: Record<string, any>;
security: string;
security_config: Record<string, any>;
security_config: SecurityConfig;
xtls: string;
enable_relay: boolean;
relay_host: string;
@@ -884,7 +900,7 @@ declare namespace API {
host: string;
port: number;
enable_tls: boolean;
tls_config: Record<string, any>;
tls_config: TLSConfig;
network: string;
transport: Record<string, any>;
enable_relay: boolean;