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;
|
2024-08-15 11:39:12 +01:00
|
|
|
folder: PathLike;
|
2024-08-21 22:58:02 +01:00
|
|
|
fastresume: boolean;
|
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;
|
2024-08-24 00:34:57 +01:00
|
|
|
|
|
|
|
|
enable_server: boolean;
|
|
|
|
|
server_friendly_name: string;
|
2023-12-06 15:29:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export interface RqbitDesktopConfig {
|
2023-12-07 14:11:12 +00:00
|
|
|
default_download_location: PathLike;
|
2024-08-29 10:23:07 +01:00
|
|
|
disable_upload: boolean;
|
2023-12-07 14:11:12 +00:00
|
|
|
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;
|
|
|
|
|
}
|