✨ feat(node): Add protocol
This commit is contained in:
+43
-45
@@ -115,6 +115,14 @@ declare namespace API {
|
||||
tos_content: string;
|
||||
};
|
||||
|
||||
type Hysteria2 = {
|
||||
port: number;
|
||||
hop_ports: string;
|
||||
hop_interval: number;
|
||||
obfs_password: string;
|
||||
security_config: SecurityConfig;
|
||||
};
|
||||
|
||||
type InviteConfig = {
|
||||
forced_invite: boolean;
|
||||
referral_percentage: number;
|
||||
@@ -218,14 +226,12 @@ declare namespace API {
|
||||
};
|
||||
|
||||
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;
|
||||
sni: string;
|
||||
allow_insecure: boolean;
|
||||
fingerprint: string;
|
||||
reality_private_key: string;
|
||||
reality_public_key: string;
|
||||
reality_short_id: string;
|
||||
};
|
||||
|
||||
type SendCodeRequest = {
|
||||
@@ -241,15 +247,15 @@ declare namespace API {
|
||||
id: number;
|
||||
name: string;
|
||||
server_addr: string;
|
||||
enable_relay: boolean;
|
||||
relay_host: string;
|
||||
relay_port: number;
|
||||
speed_limit: number;
|
||||
traffic_ratio: number;
|
||||
groupId: number;
|
||||
group_id: number;
|
||||
protocol: string;
|
||||
config: Record<string, any>;
|
||||
enable: boolean;
|
||||
vmess?: Vmess;
|
||||
vless?: Vless;
|
||||
trojan?: Trojan;
|
||||
shadowsocks?: Shadowsocks;
|
||||
created_at: number;
|
||||
updated_at: number;
|
||||
last: Push;
|
||||
@@ -266,9 +272,7 @@ declare namespace API {
|
||||
type Shadowsocks = {
|
||||
method: string;
|
||||
port: number;
|
||||
enable_relay: boolean;
|
||||
relay_host: string;
|
||||
relay_port: number;
|
||||
server_key: string;
|
||||
};
|
||||
|
||||
type SiteConfig = {
|
||||
@@ -340,25 +344,27 @@ declare namespace API {
|
||||
updated_at: number;
|
||||
};
|
||||
|
||||
type TLSConfig = {
|
||||
server_name?: string;
|
||||
allow_insecure?: boolean;
|
||||
};
|
||||
|
||||
type TosConfig = {
|
||||
tos_content: string;
|
||||
};
|
||||
|
||||
type Trojan = {
|
||||
network: string;
|
||||
port: number;
|
||||
type TransportConfig = {
|
||||
path: string;
|
||||
host: string;
|
||||
sni: string;
|
||||
allow_insecure: boolean;
|
||||
transport: Record<string, any>;
|
||||
enable_relay: boolean;
|
||||
relay_host: string;
|
||||
relay_port: number;
|
||||
server_name: string;
|
||||
};
|
||||
|
||||
type Trojan = {
|
||||
port: number;
|
||||
transport: string;
|
||||
transport_config: TransportConfig;
|
||||
security: string;
|
||||
security_config: SecurityConfig;
|
||||
};
|
||||
|
||||
type Tuic = {
|
||||
port: number;
|
||||
security_config: SecurityConfig;
|
||||
};
|
||||
|
||||
type User = {
|
||||
@@ -448,27 +454,19 @@ declare namespace API {
|
||||
};
|
||||
|
||||
type Vless = {
|
||||
host: string;
|
||||
port: number;
|
||||
network: string;
|
||||
transport: Record<string, any>;
|
||||
flow: string;
|
||||
transport: string;
|
||||
transport_config: TransportConfig;
|
||||
security: string;
|
||||
security_config: SecurityConfig;
|
||||
xtls: string;
|
||||
enable_relay: boolean;
|
||||
relay_host: string;
|
||||
relay_port: number;
|
||||
};
|
||||
|
||||
type Vmess = {
|
||||
host: string;
|
||||
port: number;
|
||||
enable_tls: boolean;
|
||||
tls_config: TLSConfig;
|
||||
network: string;
|
||||
transport: Record<string, any>;
|
||||
enable_relay: boolean;
|
||||
relay_host: string;
|
||||
relay_port: number;
|
||||
transport: string;
|
||||
transport_config: TransportConfig;
|
||||
security: string;
|
||||
security_config: SecurityConfig;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user