Galène videoconferencing server discussion list archives
 help / color / mirror / Atom feed
* [Galene] Peer-to-peer file transfer in Galene
@ 2022-01-30 16:40 Juliusz Chroboczek
  2022-01-30 16:44 ` [Galene] " Juliusz Chroboczek
  2022-01-30 16:45 ` Dave Taht
  0 siblings, 2 replies; 10+ messages in thread
From: Juliusz Chroboczek @ 2022-01-30 16:40 UTC (permalink / raw)
  To: galene

Hi,

I've been trying to refrain from adding too many features that are not
related to videoconferencing, but given the lack of simple to setup
peer-to-peer file transfer protocols, I've given in on this one.

In order to send a file to a member of the group, just type "sendfile user"
and follow the prompts.

This is stricly peer-to-peer: the server is only used for signalling
(exchanging IP addresses and cryptographic keys).  The protocol is
somewhat convoluted (and undocumented), in order to satisfy the following
properties:

  - rejecting an offered file does not disclose your IP address to the peer;
  - there is an application handshake at the end, so the sender has
    reliable feedback on whether the file went through.

Of course, sending or accepting a file does disclose your IP address --
that's the nature of peer-to-peer.

While the protocol is reasonably secure (SCTP over DTLS), anyone who
controls the server can trivially set up an MITM attack.  As always,
please set up your own server if you're exchanging sensitive data.

It's not very efficient.  On the sender side, we manually chop the data
into 16kB chunks (so that we don't run afoul of SCTP limitations).  Even
worse, on the receiver side, the whole file is kept in memory (since
Chrome does not support RTCDataChannel.binaryType being set to "blob", and
since no browser supports streaming received data to disk).  Still, it
should be sufficient for sharing your slides during a presentation or
sending funny pictures during a boring lecture.

-- Juliusz

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Galene] Re: Peer-to-peer file transfer in Galene
  2022-01-30 16:40 [Galene] Peer-to-peer file transfer in Galene Juliusz Chroboczek
@ 2022-01-30 16:44 ` Juliusz Chroboczek
  2022-01-30 16:45 ` Dave Taht
  1 sibling, 0 replies; 10+ messages in thread
From: Juliusz Chroboczek @ 2022-01-30 16:44 UTC (permalink / raw)
  To: galene

> In order to send a file to a member of the group, just type "sendfile user"
> and follow the prompts.

That should say "/sendfile user".

-- Juliusz

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Galene] Re: Peer-to-peer file transfer in Galene
  2022-01-30 16:40 [Galene] Peer-to-peer file transfer in Galene Juliusz Chroboczek
  2022-01-30 16:44 ` [Galene] " Juliusz Chroboczek
@ 2022-01-30 16:45 ` Dave Taht
  2022-01-30 17:22   ` Juliusz Chroboczek
  1 sibling, 1 reply; 10+ messages in thread
From: Dave Taht @ 2022-01-30 16:45 UTC (permalink / raw)
  To: Juliusz Chroboczek; +Cc: galene

https://webtorrent.io/ was pretty neat.

thx for going back to having fun with galene, btw. using computers
should be fun!

On Sun, Jan 30, 2022 at 8:40 AM Juliusz Chroboczek <jch@irif.fr> wrote:
>
> Hi,
>
> I've been trying to refrain from adding too many features that are not
> related to videoconferencing, but given the lack of simple to setup
> peer-to-peer file transfer protocols, I've given in on this one.
>
> In order to send a file to a member of the group, just type "sendfile user"
> and follow the prompts.
>
> This is stricly peer-to-peer: the server is only used for signalling
> (exchanging IP addresses and cryptographic keys).  The protocol is
> somewhat convoluted (and undocumented), in order to satisfy the following
> properties:
>
>   - rejecting an offered file does not disclose your IP address to the peer;
>   - there is an application handshake at the end, so the sender has
>     reliable feedback on whether the file went through.
>
> Of course, sending or accepting a file does disclose your IP address --
> that's the nature of peer-to-peer.
>
> While the protocol is reasonably secure (SCTP over DTLS), anyone who
> controls the server can trivially set up an MITM attack.  As always,
> please set up your own server if you're exchanging sensitive data.
>
> It's not very efficient.  On the sender side, we manually chop the data
> into 16kB chunks (so that we don't run afoul of SCTP limitations).  Even
> worse, on the receiver side, the whole file is kept in memory (since
> Chrome does not support RTCDataChannel.binaryType being set to "blob", and
> since no browser supports streaming received data to disk).  Still, it
> should be sufficient for sharing your slides during a presentation or
> sending funny pictures during a boring lecture.
>
> -- Juliusz
> _______________________________________________
> Galene mailing list -- galene@lists.galene.org
> To unsubscribe send an email to galene-leave@lists.galene.org



-- 
I tried to build a better future, a few times:
https://wayforward.archive.org/?site=https%3A%2F%2Fwww.icei.org

Dave Täht CEO, TekLibre, LLC

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Galene] Re: Peer-to-peer file transfer in Galene
  2022-01-30 16:45 ` Dave Taht
