misterdownloadmanager: The ultimate open-source, clean-room download manager written from scratch in pure Rust for Windows, Mac, and Linux
Rust bittorrent-clientdebriddownload-acceleratordownload-managerdownloadmanagereguifile-downloadergallery-dlidmidm-alternativeinternet-download-managerm3u8-downloadermagnetplaylist-downloaderreal-debridrusttorrent-clientvideo-downloaderyoutube-downloaderyt-dlp
Far more file types taken from the browser by default (#387)
Ahmed Nefzaoui8809a5aa891d
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 184eae2d..e86a53ae 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -12,6 +12,7 @@ Each release's notes on GitHub come from its section here (`## [X.Y.Z]`, see- Windows: no more crash when a screen is unplugged, turned off or rearranged while MDM runs ([#335](https://github.com/anefzaoui/misterdownloadmanager/issues/335)).### Added+- **Far more file types taken from the browser by default** ([#382](https://github.com/anefzaoui/misterdownloadmanager/issues/382)): AI models and datasets (GGUF, SAFETENSORS, CKPT, PT, ONNX, PARQUET...), 3D and CAD (GLB, FBX, OBJ, STL, BLEND, STEP...), design and camera RAW files, ebooks, Office files, disk images and split archives. A list you never edited gains them; one you edited stays yours.- Help: what to do when an antivirus or VirusTotal flags MDM, and how to check your copy is the real one.### Fixeddiff --git a/ROADMAP.md b/ROADMAP.mdindex 54119a36..0f7a8957 100644--- a/ROADMAP.md+++ b/ROADMAP.md@@ -119,6 +119,9 @@ Everything below ships together, in version 0.5.0.- ✅ More file types taken from the browser by default: DMG, PKG, DEB, RPM, APPIMAGE, MSIX, APPX,CAB, JAR, XZ, ZST, WEBM, FLAC, OPUS and others; a list never edited gains them([#208](https://github.com/anefzaoui/misterdownloadmanager/issues/208))+- ✅ Far more file types taken by default: AI models and datasets, 3D and CAD, design and camera+ RAW, ebooks, Office, disk images and split archives; a list never edited gains them+ ([#382](https://github.com/anefzaoui/misterdownloadmanager/issues/382))- ✅ Windows: Download File Info and the progress window open in front of the browser, even whenWindows doesn't let MDM take the foreground; the keyboard stays where it was until a click([#208](https://github.com/anefzaoui/misterdownloadmanager/issues/208))diff --git a/crates/app/src/app.rs b/crates/app/src/app.rsindex 4d37f6e9..1559113a 100644--- a/crates/app/src/app.rs+++ b/crates/app/src/app.rs@@ -2883,7 +2883,7 @@ impl App {return;};let name = mdm_engine::naming::file_name(None, &url);- if mdm_engine::supported(&url) && self.settings.auto_type(&name) {+ if mdm_engine::supported(&url) && self.settings.clipboard_type(&name) {let cmd = ipc::Command {url: Some(text),..Default::default()diff --git a/crates/app/src/settings.rs b/crates/app/src/settings.rsindex f11ff49b..15e75f1f 100644--- a/crates/app/src/settings.rs+++ b/crates/app/src/settings.rs@@ -755,10 +755,10 @@ impl Settings {.map(|(_, user, pass)| (user.clone(), pass.clone()))}- /// Options → File types: whether a file name has one of the listed types (`R0*` is a- /// prefix pattern).- pub fn auto_type(&self, name: &str) -> bool {- mdm_ipc::capture::type_listed(&self.auto_types, name)+ /// Should a copied link named `name` be offered? Fewer types than a browser hands over+ /// (`mdm_ipc::capture::clipboard_type`).+ pub fn clipboard_type(&self, name: &str) -> bool {+ mdm_ipc::capture::clipboard_type(&self.auto_types, name)}/// Set (or forget, with `None`) the category's own folder.@@ -1102,8 +1102,9 @@ mod tests {#[test]fn listed_file_types() {let s = Settings::default();- assert!(s.auto_type("setup.EXE") && s.auto_type("a.r01") && s.auto_type("x.zip"));- assert!(!s.auto_type("page.html") && !s.auto_type("noext"));+ let listed = |name| mdm_ipc::capture::type_listed(&s.auto_types, name);+ assert!(listed("setup.EXE") && listed("a.r01") && listed("x.zip"));+ assert!(!listed("page.html") && !listed("noext"));}#[test]diff --git a/crates/app/src/store.rs b/crates/app/src/store.rsindex fe574890..95ad449f 100644--- a/crates/app/src/store.rs+++ b/crates/app/src/store.rs@@ -537,7 +537,10 @@ mod tests {std::fs::write(&p, list(old)).unwrap();let s = load_from(&p, empty()).settings;assert_eq!(s.auto_types, mdm_ipc::capture::DEFAULT_AUTO_TYPES);- assert!(s.auto_type("MDM-0.3.0.dmg") && s.auto_type("mdm_0.3.0_amd64.deb"));+ assert!(+ mdm_ipc::capture::type_listed(&s.auto_types, "MDM-0.3.0.dmg")+ && mdm_ipc::capture::type_listed(&s.auto_types, "mdm_0.3.0_amd64.deb")+ );let edited = format!("{old} NZB");std::fs::write(&p, list(&edited)).unwrap();assert_eq!(load_from(&p, empty()).settings.auto_types, edited);diff --git a/crates/ipc/src/capture.rs b/crates/ipc/src/capture.rsindex e1953158..d5a033f5 100644--- a/crates/ipc/src/capture.rs+++ b/crates/ipc/src/capture.rs@@ -10,14 +10,18 @@ use serde::Deserialize;/// Options → File types defaults: IDM 6.42's; TORRENT (a .torrent the browser hands over opens/// Add torrent, #39); and today's installers, packages and archives (macOS DMG and PKG, Linux/// DEB, RPM and AppImage, Windows MSIX, APPX and CAB, Java's JAR, XZ, Zstandard and their tarballs)-/// and open audio and video formats (WEBM, FLAC, OPUS; #208).-pub const DEFAULT_AUTO_TYPES: &str = "3GP 7Z AAC ACE AIF APK APPIMAGE APPX APPXBUNDLE ARJ ASF AVI BIN BZ2 CAB DEB DMG EXE FLAC GZ GZIP IMG ISO JAR LZH M4A M4V MKV MOV MP3 MP4 MPA MPE MPEG MPG MSI MSIX MSU OGG OGV OPUS PDF PKG PLJ PPS PPT QT R0* R1* RA RAR RM RMVB RPM SEA SIT SITX TAR TGZ TIF TIFF TORRENT TXZ WAV WEBM WMA WMV XZ Z ZIP ZST";--/// The lists earlier versions started with: IDM 6.42's (MDM 0.2.x), then with TORRENT (#39).-/// A saved list equal to one of them was never edited, and becomes today's (`upgraded_types`).-const EARLIER_AUTO_TYPES: [&str; 2] = [+/// and open audio and video formats (WEBM, FLAC, OPUS; #208); and what people fetch by the+/// gigabyte today (#382): AI models and datasets, 3D and CAD, camera RAW and design files, books+/// and Office files, disk images and split archives. Never what a browser saves as part of+/// everyday browsing (pages, scripts, plain text, web images) or installs itself (XPI, CRX).+pub const DEFAULT_AUTO_TYPES: &str = "00* 3DM 3DS 3GP 3MF 7Z AAB AAC ABC ACE AFDESIGN AFPHOTO AI AIF AIFF APE APK APKM APKS APPIMAGE APPX APPXBUNDLE ARJ ARROW ARW ASF AU AVI AVRO AZW AZW3 BAK BAM BIN BLEND BZ BZ2 C4D CAB CAF CBR CBZ CCD CHD CKPT CPIO CR2 CR3 CRAM CSO DAE DCM DDS DEB DFF DIVX DJVU DMG DNG DOC DOCX DSF DWG DXF EPS EPUB EXE EXR F3D F4V FASTA FASTQ FB2 FBX FEATHER FIG FITS FLAC FLATPAK FQ GCODE GCZ GEM GGML GGUF GLB GLTF GPKG GRIB GRIB2 GZ GZIP H5 HDF5 HDR IGES IGS IMG INDD IPA ISO ISZ JAR JOBLIB JSONL KERAS KRA LAS LAZ LLAMAFILE LWO LZ LZ4 LZH LZMA M2T M2TS M2V M4A M4B M4V MA MAT MAX MB MBTILES MDF MDS MID MIDI MKA MKV MLMODEL MOBI MOV MP3 MP4 MPA MPE MPEG MPG MSI MSIX MSIXBUNDLE MSP MSU MTS MXF NC NDJSON NEF NEMO NII NPY NPZ NRG NSP NSZ NUPKG OBJ ODP ODS ODT OGG OGM OGV ONNX OPUS ORC ORF OTF OVA OVF PAK PARQUET PB PBF PDF PICKLE PK3 PK4 PKG PKL PLJ PLY POTX PPS PPSX PPT PPTX PSB PSD PT PTH QCOW QCOW2 QT R0* R1* R2* R3* R4* R5* R6* R7* R8* R9* RA RAF RAR RDS RM RMVB RPM RTF RUN RVZ RW2 SAFETENSORS SEA SF2 SFZ SHP SIT SITX SKETCH SKP SLDASM SLDPRT SNAP SQLITE SQLITE3 STEP STL STP TAR TBZ TBZ2 TFLITE TGA TGZ TIF TIFF TLZ TORRENT TTA TTC TTF TXZ TZST UNITYPACKAGE USD USDA USDC USDZ VDB VDI VHD VHDX VMDK VOB VPK VSIX WAV WBFS WEBM WHL WIM WMA WMV WRL WTV WUA WV X3D XAPK XCF XCI XLS XLSB XLSM XLSX XZ Z Z0* ZIP ZIPX ZPR ZST ZTL";++/// The lists earlier versions started with: IDM 6.42's (MDM 0.2.x), with TORRENT (#39), then+/// with today's packages and open formats (#208). A saved list equal to one of them was never edited, and becomes today's (`upgraded_types`).+const EARLIER_AUTO_TYPES: [&str; 3] = ["3GP 7Z AAC ACE AIF APK ARJ ASF AVI BIN BZ2 EXE GZ GZIP IMG ISO LZH M4A M4V MKV MOV MP3 MP4 MPA MPE MPEG MPG MSI MSU OGG OGV PDF PLJ PPS PPT QT R0* R1* RA RAR RM RMVB SEA SIT SITX TAR TIF TIFF WAV WMA WMV Z ZIP","3GP 7Z AAC ACE AIF APK ARJ ASF AVI BIN BZ2 EXE GZ GZIP IMG ISO LZH M4A M4V MKV MOV MP3 MP4 MPA MPE MPEG MPG MSI MSU OGG OGV PDF PLJ PPS PPT QT R0* R1* RA RAR RM RMVB SEA SIT SITX TAR TIF TIFF TORRENT WAV WMA WMV Z ZIP",+ "3GP 7Z AAC ACE AIF APK APPIMAGE APPX APPXBUNDLE ARJ ASF AVI BIN BZ2 CAB DEB DMG EXE FLAC GZ GZIP IMG ISO JAR LZH M4A M4V MKV MOV MP3 MP4 MPA MPE MPEG MPG MSI MSIX MSU OGG OGV OPUS PDF PKG PLJ PPS PPT QT R0* R1* RA RAR RM RMVB RPM SEA SIT SITX TAR TGZ TIF TIFF TORRENT TXZ WAV WEBM WMA WMV XZ Z ZIP ZST",];/// Today's default list when `saved` (Options → File types as saved) is an earlier version's@@ -352,6 +356,18 @@ pub fn address_matches(pattern: &str, url: &str) -> bool {wildcard(&pattern, text)}+/// Is a copied link named `name` a file to offer? A copied address is often not meant to be+/// downloaded at all (a picture, a font or a model to paste into code), and it says nothing about+/// what is behind it, unlike a browser that is really downloading. So the clipboard keeps to the+/// list as it stood before #382, plus what the user typed in themselves; the types #382 added are+/// the browser's alone, and a lone `*` (every type) doesn't count.+pub fn clipboard_type(types: &str, name: &str) -> bool {+ let own: Vec<&str> = types.split_whitespace().filter(|t| *t != "*").collect();+ let browser_only =+ type_listed(DEFAULT_AUTO_TYPES, name) && !type_listed(EARLIER_AUTO_TYPES[2], name);+ !browser_only && type_listed(&own.join(" "), name)+}+/// `*` matches any run of characters (IDM's address patterns).fn wildcard(pattern: &str, text: &str) -> bool {let parts: Vec<&str> = pattern.split('*').collect();@@ -614,6 +630,96 @@ mod tests {}}+ #[test]+ fn todays_big_files_are_taken_and_everyday_browsing_is_not() {+ // #382: an untouched list from before gets them too.+ let earlier = CaptureRules {+ auto_types: EARLIER_AUTO_TYPES[2].into(),+ ..CaptureRules::default()+ };+ assert!(!earlier.auto_type("model.Q4_K_M.gguf"));+ let r = earlier.upgraded();+ for name in [+ "model.Q4_K_M.gguf",+ "model-00001-of-00004.safetensors",+ "sd15.ckpt",+ "weights.pth",+ "model.onnx",+ "train-00000.parquet",+ "scene.glb",+ "part.stl",+ "character.fbx",+ "house.blend",+ "bracket.step",+ "IMG_0001.CR3",+ "cover.psd",+ "book.epub",+ "report.docx",+ "budget.xlsx",+ "disk.vhdx",+ "backup.7z.001",+ "backup.z01",+ "movie.r27",+ ] {+ assert!(r.auto_type(name), "{name}");+ }+ for name in [+ "index.html",+ "app.js",+ "style.css",+ "config.json",+ "notes.txt",+ "photo.jpg",+ "logo.png",+ "icon.svg",+ "addon.xpi",+ "addon.crx",+ ] {+ assert!(!r.auto_type(name), "{name}");+ }+ }++ #[test]+ fn a_lone_star_takes_every_file_with_a_type() {+ let r = CaptureRules {+ auto_types: "*".into(),+ ..CaptureRules::default()+ };+ for name in ["model.gguf", "photo.jpg", "anything.xyz123"] {+ assert_eq!(r.accepts("https://x.test/f", name, "Google Chrome"), Ok(()));+ }+ assert!(!r.auto_type("no_extension"));+ }++ #[test]+ fn a_copied_address_is_offered_only_as_it_always_was() {+ // What people copy to paste somewhere else, never a download by default.+ for name in [+ "photo.jpg",+ "logo.png",+ "page.html",+ "font.ttf",+ "scene.glb",+ "model.gguf",+ "a.safetensors",+ "jane.ma",+ "site.ai",+ "cover.psd",+ ] {+ assert!(!clipboard_type(DEFAULT_AUTO_TYPES, name), "{name}");+ assert!(!clipboard_type("*", name), "{name}, a lone star");+ assert!(!clipboard_type("* ZIP", name), "{name}, a star and more");+ }+ // Every type offered before #382 still is.+ for t in EARLIER_AUTO_TYPES[2].split(' ') {+ let name = format!("a.{}", t.replace('*', "1"));+ assert!(clipboard_type(DEFAULT_AUTO_TYPES, &name), "{name}");+ }+ // A type the user listed themselves; and one they took off.+ assert!(clipboard_type("ZIP XYZ", "a.xyz"));+ assert!(!clipboard_type("ZIP", "a.exe"));+ }+#[test]fn each_refusal_has_a_name_and_a_reason() {for d in Declined::ALL {diff --git a/crates/nmhost/tests/host.rs b/crates/nmhost/tests/host.rsindex 47bfb933..a6c17b36 100644--- a/crates/nmhost/tests/host.rs+++ b/crates/nmhost/tests/host.rs@@ -86,6 +86,32 @@ fn run((replies, ok)}+/// #382: nothing edited in Options. A model is taken, a picture stays with the browser.+#[test]+fn the_default_list_takes_a_model_and_leaves_a_picture() {+ let dir = data_dir("default-types", serde_json::json!({}));+ let app = fake_app(&dir, "ok");+ let offer = |name: &str| {+ serde_json::json!({+ "url": format!("https://huggingface.co/org/repo/resolve/main/{name}"),+ "userAgent": UA, "filename": format!("C:/dl/{name}"),+ })+ };+ let (replies, ok) = run(+ &dir,+ CALLER,+ &[offer("model.Q4_K_M.gguf"), offer("photo.jpg")],+ );+ assert!(ok);+ assert_eq!(replies[0]["ok"], true, "{:?}", replies[0]);+ assert_eq!(+ app.recv_timeout(Duration::from_secs(5)).unwrap()["name"],+ "model.Q4_K_M.gguf"+ );+ assert_ne!(replies[1]["ok"], true, "{:?}", replies[1]);+ assert!(app.recv_timeout(Duration::from_millis(300)).is_err());+}+#[test]fn rules_hand_off_and_the_status_per_browser() {let dir = data_dir(diff --git a/docs/browser-integration.md b/docs/browser-integration.mdindex e5d01303..2832c5bd 100644--- a/docs/browser-integration.md+++ b/docs/browser-integration.md@@ -50,7 +50,7 @@ When you click a download, the extension checks MDM's Options:- **Options → General → Use advanced browser integration** must be on. Turn it off to send nothing to MDM.- **Options → General → Capture downloads from the following browsers** must have your browser ticked.-- **Options → File types → Automatically start downloading the following file types** must list the file's type. The list starts with the usual ones: ZIP, RAR, 7Z, EXE, MSI, ISO, DMG, DEB, RPM, APPIMAGE, MP3, MP4, MKV, WEBM, PDF and many more.+- **Options → File types → Automatically start downloading the following file types** must list the file's type. The list starts with the usual ones: ZIP, RAR, 7Z, EXE, MSI, ISO, DMG, DEB, RPM, APPIMAGE, MP3, MP4, MKV, WEBM, PDF, AI models such as GGUF and SAFETENSORS, 3D files such as GLB and STL, and many more. Anything else can be added to the list.- **Options → File types → Don't start downloading automatically from the following sites** must not list the site. Names are separated by spaces, and `*` matches any part, as in `*.update.microsoft.com`. **Edit list ...** below it lists whole addresses to leave alone, one per line (`https://example.com/private/*`).- **Options → File types → Don't take files smaller than** leaves small files (a receipt, an icon) to the browser. 0 takes any size.- The extension must be allowed to read the site. When you limit it to some sites (or **On click**), it can't pass your sign-in on, so it leaves those sites' downloads to the browser.diff --git a/docs/options.md b/docs/options.mdindex 5b5b4011..e08cd09f 100644--- a/docs/options.md+++ b/docs/options.md@@ -12,7 +12,7 @@ Some buttons are greyed. They belong to features that aren't built yet.*General: how MDM starts, and what it takes from the clipboard and the browsers.*- **Launch Mister Download Manager on startup** — start MDM when you sign in to Windows. It starts in the notification area, its window hidden, with its downloads, queues and Scheduler running; click its icon (or start MDM again) to show the window. On Linux and macOS it starts with your session the same way; where no notification area shows MDM's icon (some Linux desktops), it starts minimized, and the option's tooltip says so. MDM waits for the notification area up to 30 seconds after making its icon, its window hidden, as a desktop's can come up after MDM at sign-in. Off by default. Greyed in a [portable copy](portable.md), which writes nothing to the registry.-- **Offer to download links copied to the clipboard** — when you copy a link whose file type is on the **File types** page, **Download File Info** opens with it, ready to start (or the download starts at once, with **Show start download dialog** off). On by default.+- **Offer to download links copied to the clipboard** — when you copy a link whose file type is on the **File types** page, **Download File Info** opens with it, ready to start (or the download starts at once, with **Show start download dialog** off). It keeps to archives, programs, music, videos, PDF and any type you added yourself, so copying the address of a picture, a font or a 3D model to use somewhere else never starts a download. On by default.- **Use advanced browser integration** — let the browser extension hand downloads to MDM. Turn it off to keep every download in the browser.- **Confirm before deleting downloads** — ask before taking downloads off the list. On by default; **Don't show this dialog again** in that question turns it off, and ticking it here turns it back on.- **Minimize to the notification area** — Minimize hides the main window, and a download's progress window, in the notification area, as closing the main window does; downloads go on. On by default. Greyed where no tray shows MDM's icon (some Linux desktops); in a Wayland session the main window stays minimized in the dock, since Wayland can't hide a window.@@ -26,7 +26,7 @@ See [Browser integration](browser-integration.md).*File types: what the browser hands over, and the sites left alone.*-- **Automatically start downloading the following file types** — the file types the browser hands over (and the clipboard picks up). Separate them by spaces; `*` matches any characters, as in `R0*`. **Default** puts the original list back. The list starts with the usual archives, programs and installers (Windows, macOS and Linux ones: DMG, PKG, DEB, RPM, APPIMAGE, MSIX), music and videos, and PDF. A list you never changed gains the types a new version adds; one you edited stays as it is.+- **Automatically start downloading the following file types** — the file types the browser hands over (and the clipboard picks up). Separate them by spaces; `*` matches any characters, as in `R0*`. **Default** puts the original list back. The list starts with the usual archives, programs and installers (Windows, macOS and Linux ones: DMG, PKG, DEB, RPM, APPIMAGE, MSIX), music and videos, PDF and Office files, AI models and datasets (GGUF, SAFETENSORS, CKPT, PT, ONNX, PARQUET), 3D and CAD files (GLB, FBX, OBJ, STL, BLEND, STEP), design and camera RAW files, ebooks, disk images and split archives. Pages, scripts, plain text and web images are left out on purpose, so saving a picture or a page stays with the browser; add any type you need, or put a single `*` in the box to take every file that has an extension. A list you never changed gains the types a new version adds; one you edited stays as it is.- **Don't start downloading automatically from the following sites** — sites whose downloads stay in the browser, separated by spaces. `*.example.com` covers every part of a site. **Default** puts the original list back.## Save todiff --git a/extension/background.js b/extension/background.jsindex dd8a8f3f..6d8c6a11 100644--- a/extension/background.js+++ b/extension/background.js@@ -125,7 +125,7 @@ async function remoteSend(target, message) {// The file types the app takes by default (mdm_ipc::capture::DEFAULT_AUTO_TYPES; a test keeps// them the same): what is caught for another MDM when this computer has none to ask.const DEFAULT_TYPES =- "3GP 7Z AAC ACE AIF APK APPIMAGE APPX APPXBUNDLE ARJ ASF AVI BIN BZ2 CAB DEB DMG EXE FLAC GZ GZIP IMG ISO JAR LZH M4A M4V MKV MOV MP3 MP4 MPA MPE MPEG MPG MSI MSIX MSU OGG OGV OPUS PDF PKG PLJ PPS PPT QT R0* R1* RA RAR RM RMVB RPM SEA SIT SITX TAR TGZ TIF TIFF TORRENT TXZ WAV WEBM WMA WMV XZ Z ZIP ZST";+ "00* 3DM 3DS 3GP 3MF 7Z AAB AAC ABC ACE AFDESIGN AFPHOTO AI AIF AIFF APE APK APKM APKS APPIMAGE APPX APPXBUNDLE ARJ ARROW ARW ASF AU AVI AVRO AZW AZW3 BAK BAM BIN BLEND BZ BZ2 C4D CAB CAF CBR CBZ CCD CHD CKPT CPIO CR2 CR3 CRAM CSO DAE DCM DDS DEB DFF DIVX DJVU DMG DNG DOC DOCX DSF DWG DXF EPS EPUB EXE EXR F3D F4V FASTA FASTQ FB2 FBX FEATHER FIG FITS FLAC FLATPAK FQ GCODE GCZ GEM GGML GGUF GLB GLTF GPKG GRIB GRIB2 GZ GZIP H5 HDF5 HDR IGES IGS IMG INDD IPA ISO ISZ JAR JOBLIB JSONL KERAS KRA LAS LAZ LLAMAFILE LWO LZ LZ4 LZH LZMA M2T M2TS M2V M4A M4B M4V MA MAT MAX MB MBTILES MDF MDS MID MIDI MKA MKV MLMODEL MOBI MOV MP3 MP4 MPA MPE MPEG MPG MSI MSIX MSIXBUNDLE MSP MSU MTS MXF NC NDJSON NEF NEMO NII NPY NPZ NRG NSP NSZ NUPKG OBJ ODP ODS ODT OGG OGM OGV ONNX OPUS ORC ORF OTF OVA OVF PAK PARQUET PB PBF PDF PICKLE PK3 PK4 PKG PKL PLJ PLY POTX PPS PPSX PPT PPTX PSB PSD PT PTH QCOW QCOW2 QT R0* R1* R2* R3* R4* R5* R6* R7* R8* R9* RA RAF RAR RDS RM RMVB RPM RTF RUN RVZ RW2 SAFETENSORS SEA SF2 SFZ SHP SIT SITX SKETCH SKP SLDASM SLDPRT SNAP SQLITE SQLITE3 STEP STL STP TAR TBZ TBZ2 TFLITE TGA TGZ TIF TIFF TLZ TORRENT TTA TTC TTF TXZ TZST UNITYPACKAGE USD USDA USDC USDZ VDB VDI VHD VHDX VMDK VOB VPK VSIX WAV WBFS WEBM WHL WIM WMA WMV WRL WTV WUA WV X3D XAPK XCF XCI XLS XLSB XLSM XLSX XZ Z Z0* ZIP ZIPX ZPR ZST ZTL";// Pair with the MDM at `address` with a code it shows; {ok} or {ok: false, why, left}.async function remotePair(address, code) {