Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/a-wing/filegogo
A file transfer tool that can be used in the browser webrtc p2p
https://github.com/a-wing/filegogo
file-sharing p2p webrtc
Last synced: about 9 hours ago
JSON representation
A file transfer tool that can be used in the browser webrtc p2p
- Host: GitHub
- URL: https://github.com/a-wing/filegogo
- Owner: a-wing
- License: mit
- Created: 2020-08-30T13:23:02.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-10-28T16:32:22.000Z (over 1 year ago)
- Last Synced: 2025-01-30T08:13:09.766Z (8 days ago)
- Topics: file-sharing, p2p, webrtc
- Language: Go
- Homepage: https://send.22333.fun
- Size: 4.43 MB
- Stars: 283
- Watchers: 7
- Forks: 32
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-webrtc - Filegogo - A file transfer tool that can be used in the browser WebRTC p2p. (Projects / File Transfer)
README
![]()
Filegogo
A file transfer tool that can be used in the browser webrtc p2p
[![Demo.gif](https://i.postimg.cc/wTyzyHMc/Peek-2020-10-24-11-29.gif)](https://postimg.cc/8jS992hj)
## Deploy on your self server
```bash
docker run -p 8080:8080 ghcr.io/a-wing/filegogo:latest server
```## Architecture
![filegogo-arch](./filegogo-arch.excalidraw.svg)
### Components
- app
- [x] server
- [x] webapp
- [ ] client-cli (current, have many problems)
- lib
- [ ] libfgg.js (only browser)
- [ ] libfgg.go
- [ ] libfgg.rs## Build && Install
```sh
make
```## Run Development
### Webapp
```bash
npm install# frontend
# Default Listen port: 3000
# Auto Proxy port: 8080
npm run dev
```### Server
```bash
# Default Listen port: 8080
go run ./main.go server
```### Client
> run cli client. For example:
```bash
# send command
go run ./main.go send -s http://localhost:8080/6666# recv command
go run ./main.go recv -s http://localhost:8080/6666
```## Config
[Reference iceServer config](https://developer.mozilla.org/en-US/docs/Web/API/RTCIceServer)
### Built-in turn server
```toml
# Enable Built-in turn server
[turn]# if no set, use random user
user = "filegogo:filegogo"realm = "filegogo"
listen = "0.0.0.0:3478"# Public ip
# if aws, aliyun
publicIP = "0.0.0.0"
relayMinPort = 49160
relayMaxPort = 49200
```### iceServer Use Other
For example: [coturn](https://github.com/coturn/coturn)
#### Docker Deployment Coturn
```bash
docker run -d --network=host --name=coturn coturn/coturn:alpine \
-n --log-file=stdout \
--min-port=49160 --max-port=49200 \
--lt-cred-mech --fingerprint \
--no-multicast-peers --no-cli \
--no-tlsv1 --no-tlsv1_1 \
--realm=filegogo \
--user=filegogo:filegogo \
--external-ip='$(detect-external-ip)' \
--relay-ip='$(detect-external-ip)' \
--listening-ip='$(detect-external-ip)' \
--listening-device=eth0
```Test Deployment
```bash
# Test stun
turnutils_stunclient cn.22333.fun
turnutils_stunclient stun.22333.fun# Test turn
turnutils_uclient -u filegogo -w filegogo -y cn.22333.fun
turnutils_uclient -u filegogo -w filegogo -y turn.22333.fun
```#### Package Manager Deployment
```sh
apt install coturn
``````ini
# /etc/turnserver.conflistening-ip={YOUR_IP_ADDRESS}
relay-ip={YOUR_IP_ADDRESS}# Public ip
# if aws, aliyun
external-ip={YOUR_IP_ADDRESS}fingerprint
lt-cred-mech
user=filegogo:filegogo
realm=filegogo```
## Acknowledgments
- [pion](https://github.com/pion/webrtc)
- [croc](https://github.com/schollz/croc)
- [firefox-send](https://github.com/mozilla/send)
- [ffsend](https://github.com/timvisee/ffsend)