Direct file transfer over WebRTC

Build Status Go Report Card Codacy Badge Coverage Status License: MIT Mentioned in Awesome Go

GFile

gfile is a WebRTC based file exchange software.

It allows to share a file directly between two computers, without the need of a third party.

ezgif-5-9936f8008e4d

Note

This project is still in its early stage.

How does it work ?

Schema

The STUN server is only used to retrieve informations metadata (how to connect the two clients). The data you transfer with gfile does not transit through it.

More informations here

Usage

Sender

gfile send --file filename
  • Run the command
  • A base64 encoded SDP will appear, send it to the remote client
  • Follow the instructions to send the client's SDP to your process
  • The file transfer should start

Receiver

# SDP being the base64 SDP gotten from the other client
echo "$SDP" | gfile receive -o filename
  • Pipe the other client's SDP to gfile
  • A base64 encoded SDP will appear, send it to the remote client
  • The file transfer should start

Benchmark

gfile is able to benchmark the network speed between 2 clients (1 master and 1 slave) with the bench command. For detailed instructions, see Sender and Receiver instructions.

This feature is still an experiment.

# Run as 'master'
gfile bench -m

# Run as 'slave'
echo "$SDP" |  gfile bench

Web Interface

A web interface is being developed via WebAssembly. It is currently not working.

Debug

In order to obtain a more verbose output, it is possible to define the logging level via the GFILE_LOG environment variable.

Example: export GFILE_LOG="TRACE" See function setupLogger in main.go for more information

Contributors

Special thanks to Sean DuBois for his help with pion/webrtc and Yutaka Takeda for his work on pion/sctp

Similar Resources

Demonstration of using Pion WebRTC with a shared socket

pion-webrtc-shared-socket This example demonstrates how Pion WebRTC can use an already listening UDP socket. On startup we listen on UDP Socket 8000.

Apr 4, 2022

WebRTC media servers stress testing tool (currently only Janus)

 WebRTC media servers stress testing tool (currently only Janus)

GHODRAT WebRTC media servers stress testing tool (currently only Janus) Architecture Janus media-server under load Deployment ghodrat # update or crea

Nov 9, 2022

This project is the eloboration of pion/webrtc.

This project is the eloboration of pion/webrtc. The idea is to make the (pion/webrtc) sfu-ws example be able to handle multiple rooms

Nov 29, 2021

Go Webrtc Signaling Server

