Dragit - Application for intuitive file sharing between devices.

Overview

Dragit - intuitive file sharing application

Dragit

Application for intuitive file sharing between devices.

Build Status Dependency Status License

Dragit helps you share files between computers in the same network.

  • useful when you want to send file from one computer to another
  • requires no configuration
  • single purpose - does only one thing and nothing more
  • works on Linux and Windows machines

The application uses mDNS for automatic device discovery with help of libp2p library. The GUI is implemented in gtk-rs.

Important note: This is software in development phase and you should use it at your own risk.

Contents

Preview

Dragit screenshot

How to install

Using Flatpak

If you don't know how to use Flatpak yet, please follow the setup guide.

Then install Dragit as follows:

flatpak install com.sireliah.Dragit

Download recent release

Alternatively you can download the latest release for your OS and unpack it. Currently you can use dragit on 64-bit Linux and Windows (Please check Windows requirements for details).

How to use

  1. Start the application on two machines:

For Linux with Flatpak: run Dragit from installed applications.

For Linux executable:

./dragit

For Windows:

dragit.exe

You can run two dragit instances on the same machine for testing. No problem with that!

  1. Wait for the two dragit instances to discover each other. You should see new drop zone area with IP address of the host.
  2. Drag a file and drop it on the drop zone.
  3. In the other window you will be asked whether you would like to accept the file. Probably you'd like to answer "Yes".
  4. File will be transfered and saved in the Downloads directory (which is customizable).
  5. Done!

demo

Development

How to build on Linux

cargo run

How to build on Windows

Dragit works best on x86_64-pc-windows-msvc target. Detailed build instruction will be added in the future.

Windows requirements

It might happen that you don't have the vcruntime140_1.dll installed in your system and the application won't start. You can fix that by installing the VC++ 2019 runtime dll.

In the future releases this library will be installed automatically.

Performance

Please build in the release mode to get the best performance (roughly 16-20x faster).

$ cargo build --release

$ ./target/release/dragit

Bluetooth support

Dragit can use Bluetooth OBEX protocol for file transfer through the D-Bus BlueZ interface, which should work on most of the Linux devices. This future needs some work and is disabled now.

TODOs

Features

  • find out how to use text drag&drop API on Windows with Gtk
  • show username in the device list
  • have list of trusted devices
  • add files queue
  • re-enable the Bluetooth

Maintenance

  • TCP retransmissions - what is wrong?
  • fix the outbound memory issue (consumes too much memory on file reading)
  • add Windows CI/CD
  • add timeout on the Accept/Deny event
  • inject_dial_upgrade_error - but why not inbound?
  • adjust network timeouts

Done

  • show easy to understand instruction on startup
  • show details about the host
  • choose directory
  • show version in the title bar
  • crashes when no network interface is available
  • implement error events
  • TransferCommand::Accept should specify which file should be accepted
  • add sender side progress bar
  • fix the inbound memory issue
  • add logging
  • add test for the outbound/inbound