@ 2022-01-30 17:22   ` Juliusz Chroboczek
  2022-01-30 17:34     ` Dave Taht
  0 siblings, 1 reply; 10+ messages in thread
From: Juliusz Chroboczek @ 2022-01-30 17:22 UTC (permalink / raw)
  To: Dave Taht; +Cc: galene

> https://webtorrent.io/ was pretty neat.

Yeah, but it's for mass distribution, not for zero-setup file transfers.
Think e-mail attachments.

> thx for going back to having fun with galene,

Just taking a quick break from the exam session :-/

-- Juliusz

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Galene] Re: Peer-to-peer file transfer in Galene
  2022-01-30 17:22   ` Juliusz Chroboczek
@ 2022-01-30 17:34     ` Dave Taht
  2022-01-30 18:00       ` Juliusz Chroboczek
  0 siblings, 1 reply; 10+ messages in thread
From: Dave Taht @ 2022-01-30 17:34 UTC (permalink / raw)
  To: Juliusz Chroboczek; +Cc: galene

On Sun, Jan 30, 2022 at 9:22 AM Juliusz Chroboczek <jch@irif.fr> wrote:
>
> > https://webtorrent.io/ was pretty neat.
>
> Yeah, but it's for mass distribution, not for zero-setup file transfers.
> Think e-mail attachments.

The half formed thought was "share my slides with all participants".
Or my data files. I see folk reverting to dropbox a lot.

/sendall data.tgz

> > thx for going back to having fun with galene,
>
> Just taking a quick break from the exam session :-/

I'm in recovery from helping write this:
https://www.bitag.org/documents/BITAG_latency_explained.pdf

Anything, anything else, even coding in C, would be relaxing.

> -- Juliusz


-- 
I tried to build a better future, a few times:
https://wayforward.archive.org/?site=https%3A%2F%2Fwww.icei.org

Dave Täht CEO, TekLibre, LLC

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Galene] Re: Peer-to-peer file transfer in Galene
  2022-01-30 17:34     ` Dave Taht
@ 2022-01-30 18:00       ` Juliusz Chroboczek
  2022-01-30 18:12         ` Dave Taht
  0 siblings, 1 reply; 10+ messages in thread
From: Juliusz Chroboczek @ 2022-01-30 18:00 UTC (permalink / raw)
  To: Dave Taht; +Cc: galene

> The half formed thought was "share my slides with all participants".
> Or my data files. I see folk reverting to dropbox a lot.
> 
> /sendall data.tgz

That would be called '/publish'.

It'd be fairly easy to implement (just publish the per-file nonce in
group.data, and keep the file around until explicitly cancelled), but
recall that it's peer-to-peer -- without some form of queuing, you'd
probably congest your uplink pretty badly.  Or perhaps not, WiFi has
improved a lot since I was a dashing young lad.

