Application for intuitive file sharing between devices.
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
- automatically checks the firewalld config on Linux distros and offers opening the ports
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.
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
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).
- Start the application on two machines:
For Linux with Flatpak: run Dragit from installed applications.
For Linux executable:
./dragit
For Windows:
dragit.exe
- Wait for the two
dragit
instances to discover each other. You should see new drop zone area with IP address of the host. - Drag a file and drop it on the drop zone.
- In the other window you will be asked whether you would like to accept the file. Probably you'd like to answer "Yes".
- File will be transferred and saved in the
Downloads directory
(which is customizable). - Done!
Dragit automatically detects firewall configuration on the host machine to help resolve the networking problems. The check is done against firewalld
daemon and uses its D-Bus interface. User is asked for permissions, because some systems require authorization for inspecting firewalld
rules (such as Ubuntu).
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.
Dragit stores config file under $HOME/.config/dragit/config.toml
on Linux and in standard configuration paths on the other platforms (such as Windows). If you wish to change port under which Dragit is running, change it there. You can also re-trigger firewall check by changing the value of firewall_checked
setting.
This application depends on glibc library, which is provided by most of the Linux distros.
Dragit is built automatically using the Github Actions under the ubuntu-latest
image (currently Ubuntu 20.04 LTS), which means that your Linux distribution should have glibc version equal or higher than the one supported by ubuntu-latest
. Otherwise it might happen that you see this error:
/lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.29 not found
This means that glibc on your machine is too old and you might consider OS upgrade or try to build Dragit yourself.
To check highest glibc version on your distro, you can inspect ldd.
$ ldd --version
ldd (GNU libc) 2.32
(...)
cargo run
Note: there are some GTK libraries that are required to build the project locally.
For Ubuntu and Debian-family distros, please check the build system pipeline to get always up-to-date list. For Fedora this list roughly translates to:
atk-devel
cairo-gobject-devel
dbus-devel
gdk-pixbuf2-devel
glib2-devel
gtk3-devel
pango-devel
Dragit
works best on x86_64-pc-windows-msvc
target.
While Rust part of the application is relatively easy to build, the GTK bindings part of it requires setup of the GTK environment.
Please refer to the release build pipeline for inspiration.
You can run two dragit
instances on the same machine for testing. No problem with that!
- Edit
~/.config/dragit/config.toml
(this might be different path on your OS/distro) - Set
port
value to 0, which will cause the application to pick a random port on startup - Run one instance with
cargo run
- Run another instance, with
APPLICATION_NAME=some.other.Name cargo run
- The two instances should successfully discover each other
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.
Please build in the release mode to get the best performance (roughly 16-20x faster).
$ cargo build --release
$ ./target/release/dragit
Contributions to Dragit are welcome and encouraged!
You can help in following aspects:
- suggest new ideas
- implement features
- provide bug reports
- fix identified bugs
- review existing code
- improve the documentation
Before creating a new Pull Request, please open an Issue containing explanation of the idea or a problem. This will help us to coordinate works and discuss solutions.
Format the code using cargo fmt.
While not every feature is testable, please include tests for the new functionalities that could benefit from tests. Examples:
- utility functions: unit tests
- libp2p/network: integration tests
- Gtk: it's enough to test manually
Dragit works on Linux and Windows operating systems. When developing new features, please have in mind that both platforms should be supported.