Skip to content
프로젝트

소개

WebRTC를 통한 직접 파일 전송

생산성 및 자동화

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

CI Go Report Card License: MIT Mentioned in Awesome Go

GFile

gfile is a WebRTC-based file exchange tool.

It lets you 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 help the two clients find each other through NAT. The data you transfer with gfile does not transit through it.

More information here

For wire-format and session-protocol details, see PROTOCOL.md.

STUN configuration

gfile defaults to Google's public STUN server (stun.l.google.com:19302). You can override this with --stun:

# Use a specific STUN server
gfile --stun stun.cloudflare.com:3478 send -f filename

# Use multiple STUN servers (comma-separated)
gfile --stun stun.l.google.com:19302,stun.cloudflare.com:3478 send -f filename

# Disable STUN entirely — host/mDNS candidates only (LAN use)
gfile --stun="" send -f filename

mDNS

By default gfile advertises host ICE candidates as .local mDNS hostnames instead of raw LAN IPs, matching modern browser behavior. This keeps your internal network topology out of the SDP you paste around, and is enough for a LAN transfer even with --stun="".

Disable it if a peer on the other side cannot resolve mDNS:

gfile --mdns=false send -f filename

Usage

Sender

gfile send --file filename
  • Run the command
  • A compact 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

Pass --connections N (1..16) to open N parallel peer connections. The default is 1. Higher values can improve throughput on high-latency or high-bandwidth links — see PROTOCOL.md.

Receiver

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

Benchmark

gfile can benchmark the network speed between two clients (one sender, one receiver) with the bench command. The SDP exchange works the same as in send / receive.

This feature is still an experiment.

# Run as 'sender'
gfile bench -s

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

Debug

For more verbose output, set 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

관련 프로젝트 살펴보기

불러오는 중…