Go Webrtc Signaling Server This package is used to listen for Remote SDP (Sessio

Sep 7, 2022

Peerconnection_explainer - PeerConnection-Explainer parses WebRTC Offers/Answers then provides summaries and suggestions

PeerConnection Explainer PeerConnection Explainer decodes WebRTC... so you don't have too! PeerConnection Explainer parses WebRTC Offers/Answers then

Oct 31, 2022

Overlay networks based on WebRTC.

Overlay networks based on WebRTC.

weron Overlay networks based on WebRTC. ⚠️ weron has not yet been audited! While we try to make weron as secure as possible, it has not yet undergone

Jan 4, 2023

SSHWaiterUtil - Wait for file to appear over an SSH connection

SSHWaiterUtil Simple util to wait for a remote file to appear, over SSH using pr

Jan 11, 2022

A MCBE Proxy supporting fast transfer and much more!

A MCBE Proxy supporting fast transfer and much more!

Downloads Pipelines Here you can find all the build please select the latest and click Artifacts

Oct 17, 2022

📦 Command line peer-to-peer data transfer tool based on libp2p.

pcp - Peer Copy Command line peer-to-peer data transfer tool based on libp2p. Table of Contents Motivation Project Status How does it work? Usage Inst

Jan 5, 2023
Comments
  • Disconnection / large file

    Disconnection / large file

    ~While transferring data, the sender suffers a disconnection after 40s-1min.~ ~The sender reconnects automatically, but it's impossible to resume the transfer.~ Disconnection issue fixed with https://github.com/pions/webrtc/pull/480

    If the connection is stable, the speed drops heavily over time, making the transfer of huge files almost impossible / really long.

    Is most likely related/due to https://github.com/pions/sctp/issues/23

  • Exception on Windows

    Exception on Windows

    Aww man! This project looks awesome. It's exactly what I've been searching for.... but... on my Windows box I get an error using any command....

    C:\Users\User\downloads\gfile_Windows_x86_64>gfile.exe bench
    Exception 0xc0000005 0x0 0x7ffcbe810fff 0xd70000
    PC=0xd70000
    
    syscall.loadsystemlibrary(0xc00000eac0, 0x0, 0x0)
            /usr/local/Cellar/go/1.12.1/libexec/src/runtime/syscall_windows.go:135 +0x11d
    syscall.LoadDLL(0x7b2024, 0xc, 0xc000004280, 0xc000066eb0, 0xc000066ea0)
            /usr/local/Cellar/go/1.12.1/libexec/src/syscall/dll_windows.go:56 +0xd8
    syscall.(*LazyDLL).Load(0xc000004280, 0x0, 0x0)
            /usr/local/Cellar/go/1.12.1/libexec/src/syscall/dll_windows.go:212 +0xa9
    syscall.(*LazyProc).Find(0xc000041d10, 0x0, 0x0)
            /usr/local/Cellar/go/1.12.1/libexec/src/syscall/dll_windows.go:267 +0xa4
    syscall.(*LazyProc).mustFind(0xc000041d10)
            /usr/local/Cellar/go/1.12.1/libexec/src/syscall/dll_windows.go:285 +0x32
    syscall.(*LazyProc).Addr(0xc000041d10, 0xca0008)
            /usr/local/Cellar/go/1.12.1/libexec/src/syscall/dll_windows.go:294 +0x32
    internal/syscall/windows.GetAdaptersAddresses(0x1000000000, 0x0, 0xc0000e6000, 0xc000066fd0, 0xffffffffffffffff, 0x0)
            /usr/local/Cellar/go/1.12.1/libexec/src/internal/syscall/windows/zsyscall_windows.go:75 +0x38
    net.adapterAddresses(0x415411, 0xce7000, 0x200, 0xcfffff, 0x100)
            /usr/local/Cellar/go/1.12.1/libexec/src/net/interface_windows.go:23 +0x98
    net.interfaceTable(0x0, 0x7afec6, 0x3, 0x73, 0xcab7f8, 0x30000000a78540)
            /usr/local/Cellar/go/1.12.1/libexec/src/net/interface_windows.go:48 +0x3b
    net.Interfaces(0x445326, 0x6, 0x30000, 0x2000, 0xc000067268)
            /usr/local/Cellar/go/1.12.1/libexec/src/net/interface.go:100 +0x35
    github.com/pion/ice.localInterfaces(0xc000010d80, 0x2, 0x2, 0x51d8d9, 0x789a00, 0xc00007e960)
            /Users/antoine/go/pkg/mod/github.com/pion/[email protected]/util.go:13 +0x3e
    github.com/pion/ice.(*Agent).gatherCandidatesLocal(0xc000084360, 0xc000010d80, 0x2, 0x2)
            /Users/antoine/go/pkg/mod/github.com/pion/[email protected]/agent.go:231 +0x64
    github.com/pion/ice.NewAgent(0xc000067530, 0xc000010d78, 0x1, 0x1)
            /Users/antoine/go/pkg/mod/github.com/pion/[email protected]/agent.go:177 +0x49a
    github.com/pion/webrtc/v2.(*ICEGatherer).Gather(0xc00007e780, 0x0, 0x0)
            /Users/antoine/go/pkg/mod/github.com/pion/webrtc/[email protected]/icegatherer.go:79 +0x249
    github.com/pion/webrtc/v2.(*PeerConnection).gather(...)
            /Users/antoine/go/pkg/mod/github.com/pion/webrtc/[email protected]/peerconnection.go:507
    github.com/pion/webrtc/v2.(*API).NewPeerConnection(0xc000033c80, 0xc000035740, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
            /Users/antoine/go/pkg/mod/github.com/pion/webrtc/[email protected]/peerconnection.go:129 +0x28c
    github.com/pion/webrtc/v2.NewPeerConnection(0xc000035740, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
            /Users/antoine/go/pkg/mod/github.com/pion/webrtc/[email protected]/peerconnection.go:86 +0xf3
    github.com/antonito/gfile/internal/session.(*Session).CreateConnection(0xc0000aa000, 0x7c6ba8, 0xc000006018, 0xc000006010)
            /Users/antoine/Documents/perso/gfile/internal/session/session.go:53 +0x111
    github.com/antonito/gfile/pkg/session/bench.(*Session).Start(0xc0000aa000, 0x0, 0x0)
            /Users/antoine/Documents/perso/gfile/pkg/session/bench/init.go:12 +0x5a
    github.com/antonito/gfile/cmd/bench.handler(0xc00008e580, 0x0, 0xc00008e580)
            /Users/antoine/Documents/perso/gfile/cmd/bench/cmd.go:20 +0xaa
    gopkg.in/urfave/cli%2ev1.HandleAction(0x73dd60, 0x7c6b88, 0xc00008e580, 0xc000038100, 0x0)
            /Users/antoine/go/pkg/mod/gopkg.in/urfave/[email protected]/app.go:490 +0xcf
    gopkg.in/urfave/cli%2ev1.Command.Run(0x7b0365, 0x5, 0x0, 0x0, 0xc000033ba0, 0x1, 0x1, 0x7b633a, 0x17, 0x0, ...)
            /Users/antoine/go/pkg/mod/gopkg.in/urfave/[email protected]/command.go:210 +0x99d
    gopkg.in/urfave/cli%2ev1.(*App).Run(0xc000088b60, 0xc000004440, 0x2, 0x2, 0x0, 0x0)
            /Users/antoine/go/pkg/mod/gopkg.in/urfave/[email protected]/app.go:255 +0x6b6
    main.run(0xc000004440, 0x2, 0x2, 0x0, 0x6f62c7)
            /Users/antoine/Documents/perso/gfile/main.go:53 +0x20b
    main.main()
            /Users/antoine/Documents/perso/gfile/main.go:57 +0x50
    rax     0x7ffcbb1d3590
    rbx     0x7ffcbb1d358e
    rcx     0x5f
    rdi     0xffffffffffbadd11
    rsi     0x0
    rbp     0x0
    rsp     0xc9f4f0
    r8      0x0
    r9      0x0
    r10     0x0
    r11     0x97c
    r12     0xc000007a
    r13     0x0
    r14     0x7ffcbb1d3590
    r15     0x7ffcbe610000
    rip     0xd70000
    rflags  0x10206
    cs      0x33
    fs      0x53
    gs      0x2b
    
    
  • Upgrading to /v3

    Upgrading to /v3

    Hey @Antonito

    Would you be interested in upgrading to /v3?

    I recommend this project to others on File Transfer/DataChannel usage. So would love for them to start off with a /v3. If you are interested I can submit a PR in a few weeks. Want to check before I attempt it though. It should be only one change around Trickle ICE

    thanks!

Transfer 10Gbps http traffic over 1Gbps networks :)

httpteleport Teleports 10Gbps http traffic over 1Gbps networks. Built on top of fastrpc. Use cases httpteleport may significantly reduce inter-server

Nov 30, 2022
A distributed Layer 2 Direct Server Return (L2DSR) load balancer for Linux using XDP/eBPF

VC5 A distributed Layer 2 Direct Server Return (L2DSR) load balancer for Linux using XDP/eBPF This is very much a proof of concept at this stage - mos

Dec 22, 2022
Client-Server tcp-based file transfer application in GoLang

Клиент-серверный файловый сервис на базе протокола TCP Клиент client.go шифрует свои файлы алгоритмом AES с режимом CBC и помещает их на сервер server

Apr 1, 2022
The devs are over here at devzat, chat over SSH!

Devzat Where are the devs at? Devzat! Devzat is chat over SSH Try it out: ssh sshchat.hackclub.com Add this to ~/.ssh/config: Host chat HostName s

Jan 7, 2023
Pure Go implementation of the WebRTC API
Pure Go implementation of the WebRTC API

Pion WebRTC A pure Go implementation of the WebRTC API New Release Pion WebRTC v3.0.0 has been released! See the release notes to learn about new feat

Jan 1, 2023
Pure Go implementation of the WebRTC API
Pure Go implementation of the WebRTC API

Pure Go implementation of the WebRTC API

Jan 8, 2023
A yet to be voice call application in terminal. with the power of go and webRTC (pion).

Kenny I'm just trying to make a cli operated voice call chat application using go with help of webRTC and PortAudio. It might stay a Work In Progress

Dec 2, 2022
A toy MMO example built using Ebiten and WebRTC DataChannels (UDP)
A toy MMO example built using Ebiten and WebRTC DataChannels (UDP)

Ebiten WebRTC Toy MMO ⚠️ This is a piece of incomplete hobby work and not robust. Please read the "Why does this project exist?" section. What is this

Aug 28, 2022
Scalable WebRTC Signaling Server with ayame-like protocol.

ayu ayu is WebRTC Signaling Server with ayame-like protocol. Scalable: ayu uses Redis to store room states, so it can be used on serverless platforms

Nov 11, 2022
Example of using Pion WebRTC to play H264 + Ogg from disk

This repo demonstrates how you can use Pion WebRTC to play H264 and Ogg from disk. These same APIs can be used to pull from other sources. You can use

Sep 18, 2021