Compare commits
6 Commits
c147f78e1d
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 894f4f8601 | |||
| 6bf7e29297 | |||
| e513c5e4f2 | |||
| dabb2e66b6 | |||
| fe30aec2d6 | |||
| 1cd937511a |
1
.gitignore
vendored
@@ -32,4 +32,3 @@ Makefile
|
||||
_build/
|
||||
.flatpak-builder/
|
||||
flatpak/
|
||||
/subprojects/
|
||||
|
||||
56
README.md
@@ -1,50 +1,28 @@
|
||||
# Teleport
|
||||
Teleport is a native GTK3 app to effortlessly share files on the local network.
|
||||
<img src="data/icons/hicolor/org.nekoweb.n0va.BeamMeUp.svg" width="128" height="128" align="center">
|
||||
|
||||

|
||||
# BeamMeUp
|
||||
|
||||
BeamMeUp is a native GTK4 application to effortlessly share files on the local network. It's based on [teleport](https://gitlab.gnome.org/jsparber/teleport) by Julian Sparber
|
||||
|
||||
Have you ever asked yourself why the easiest way to move a file between two computers in the same room involves sending it to a server in another country?
|
||||
|
||||
Teleport is designed to be a replacement for using USB keys or emailing stuff to yourself just so you have them on another device on your desk. The main user interface on the receiver's side are notifications:
|
||||
BeamMeUp is designed to be a replacement for using USB keys or emailing stuff to yourself just so you have them on another device on your desk. The main user interface on the receiver's side are notifications:
|
||||
|
||||

|
||||

