Antonito/gfile
关于
通过 WebRTC 直接传输文件
效率与自动化实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文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.

Note
This project is still in its early stage.
How does it work ?

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 functionsetupLoggerinmain.gofor more information
Contributors
- Antoine Baché (https://github.com/Antonito) Original author
Special thanks to Sean DuBois for his help with pion/webrtc and Yutaka Takeda for his work on pion/sctp
探索相关项目
加载中…