-- Juliusz



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Galene] Re: Peer-to-peer file transfer in Galene
  2022-01-30 18:00       ` Juliusz Chroboczek
@ 2022-01-30 18:12         ` Dave Taht
  2022-01-30 18:19           ` Juliusz Chroboczek
  0 siblings, 1 reply; 10+ messages in thread
From: Dave Taht @ 2022-01-30 18:12 UTC (permalink / raw)
  To: Juliusz Chroboczek; +Cc: galene

On Sun, Jan 30, 2022 at 10:00 AM Juliusz Chroboczek <jch@irif.fr> wrote:
>
> > The half formed thought was "share my slides with all participants".
> > Or my data files. I see folk reverting to dropbox a lot.
> >
> > /sendall data.tgz
>
> That would be called '/publish'.

Much better name, thx.

> It'd be fairly easy to implement (just publish the per-file nonce in
> group.data, and keep the file around until explicitly cancelled), but
> recall that it's peer-to-peer -- without some form of queuing, you'd
> probably congest your uplink pretty badly.  Or perhaps not, WiFi has
> improved a lot since I was a dashing young lad.

Well, the still half formed torrent-like thought was that it would be
torrent-like so that different chunks of the file went to different
locations and were meshed from there. So the speaker at least would
essentially only have one upload going per se', that would vanish
after the file ended up "out there"

Selfishly this would be intended to congest everyone's network roughly
equally, and exercise all these fancy new queuing algos.

>
> -- Juliusz
>
>


-- 
I tried to build a better future, a few times:
https://wayforward.archive.org/?site=https%3A%2F%2Fwww.icei.org

Dave Täht CEO, TekLibre, LLC

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Galene] Re: Peer-to-peer file transfer in Galene
  2022-01-30 18:12         ` Dave Taht
@ 2022-01-30 18:19           ` Juliusz Chroboczek
  2022-01-30 18:23             ` Dave Taht
  0 siblings, 1 reply; 10+ messages in thread
From: Juliusz Chroboczek @ 2022-01-30 18:19 UTC (permalink / raw)
  To: Dave Taht; +Cc: galene

> Well, the still half formed torrent-like thought was that it would be
> torrent-like so that different chunks of the file went to different
> locations and were meshed from there.

The simple solution is to upload the file to the server and make it
available to clients over HTTP(S).  This also avoids disclosing IP
addresses.

The only con is that it requires storage on the server, which might or
might not be available.

-- Juliusz

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Galene] Re: Peer-to-peer file transfer in Galene
  2022-01-30 18:19           ` Juliusz Chroboczek
@ 2022-01-30 18:23             ` Dave Taht
  2022-01-30 18:34               ` Juliusz Chroboczek
  0 siblings, 1 reply; 10+ messages in thread
From: Dave Taht @ 2022-01-30 18:23 UTC (permalink / raw)
  To: Juliusz Chroboczek; +Cc: galene

On Sun, Jan 30, 2022 at 10:20 AM Juliusz Chroboczek <jch@irif.fr> wrote:
>
> > Well, the still half formed torrent-like thought was that it would be
> > torrent-like so that different chunks of the file went to different
> > locations and were meshed from there.
>
> The simple solution is to upload the file to the server and make it
> available to clients over HTTP(S).  This also avoids disclosing IP
> addresses.

That would beat the multistep process that dropbox is today.

/get ? /pull? /subscribe?

> The only con is that it requires storage on the server, which might or
> might not be available.

admin's choice.

in other news:

https://github.com/pion/webrtc/issues/9#issuecomment-1019411785

>
> -- Juliusz



-- 
I tried to build a better future, a few times:
https://wayforward.archive.org/?site=https%3A%2F%2Fwww.icei.org

Dave Täht CEO, TekLibre, LLC

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Galene] Re: Peer-to-peer file transfer in Galene
  2022-01-30 18:23             ` Dave Taht
@ 2022-01-30 18:34               ` Juliusz Chroboczek
  0 siblings, 0 replies; 10+ messages in thread
From: Juliusz Chroboczek @ 2022-01-30 18:34 UTC (permalink / raw)
  To: Dave Taht; +Cc: galene

> in other news:
> 
> https://github.com/pion/webrtc/issues/9#issuecomment-1019411785

Yeah, that's pretty cool.  I need to think about how to integrate it in
Galene, but it should not be too difficult.

-- Juliusz

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-01-30 18:34 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-30 16:40 [Galene] Peer-to-peer file transfer in Galene Juliusz Chroboczek
2022-01-30 16:44 ` [Galene] " Juliusz Chroboczek
2022-01-30 16:45 ` Dave Taht
2022-01-30 17:22   ` Juliusz Chroboczek
2022-01-30 17:34     ` Dave Taht
2022-01-30 18:00       ` Juliusz Chroboczek
2022-01-30 18:12         ` Dave Taht
2022-01-30 18:19           ` Juliusz Chroboczek
2022-01-30 18:23             ` Dave Taht
2022-01-30 18:34               ` Juliusz Chroboczek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox