Compare commits

..

6 Commits

Author SHA1 Message Date
894f4f8601 Deduplicate and maybe works 2026-01-05 17:43:37 +01:00
6bf7e29297 Hopefully works now 2026-01-05 17:24:09 +01:00
e513c5e4f2 Update README.md 2026-01-04 19:28:46 +01:00
dabb2e66b6 Icon size fix 2026-01-04 19:18:52 +01:00
fe30aec2d6 Icon 2026-01-04 19:13:33 +01:00
1cd937511a Remove libhandy 2026-01-04 18:07:22 +01:00
17 changed files with 68 additions and 7677 deletions

1
.gitignore vendored
View File

@@ -32,4 +32,3 @@ Makefile
_build/ _build/
.flatpak-builder/ .flatpak-builder/
flatpak/ flatpak/
/subprojects/

View File

@@ -1,50 +1,28 @@
# Teleport <img src="data/icons/hicolor/org.nekoweb.n0va.BeamMeUp.svg" width="128" height="128" align="center">
Teleport is a native GTK3 app to effortlessly share files on the local network.
![Screenshot of the Teleport application window](docs/screenshots/window.png) # 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? 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:
![Screenshot of a Teleport notification](docs/screenshots/notification.png) ![Screenshot of a notification](docs/screenshots/notification.png)
## Install ## Features
Teleport is currently in early development, but you can try it by installing it * **Simple:** Just drag and drop files to send them.
via GNOME Software or via [flatpak](http://flatpak.org). * **Native:** Integrated with GNOME notifications and system styling.
``` * **Fast:** Direct peer-to-peer transfers over your local network.
flatpak install flathub com.frac_tion.teleport
```
## Roadmap ## Building from source
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: To build BeamMeUp, you'll need `gtk4`, `libadwaita`, `libsoup-2.4`, and `avahi` development headers.
* sending multiple files and folders
* sending text snippets
* file transfer progress bars
* encryption in transit
* native Android/iOS/macOS/Windows apps
## Build ```bash
#### Archlinux ./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 ## License
AGPLv3, because freeeeeeedom AGPLv3

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 999 B

After

Width:  |  Height:  |  Size: 731 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 266 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 648 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -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) 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); Peer *new = g_new(Peer, 1);
new->ip = ip; new->ip = ip;
new->port = port; new->port = port;

View File

@@ -125,7 +125,7 @@ on_file_chooser_response (GtkNativeDialog *dialog,
if (filename) if (filename)
{ {
g_print("Chosen file is %s\n", 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); g_autofree gchar *filename = g_file_get_path (file);
if (g_file_query_exists (file, NULL)) { 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 { else {
g_print ("File doesn't exist: %s\n", filename); g_print ("File doesn't exist: %s\n", filename);

View File

@@ -26,7 +26,7 @@
#include "beam-me-up-get.h" #include "beam-me-up-get.h"
#include "beam-me-up-app.h" #include "beam-me-up-app.h"
static int port; static int local_port;
static SoupServer *glob_server; static SoupServer *glob_server;
//static const char *tls_cert_file, *tls_key_file; //static const char *tls_cert_file, *tls_key_file;
@@ -91,7 +91,7 @@ handle_incoming_file(const char *hash,
"s", "s",
g_strdup_printf("http://%s:%d/transfer/%s", g_strdup_printf("http://%s:%d/transfer/%s",
origin, origin,
port, local_port,
hash)), hash)),
g_variant_builder_add (builder, "s", filename); g_variant_builder_add (builder, "s", filename);
value = g_variant_new ("as", builder); value = g_variant_new ("as", builder);
@@ -191,7 +191,8 @@ do_server_timeout (gpointer user_data)
int int
teleport_server_add_route (gchar *name, teleport_server_add_route (gchar *name,
gchar *file_to_send, gchar *file_to_send,
gchar *destination) { gchar *destination,
int remote_port) {
GFile *file; GFile *file;
GFileInfo *fileInfo; GFileInfo *fileInfo;
gchar *path; 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", teleport_get_do_client_notify(g_strdup_printf("http://%s:%d/?token=%s&size=%jd&name=%s\n",
destination, destination,
port, remote_port,
name, name,
g_file_info_get_size(fileInfo), g_file_info_get_size(fileInfo),
g_file_info_get_display_name(fileInfo))); g_file_info_get_display_name(fileInfo)));
@@ -231,10 +232,10 @@ teleport_server_run (void) {
//GTlsCertificate *cert; //GTlsCertificate *cert;
GError *error = NULL; GError *error = NULL;
port = 3000; local_port = 3000;
glob_server = soup_server_new (SOUP_SERVER_SERVER_HEADER, "beam-me-up-httpd ", glob_server = soup_server_new (SOUP_SERVER_SERVER_HEADER, "beam-me-up-httpd ",
NULL); 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, soup_server_add_handler (glob_server, NULL,
server_callback, NULL, NULL); server_callback, NULL, NULL);

View File

@@ -20,8 +20,6 @@
#define __TELEPORT_SERVER_H #define __TELEPORT_SERVER_H
int teleport_server_run (void); int teleport_server_run (void);
int teleport_server_add_route (gchar *, int teleport_server_add_route (gchar *, gchar *, gchar *, int);
gchar *,
gchar *);
#endif /* __TELEPORT_SERVER_H */ #endif /* __TELEPORT_SERVER_H */

View File

@@ -43,85 +43,7 @@
</child> </child>
</object> </object>
</child> </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> <child>
<object class="GtkSeparator"> <object class="GtkSeparator">
<property name="margin-top">6</property> <property name="margin-top">6</property>