2023-12-06 15:29:11 +00:00
|
|
|
type PathLike = string;
|
|
|
|
|
type Duration = string;
|
|
|
|
|
type SocketAddr = string;
|
|
|
|
|
|
|
|
|
|
interface RqbitDesktopConfigDht {
|
2023-12-07 14:11:12 +00:00
|
|
|
disable: boolean;
|
|
|
|
|
disable_persistence: boolean;
|
|
|
|
|
persistence_filename: PathLike;
|
2023-12-06 15:29:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
interface RqbitDesktopConfigTcpListen {
|
2023-12-07 14:11:12 +00:00
|
|
|
disable: boolean;
|
|
|
|
|
min_port: number;
|
|
|
|
|
max_port: number;
|
2023-12-06 15:29:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
interface RqbitDesktopConfigPersistence {
|
2023-12-07 14:11:12 +00:00
|
|
|
disable: boolean;
|
|
|
|
|
filename: PathLike;
|
2023-12-06 15:29:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
interface RqbitDesktopConfigPeerOpts {
|
2023-12-07 14:11:12 +00:00
|
|
|
connect_timeout: Duration;
|
|
|
|
|
read_write_timeout: Duration;
|
2023-12-06 15:29:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
interface RqbitDesktopConfigHttpApi {
|
2023-12-07 14:11:12 +00:00
|
|
|
disable: boolean;
|
|
|
|
|
listen_addr: SocketAddr;
|
|
|
|
|
read_only: boolean;
|
2023-12-08 19:47:48 +00:00
|
|
|
cors_enable_all: boolean;
|
2023-12-06 15:29:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
interface RqbitDesktopConfigUpnp {
|
2023-12-07 14:11:12 +00:00
|
|
|
disable: boolean;
|
2023-12-06 15:29:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface RqbitDesktopConfig {
|
2023-12-07 14:11:12 +00:00
|
|
|
default_download_location: PathLike;
|
|
|
|
|
dht: RqbitDesktopConfigDht;
|
|
|
|
|
tcp_listen: RqbitDesktopConfigTcpListen;
|
|
|
|
|
upnp: RqbitDesktopConfigUpnp;
|
|
|
|
|
persistence: RqbitDesktopConfigPersistence;
|
|
|
|
|
peer_opts: RqbitDesktopConfigPeerOpts;
|
|
|
|
|
http_api: RqbitDesktopConfigHttpApi;
|
2023-12-06 15:29:11 +00:00
|
|
|
}
|
2023-12-07 00:13:11 +00:00
|
|
|
|
|
|
|
|
export interface CurrentDesktopState {
|
2023-12-07 14:11:12 +00:00
|
|
|
config: RqbitDesktopConfig | null;
|
|
|
|
|
configured: boolean;
|
|
|
|
|
}
|