|
||||
|
||||
## Install
|
||||
Teleport is currently in early development, but you can try it by installing it
|
||||
via GNOME Software or via [flatpak](http://flatpak.org).
|
||||
```
|
||||
flatpak install flathub com.frac_tion.teleport
|
||||
```
|
||||
## Features
|
||||
* **Simple:** Just drag and drop files to send them.
|
||||
* **Native:** Integrated with GNOME notifications and system styling.
|
||||
* **Fast:** Direct peer-to-peer transfers over your local network.
|
||||
|
||||
## Roadmap
|
||||
It's still early days, but we have exciting plans for the future. While Teleport can currently only send individual files, longer term we are interested in doing things like:
|
||||
* sending multiple files and folders
|
||||
* sending text snippets
|
||||
* file transfer progress bars
|
||||
* encryption in transit
|
||||
* native Android/iOS/macOS/Windows apps
|
||||
## Building from source
|
||||
To build BeamMeUp, you'll need `gtk4`, `libadwaita`, `libsoup-2.4`, and `avahi` development headers.
|
||||
|
||||
## Build
|
||||
#### Archlinux
|
||||
```bash
|
||||
./configure
|
||||
make
|
||||
sudo make install
|
||||
```
|
||||
pacman -S base-devel libsoup avahi gtk3 meson
|
||||
git clone https://gitlab.gnome.org/jsparber/teleport
|
||||
cd teleport
|
||||
./configure
|
||||
sudo make install
|
||||
teleport # or ./_build/src/teleport
|
||||
```
|
||||
#### Ubuntu
|
||||
```
|
||||
apt install pkg-config libsoup2.4-dev libavahi-client3 libavahi-client-dev libgtk-3-dev meson
|
||||
git clone https://gitlab.gnome.org/jsparber/teleport
|
||||
cd teleport
|
||||
./configure
|
||||
make
|
||||
sudo make install
|
||||
teleport # or ./_build/src/teleport
|
||||
```
|
||||
|
||||
|
||||
## License
|
||||
AGPLv3, because freeeeeeedom
|
||||
AGPLv3
|
||||
|
||||
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 999 B After Width: | Height: | Size: 731 B |
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 266 KiB After Width: | Height: | Size: 50 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 648 KiB After Width: | Height: | Size: 2.3 KiB |
@@ -106,6 +106,15 @@ gint teleport_peer_get_port (TeleportPeer *self, gint index, GError **error)
|
||||
|
||||
void teleport_peer_add_peer (TeleportPeer *self, gchar *name, gchar *ip, gint port)
|
||||
{
|
||||
Peer *element;
|
||||
for (int i = 0; i < self->list->len; i++) {
|
||||
element = g_array_index(self->list, Peer *, i);
|
||||
if (g_strcmp0(element->name, name) == 0) {
|
||||
g_print("Peer '%s' already exists, skipping duplicate.\n", name);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Peer *new = g_new(Peer, 1);
|
||||
new->ip = ip;
|
||||
new->port = port;
|
||||
|
||||
@@ -125,7 +125,7 @@ on_file_chooser_response (GtkNativeDialog *dialog,
|
||||
if (filename)
|
||||
{
|
||||
g_print("Chosen file is %s\n", filename);
|
||||
teleport_server_add_route (g_compute_checksum_for_string (G_CHECKSUM_SHA256, filename, -1), g_strdup(filename), device->ip);
|
||||
teleport_server_add_route (g_compute_checksum_for_string (G_CHECKSUM_SHA256, filename, -1), g_strdup(filename), device->ip, device->port);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ send_file_to_device (GFile *file, Peer *device)
|
||||
{
|
||||
g_autofree gchar *filename = g_file_get_path (file);
|
||||
if (g_file_query_exists (file, NULL)) {
|
||||
teleport_server_add_route (g_compute_checksum_for_string (G_CHECKSUM_SHA256, filename, -1), g_strdup(filename), device->ip);
|
||||
teleport_server_add_route (g_compute_checksum_for_string (G_CHECKSUM_SHA256, filename, -1), g_strdup(filename), device->ip, device->port);
|
||||
}
|
||||
else {
|
||||
g_print ("File doesn't exist: %s\n", filename);
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "beam-me-up-get.h"
|
||||
#include "beam-me-up-app.h"
|
||||
|
||||
static int port;
|
||||
static int local_port;
|
||||
static SoupServer *glob_server;
|
||||
//static const char *tls_cert_file, *tls_key_file;
|
||||
|
||||
@@ -91,7 +91,7 @@ handle_incoming_file(const char *hash,
|
||||
"s",
|
||||
g_strdup_printf("http://%s:%d/transfer/%s",
|
||||
origin,
|
||||
port,
|
||||
local_port,
|
||||
hash)),
|
||||
g_variant_builder_add (builder, "s", filename);
|
||||
value = g_variant_new ("as", builder);
|
||||
@@ -191,7 +191,8 @@ do_server_timeout (gpointer user_data)
|
||||
int
|
||||
teleport_server_add_route (gchar *name,
|
||||
gchar *file_to_send,
|
||||
gchar *destination) {
|
||||
gchar *destination,
|
||||
int remote_port) {
|
||||
GFile *file;
|
||||
GFileInfo *fileInfo;
|
||||
gchar *path;
|
||||
@@ -211,7 +212,7 @@ teleport_server_add_route (gchar *name,
|
||||
|
||||
teleport_get_do_client_notify(g_strdup_printf("http://%s:%d/?token=%s&size=%jd&name=%s\n",
|
||||
destination,
|
||||
port,
|
||||
remote_port,
|
||||
name,
|
||||
g_file_info_get_size(fileInfo),
|
||||
g_file_info_get_display_name(fileInfo)));
|
||||
@@ -231,10 +232,10 @@ teleport_server_run (void) {
|
||||
//GTlsCertificate *cert;
|
||||
GError *error = NULL;
|
||||
|
||||
port = 3000;
|
||||
local_port = 3000;
|
||||
glob_server = soup_server_new (SOUP_SERVER_SERVER_HEADER, "beam-me-up-httpd ",
|
||||
NULL);
|
||||
soup_server_listen_all (glob_server, port, 0, &error);
|
||||
soup_server_listen_all (glob_server, local_port, 0, &error);
|
||||
|
||||
soup_server_add_handler (glob_server, NULL,
|
||||
server_callback, NULL, NULL);
|
||||
|
||||
@@ -20,8 +20,6 @@
|
||||
#define __TELEPORT_SERVER_H
|
||||
|
||||
int teleport_server_run (void);
|
||||
int teleport_server_add_route (gchar *,
|
||||
gchar *,
|
||||
gchar *);
|
||||
int teleport_server_add_route (gchar *, gchar *, gchar *, int);
|
||||
|
||||
#endif /* __TELEPORT_SERVER_H */
|
||||
|
||||
@@ -43,85 +43,7 @@
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="margin-top">6</property>
|
||||
<property name="label" translatable="yes">Automatically enable BeamMeUp on these networks:</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBox" id="general-listbox">
|
||||
<property name="selection-mode">none</property>
|
||||
<style>
|
||||
<class name="boxed-list"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkListBoxRow" id="primary-button-row-1">
|
||||
<property name="activatable">False</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin-start">12</property>
|
||||
<property name="margin-end">6</property>
|
||||
<property name="margin-top">6</property>
|
||||
<property name="margin-bottom">6</property>
|
||||
<property name="spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="device-name-lable-1">
|
||||
<property name="hexpand">True</property>
|
||||
<property name="label" translatable="yes">o2-WLAN09</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="localSettings-1">
|
||||
<property name="icon-name">window-close-symbolic</property>
|
||||
<style>
|
||||
<class name="flat"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow" id="primary-button-row">
|
||||
<property name="activatable">False</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin-start">12</property>
|
||||
<property name="margin-end">6</property>
|
||||
<property name="margin-top">6</property>
|
||||
<property name="margin-bottom">6</property>
|
||||
<property name="spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="device-name-lable">
|
||||
<property name="hexpand">True</property>
|
||||
<property name="label" translatable="yes">Add Network</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="localSettings">
|
||||
<property name="icon-name">list-add-symbolic</property>
|
||||
<style>
|
||||
<class name="flat"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="GtkSeparator">
|
||||
<property name="margin-top">6</property>
|
||||
|
||||