Skip to content
Direct file transfer over WebRTC
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
_client/web Fixed codacy Apr 8, 2019
internal Fixed tests Apr 13, 2019
pkg Added option to specify STUN Apr 13, 2019
.codacy.yml Fixed codacy Apr 8, 2019
.gitignore Started to work on Web Client Apr 2, 2019
.goreleaser.yml Added goreleaser Mar 10, 2019
.travis.yml Added basic CI Mar 10, 2019
LICENSE Initial commit Mar 8, 2019
Makefile Refacto, clean repo Mar 17, 2019 Added AwesomeGo mention Apr 10, 2019
go.mod Switch to pion/webrtc v2 Apr 8, 2019
go.sum Switch to pion/webrtc v2 Apr 8, 2019
main.go Fixed linter Apr 8, 2019

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


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.



This project is still in its early stage.

How does it work ?


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



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


# 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


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.


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


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

You can’t perform that action at this time.