Comments
  • Firewall rules

    Firewall rules

    Is it possible for dragit to automatically punch holes into firewalld, if it has to listen to a specific port?

    I know that gnome-network-displays are doing something like this, might be a good idea to look at them and how they do it.

    opened by sp1ritCS 8
  • Crash on startup under Windows 10

    Crash on startup under Windows 10

    Hi there. As the title says i'm getting this error upon start under Windows 10 version 21H1 build 19043.1237

    - <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
    - <System>
      <Provider Name="Application Error" /> 
      <EventID Qualifiers="0">1000</EventID> 
      <Version>0</Version> 
      <Level>2</Level> 
      <Task>100</Task> 
      <Opcode>0</Opcode> 
      <Keywords>0x80000000000000</Keywords> 
      <TimeCreated SystemTime="2021-09-15T19:28:43.6349259Z" /> 
      <EventRecordID>28837</EventRecordID> 
      <Correlation /> 
      <Execution ProcessID="0" ThreadID="0" /> 
      <Channel>Application</Channel> 
      <Computer>MEFISTO-PC</Computer> 
      <Security /> 
      </System>
    - <EventData>
      <Data>dragit.exe</Data> 
      <Data>1.0.0.0</Data> 
      <Data>610e714c</Data> 
      <Data>KERNELBASE.dll</Data> 
      <Data>10.0.19041.1202</Data> 
      <Data>c9db1934</Data> 
      <Data>80000003</Data> 
      <Data>00000000000c9b92</Data> 
      <Data>228c</Data> 
      <Data>01d7aa67e3ef7318</Data> 
      <Data>D:\PortableAppz\dragit\dragit.exe</Data> 
      <Data>C:\Windows\System32\KERNELBASE.dll</Data> 
      <Data>42d7ca7c-d4c6-4fe7-b6e4-b4e6a2002902</Data> 
      <Data /> 
      <Data /> 
      </EventData>
      </Event>
    
    opened by graphixillusion 5
  • Punch hole in firewalld

    Punch hole in firewalld

    This is a change that makes Dragit automatically detect if firewalld is going to prevent the application from listening on required ports. For more info, please check #9

    opened by sireliah 5
  • Ability to drag and transfer multiple files (and/or folders!) at once

    Ability to drag and transfer multiple files (and/or folders!) at once

    I'd like to be able to transfer a bunch of files or folders via this utility, without zipping them up first and needing to unzip them on the other end.

    Maybe when it's multiple files like that, the receiving end could be prompted to confirm the directory where they should be saved (to avoid making an unexpected mess for the user, if they were intending to receive the files for "a particular project" for example)

    opened by nekohayo 3
  • Needs a better logo icon for small sizes and contrast issues?

    Needs a better logo icon for small sizes and contrast issues?

    I understand the funny visual metaphor with the current logo icon, but it has a few usability problems

    • It's full of tiny details (cables, struts, etc.) that get lost visually at sizes below 48x48 because they are too fine
    • Colors don't really match GNOME or Tango palette styles
    • Colors don't have any contrast against a dark background (such as the GNOME Shell apps grid, dash, or using extensions like dash-to-panel. You cannot see the black cables/struts against a black/dark background, and even the turquoise-deep-blue machinery is very low-contrast against that background.

    Overall, the current visual metaphor is lost when the icon is displayed in most/all UI elements as an app launcher.

    opened by nekohayo 3
  • Can't start second instance for testing

    Can't start second instance for testing

    On readme it states that it's possible to start two instances for testing purposes but when I try this on my machine I get the following.

    [2022-05-04T22:00:43Z INFO  dragit::p2p] I am Peer: PeerId("12D3KooWAXeuYiZ1e2dPsk1KQnRZqdCEB2QjKuTqxhqfDYmW3PdT")
    [2022-05-04T22:00:43Z ERROR dragit::dnd] Server error: Other(Custom { kind: Other, error: Other(A(A(Os { code: 98, kind: AddrInUse, message: "Address already in use" }))) })
    
    (dragit:138943): Gtk-WARNING **: 01:00:43.106: Locale not supported by C library.
            Using the fallback 'C' locale.
    

    First instance starts without problems.

    opened by tommis 2
  • Dragit peer scope?

    Dragit peer scope?

    Do you intend to extend Dragit to allow file sharing across different networks or is it mDNS and local networks only to keep it simpler to use and understand?

    opened by Winterhuman 2
  • Directories edge cases

    Directories edge cases

    Fixes some bugs caught during release testing:

    • directories with dot in the name were incorrectly named
    • stored compression failed CRC32 check on exe file (unclear why)
    • progress bar DoS'ed by too many progress updates when sending directory with large amount of small files
    opened by sireliah 0
  • Add support for directories

    Add support for directories

    This PR adds support for sending contents of directories through the application.

    • Zip stream is used to send the directory structure.
    • The stored compression (so de facto no compression at all) is used except for files that are in zip format themselves. In such case the files are compressed with bzip2.
    • There is no check of the hash in case of directories. Zip library internally checks CRC32 checksums instead.
    • Symlinks are (for now) ignored.
    opened by sireliah 0
  • Outbound memory issue (consumes too much memory on file reading)

    Outbound memory issue (consumes too much memory on file reading)

    When sending file to remote peer, the sender app instance consumes too much memory. In fact, the sender pushes the whole file to RAM. Here is the related code.

    Please note that file buffering at the receiver app instance doesn't allocate much more RAM than the capacity of the mpsc channel.

    opened by sireliah 0
  • Bump crossbeam-utils from 0.8.0 to 0.8.8

    Bump crossbeam-utils from 0.8.0 to 0.8.8

    Bumps crossbeam-utils from 0.8.0 to 0.8.8.

    Release notes

    Sourced from crossbeam-utils's releases.

    crossbeam-utils 0.8.8

    • Fix a bug when unstable loom support is enabled. (#787)

    crossbeam-utils 0.8.7

    • Add AtomicCell<{i*,u*}>::{fetch_max,fetch_min}. (#785)
    • Add AtomicCell<{i*,u*,bool}>::fetch_nand. (#785)
    • Fix unsoundness of AtomicCell<{i,u}64> arithmetics on 32-bit targets that support Atomic{I,U}64 (#781)

    crossbeam-utils 0.8.6

    • Re-add AtomicCell<{i,u}64>::{fetch_add,fetch_sub,fetch_and,fetch_or,fetch_xor} that were accidentally removed in 0.8.0 0.7.1 on targets that do not support Atomic{I,U}64. (#767)
    • Re-add AtomicCell<{i,u}128>::{fetch_add,fetch_sub,fetch_and,fetch_or,fetch_xor} that were accidentally removed in 0.8.0 0.7.1. (#767)

    crossbeam-utils 0.8.5

    • Add AtomicCell::fetch_update (#704)
    • Support targets that do not have atomic CAS on stable Rust (#698)

    crossbeam-utils 0.8.4

    • Bump loom dependency to version 0.5. (#686)

    crossbeam-utils 0.8.3

    • Make loom dependency optional. (#666)

    crossbeam-utils 0.8.2

    • Deprecate AtomicCell::compare_and_swap. Use AtomicCell::compare_exchange instead. (#619)
    • Add Parker::park_deadline. (#563)
    • Improve implementation of CachePadded. (#636)
    • Add unstable support for loom. (#487)

    crossbeam-utils 0.8.1

    • Make AtomicCell::is_lock_free always const fn. (#600)
    • Fix a bug in seq_lock_wide. (#596)
    • Remove const_fn dependency. (#600)
    • crossbeam-utils no longer fails to compile if unable to determine rustc version. Instead, it now displays a warning. (#604)
    Changelog

    Sourced from crossbeam-utils's changelog.

    Version 0.8.1

    • Support targets that do not have atomic CAS on stable Rust (#698)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Enqueue transfer requests (to prevent accepting them all without review)

    Enqueue transfer requests (to prevent accepting them all without review)

    Here's a small security issue. If you have three computers, and from two of the three you throw files at the third one at roughly the same time, the third computer will be prompted only once to accept the (first) transfer, but the 2nd transfer will get accepted along with them without review.

    opened by nekohayo 1
  • More regular automatic checks for firewalld rules?

    More regular automatic checks for firewalld rules?

    #9 introduced firewall hole poking. This is a nice touch. I see the readme mentions:

    If Dragit detects missing port (mDNS or application one), then application can modify configuration of firewalld. The check is done only on Linux and only on first run of the application.

    Why only do it once however, considering that firewall zones can change, etc. and that dragit will always need this to work (if I'm not mistaken)?

    Rather, wouldn't it make more sense for dragit to check this automatically on every startup, possibly also on every networkmanager network change (since different firewalld "zones" can be tied to different saved connections), and only notify the user when it encounters a firewalled network/zone where the hole is not already present, using a GtkInfobar widget with action button (or using the main window's UI area, since I doubt it could detect any other computers if it's firewalled...)?

    opened by nekohayo 1
  • Success text bubble / balloon's background color contrasts poorly with the resulting location's hyperlink color

    Success text bubble / balloon's background color contrasts poorly with the resulting location's hyperlink color

    The blue hyperlink text color (as well as the normal black text) is too dark against the dark-gray background color of the success message upon a completed transfer. What it looks like:

    Screenshot from 2022-05-23 17-15-26

    Screenshot from 2022-05-23 17-19-58

    Consider using a much brighter background color.

    Alternatively, have you considered using a standard GtkInfobar widget instead, or a standard desktop notification, or some other way to display this? Maybe a folder GtkButton to "Open containing folder" in recent received files, too?

    opened by nekohayo 1
  • TCP retransmittion probable cause

    TCP retransmittion probable cause

    I saw under Maintenance that "TCP retransmissions - what is wrong?" has been a problem for you, a project using go-libp2p called Hyprspace had the same issue.

    From what the developer told me, he found that Libp2p sends 1.5 packets at a time, if you don't read the packets correctly the half-packets get dropped and have to be re-transmitted, it's likely the same case in Dragit.

    Here's what they did to fix this, hopefully the code is still useful even though it's written in Go and this is a Rust project: https://github.com/hyprspace/hyprspace/commit/20c306ddcbd15bccbcdd20359189e9b2fce246c6

    opened by Winterhuman 1
  • Add support for macOS

    Add support for macOS

    It should be possible to build Dragit on mac and it would be great if someone with such machine could help investigate the topic.

    • The p2p part of Dragit doesn't depend on OS except for detection of HOME directory, but this should not be a trouble.
    • The GTK seems to be compatible too: https://github.com/gtk-rs/gtk/blob/master/.travis.yml#L24

    If this doesn't build out-of-the box, there is some investigation needed. This link may help.

    help wanted 
    opened by sireliah 0
Releases(v0.7.0)
Owner
Piotr Gołąb
Piotr Gołąb
Limit screen time to children's various mobile devices by blocking internet access on the family Wifi router.

Device Blocker Limit screen time to children's various mobile devices by blocking internet access on the family Wifi router. This is the server which

null 36 Oct 4, 2022
Drill is a HTTP load testing application written in Rust inspired by Ansible syntax

Drill Drill is a HTTP load testing application written in Rust. The main goal for this project is to build a really lightweight tool as alternative to

Ferran Basora 1.5k Dec 28, 2022
An experimental HTTP load testing application written in Rust.

Herd Herd was a small side project in building a HTTP load testing application in Rust with a main focus on being easy to use and low on OS level depe

Jacob Clark 100 Dec 27, 2022
A Kubernetes implementation of the Open Application Model specification

Rudr ?? NOTE: Rudr is deprecated in favor of the upcoming open application platform project as its successor. There are no plans to produce future rel

Open Application Model 1.6k Jan 4, 2023
Easy c̵̰͠r̵̛̠ö̴̪s̶̩̒s̵̭̀-t̶̲͝h̶̯̚r̵̺͐e̷̖̽ḁ̴̍d̶̖̔ ȓ̵͙ė̶͎ḟ̴͙e̸̖͛r̶̖͗ë̶̱́ṉ̵̒ĉ̷̥e̷͚̍ s̷̹͌h̷̲̉a̵̭͋r̷̫̊ḭ̵̊n̷̬͂g̵̦̃ f̶̻̊ơ̵̜ṟ̸̈́ R̵̞̋ù̵̺s̷̖̅ţ̸͗!̸̼͋

Rust S̵̓i̸̓n̵̉ I̴n̴f̶e̸r̵n̷a̴l mutability! Howdy, friendly Rust developer! Ever had a value get m̵̯̅ð̶͊v̴̮̾ê̴̼͘d away right under your nose just when

null 294 Dec 23, 2022
An end-to-end encrypted, anonymous IP-hiding, decentralized, audio/video/file sharing/offline messaging multi-device platform built for both communications and application security and performance.

An end-to-end encrypted, anonymous IP-hiding, decentralized, audio/video/file sharing/offline messaging multi-device platform built for both communications and application security and performance.

null 2 Apr 27, 2022
A rust library for sharing and updating arbitrary slices between threads, optimized for wait-free reads

atomicslice A Rust library for thread-safe shared slices that are just about as fast as possible to read while also being writable. Overview Use Atomi

Tim Straubinger 5 Dec 6, 2023
Cross-platform file sharig application for desktop and mobile devices

Skylite Description Getting Started Dependencies Installing Executing program License Acknowledgments Description Cross platform file sharing applicat

Adeoye Adefemi 5 Nov 16, 2023
In-memory, non stateful and session based code sharing application.

interviewer In-memory, non stateful and session based code sharing application. Test it here: interviewer.taras.lol Note: it's deployed to render auto

2pac 7 Aug 16, 2021
A CLI application that implements multi-key-turn security via Shamir's Secret Sharing.

agree agree is a CLI tool for easily applying multi-key-turn security via Shamirs Secret Sharing. Project state agree is unstable. Version semantics:

Alexander Weber 19 Aug 29, 2023
Simple file sharing with client-side encryption, powered by Rust and WebAssembly

Hako Simple file sharing with client-side encryption, powered by Rust and WebAssembly Not feature-packed, but basic functionalities are just working.

Jaehyeon Park 30 Nov 25, 2022
Easily sync your clipboard between devices. This is a work in progress app.

Clipboard Sync Description Easily sync your clipboard between devices. This is a work in progress app. Stack Frontend: React Tauri isomorphic-ws TSX,

Steveplays 2 Mar 2, 2022
Simple utility to backup/sync data between devices to the cloud

RSink Simple utility to backup/sync data between devices to the cloud Features ?? Blazingly Fast ⛽ Lightweight ?? Cross-platform, runs everywhere ?? S

Abdulrahman Salah 4 Sep 3, 2022
Share files between devices using your Wi-Fi network.

swift_file Rust implementation of transferring files between devices over Wi-Fi network using a QR code. Tool is inspired by claudiodangelis/qrcp. How

Mateo Radman 10 Jun 7, 2023
The intuitive command-line file uploader.

☁️ upl The intuitive command-line file uploader. ??️ Features (roadmap) Upload files via the command-line Sane built-in upload destinations Configurat

null 4 Oct 13, 2022
FileSorterX is an automatic file sorting application that sorts your files into folders based on their file extension

FileSorterX is an automatic file sorting application that sorts your files into folders based on their file extension. With FileSorterX, you can easily keep your files organized and find what you need quickly.

Xanthus 22 Apr 4, 2023
Rust File Management CLI is a command-line tool written in Rust that provides essential file management functionalities. Whether you're working with files or directories, this tool simplifies common file operations with ease.

Rust FileOps Rust File Management CLI is a command-line tool written in Rust that provides essential file management functionalities. Whether you're w

Harikesh Ranjan Sinha 5 May 2, 2024
A (self hosted) pastebin for easily sharing text right from the terminal

termpad termpad allows you to easily host a pastebin server for saving and viewing text right from the terminal, or the browser. Client Usage Assuming

Spyros Roum 28 Aug 29, 2022
A pure-Rust implementation of various threshold secret sharing schemes

Threshold Secret Sharing Efficient pure-Rust library for secret sharing, offering efficient share generation and reconstruction for both traditional S

Snips 137 Dec 29, 2022
Multi-device clipboard sharing.

share-clip 多设备剪切板共享 特性 采用 Rust 实现。便捷/高性能 基于 Redis(可轻松支持广域网/局域网的共享) 自动发现同身份下的机器 全数据 RSA 分段加密 (出于性能及其他原因考虑替换为 XSalsa20Poly1305 加密) 支持文本和图片 支持共享提示(macOS

null 59 Dec 21, 2022