async addFtp(...args) {
		let stopConnection = false;
		const {
			username, //
			password,
			hostname,
			port,
			ftps,
			active,
			alias,
		} = await prompt(...args);
		const security = ftps ? "ftps" : "ftp";
		const mode = active ? "active" : "passive";
		const ftp = Ftp(hostname, username, password, port, security, mode);
		try {
			loader.create(strings["add ftp"], strings["connecting..."], {
				timeout: 10000,
				callback() {
					stopConnection = true;
				},
			});
			const [home] = await Promise.all([ftp.getWorkingDirectory(), loadAd()]);

			if (stopConnection) {
				stopConnection = false;
				return;
			}

			const url = Url.formate({
				protocol: "ftp:",
				username,
				password,
				hostname,
				port,
				path: "/",
				query: {
					mode,
					security,
				},
			});

			const res = {
				url,
				alias,
				name: alias,
				type: "ftp",
				home: null,
			};

			if (home !== "/") {
				res.home = home;
			}
			loader.destroy();
			if (IS_FREE_VERSION && (await window.iad?.isLoaded())) {
				window.iad.show();
			}
			return res;
		} catch (err) {
			if (stopConnection) {
				stopConnection = false;
				return;
			}

			loader.destroy();
			await helpers.error(err);
			return await this.addFtp(
				username,
				password,
				hostname,
				alias,
				port,
				security,
				mode,
			);
		}

		function prompt(username, password, hostname, alias, port, security, mode) {
			port = port || 21;
			security = security || "ftp";
			mode = mode || "passive";
			return multiPrompt(strings["add ftp"], [
				{
					id: "alias",
					placeholder: strings.name,
					type: "text",
					value: alias ? alias : "",
					required: true,
				},
				{
					id: "username",
					placeholder: `${strings.username} (${strings.optional})`,
					type: "text",
					value: username,
				},
				{
					id: "hostname",
					placeholder: strings.hostname,
					type: "text",
					required: true,
					value: hostname,
				},
				{
					id: "password",
					placeholder: `${strings.password} (${strings.optional})`,
					type: "password",
					value: password,
				},
				[
					`${strings["security type"]}: `,
					{
						id: "ftp",
						placeholder: "FTP",
						name: "type",
						type: "radio",
						value: security === "ftp" ? true : false,
					},
					{
						id: "ftps",
						placeholder: "FTPS",
						name: "type",
						type: "radio",
						value: security === "ftps" ? true : false,
					},
				],
				[
					`${strings["connection mode"]}: `,
					{
						id: "active",
						placeholder: "Active",
						name: "mode",
						type: "radio",
						value: mode === "active" ? true : false,
					},
					{
						id: "passive",
						placeholder: "Passive",
						name: "mode",
						type: "radio",
						value: mode === "passive" ? true : false,
					},
				],
				{
					id: "port",
					placeholder: `${strings.port} (${strings.optional})`,
					type: "number",
					value: port,
				},
			]);
		}
	}
@param  {...any} args [username, password, hostname, port, ftps, active, name]