mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2026-04-06 09:53:49 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8de899f124 | ||
|
|
87097e9cd4 | ||
|
|
b2fc6415da | ||
|
|
2d8bbd5a79 | ||
|
|
cae3bb7c7b |
@@ -33,13 +33,13 @@ Developed based on [Snapdrop](https://github.com/RobinLinus/snapdrop)
|
||||
|
||||
## Differences to Snapdrop
|
||||
|
||||
### Device Pairing
|
||||
### Device Pairing / Internet Transfer
|
||||
* Pair devices via 6-digit code or QR-Code
|
||||
* Pair devices outside your local network or in complex network environment (public Wi-Fi, company network, Apple Private Relay, VPN etc.).
|
||||
* Connect to devices on your mobile hotspot.
|
||||
* Paired devices will always find each other via shared secrets even after reopening the browser or the Progressive Web App
|
||||
* You will always discover devices on your local network. Paired devices are shown additionally.
|
||||
* Paired devices outside your local network that are behind a NAT are connected automatically via [Open Relay: Free WebRTC TURN Server](https://www.metered.ca/tools/openrelay/)
|
||||
* Paired devices outside your local network that are behind a NAT are connected automatically via the PairDrop TURN server.
|
||||
|
||||
### [Improved UI for sending/receiving files](https://github.com/RobinLinus/snapdrop/issues/560)
|
||||
* Files are transferred only after a request is accepted first. On transfer completion files are downloaded automatically if possible.
|
||||
@@ -89,9 +89,9 @@ You can [host your own instance with Docker](/docs/host-your-own.md).
|
||||
|
||||
|
||||
## Support the Community
|
||||
PairDrop is free and always will be. Still, we have to pay for the domain.
|
||||
PairDrop is free and always will be. Still, we have to pay for the domain and the server.
|
||||
|
||||
To contribute and support me:<br>
|
||||
To contribute and support:<br>
|
||||
<a href="https://www.buymeacoffee.com/pairdrop" target="_blank">
|
||||
<img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important;" >
|
||||
</a>
|
||||
|
||||
19
docker-compose-coturn.yml
Normal file
19
docker-compose-coturn.yml
Normal file
@@ -0,0 +1,19 @@
|
||||
version: "3"
|
||||
services:
|
||||
node:
|
||||
image: "node:lts-alpine"
|
||||
user: "node"
|
||||
working_dir: /home/node/app
|
||||
volumes:
|
||||
- ./:/home/node/app
|
||||
command: ash -c "npm i && npm run start:prod"
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "3000:3000"
|
||||
coturn_server:
|
||||
image: "coturn/coturn"
|
||||
restart: always
|
||||
network_mode: "host"
|
||||
volumes:
|
||||
- ./turnserver.conf:/etc/coturn/turnserver.conf
|
||||
#you need to copy turnserver_example.conf to turnserver.conf and specify domain, IP address, user and password
|
||||
20
docs/faq.md
20
docs/faq.md
@@ -104,10 +104,13 @@ Here's a list of some third-party apps compatible with PairDrop:
|
||||
What about the connection? Is it a P2P-connection directly from device to device or is there any third-party-server?
|
||||
</summary>
|
||||
|
||||
It uses a P2P connection if WebRTC is supported by the browser. WebRTC needs a Signaling Server, but it is only used to establish a connection and is not involved in the file transfer.
|
||||
It uses a WebRTC peer to peer connection. WebRTC needs a Signaling Server that is only used to establish a connection. The server is not involved in the file transfer.
|
||||
|
||||
If your devices are paired and behind a NAT, the public TURN Server from [Open Relay](https://www.metered.ca/tools/openrelay/) is used to route your files and messages.
|
||||
If devices are on the same network, none of your files are ever sent to any server.
|
||||
|
||||
If your devices are paired and behind a NAT, the PairDrop TURN Server is used to route your files and messages. See the [Technical Documentation](technical-documentation.md#encryption-webrtc-stun-and-turn) to learn more about STUN, TURN and WebRTC.
|
||||
|
||||
If you host your own instance and want to support devices that do not support WebRTC, you can [start the PairDrop instance with an activated Websocket fallback](https://github.com/schlagmichdoch/PairDrop/blob/master/docs/host-your-own.md#websocket-fallback-for-vpn).
|
||||
|
||||
<br>
|
||||
|
||||
@@ -118,11 +121,12 @@ If your devices are paired and behind a NAT, the public TURN Server from [Open R
|
||||
What about privacy? Will files be saved on third-party-servers?
|
||||
</summary>
|
||||
|
||||
None of your files are ever sent to any server. Files are sent only between peers. PairDrop doesn't even use a database. If you are curious have a look [at the Server](https://github.com/schlagmichdoch/pairdrop/blob/master/index.js).
|
||||
Files are sent directly between peers. PairDrop doesn't even use a database. If you are curious, have a look [at the Server](https://github.com/schlagmichdoch/pairdrop/blob/master/index.js).
|
||||
WebRTC encrypts the files on transit.
|
||||
|
||||
If your devices are paired and behind a NAT, the public TURN Server from [Open Relay](https://www.metered.ca/tools/openrelay/) is used to route your files and messages.
|
||||
If devices are on the same network, none of your files are ever sent to any server.
|
||||
|
||||
If your devices are paired and behind a NAT, the PairDrop TURN Server is used to route your files and messages. See the [Technical Documentation](technical-documentation.md#encryption-webrtc-stun-and-turn) to learn more about STUN, TURN and WebRTC.
|
||||
|
||||
<br>
|
||||
|
||||
@@ -147,9 +151,7 @@ Yes. Your files are sent using WebRTC, which encrypts them on transit. To ensure
|
||||
|
||||
Naturally, if traffic needs to be routed through the turn server because your devices are behind different NATs, transfer speed decreases.
|
||||
|
||||
As the public TURN server used is not super fast, you can easily [specify to use your own TURN server](https://github.com/schlagmichdoch/PairDrop/blob/master/docs/host-your-own.md#specify-stunturn-servers) if you host your own instance.
|
||||
|
||||
Alternatively, you can open a hotspot on one of your devices to bridge the connection which makes transfers much faster as no TURN server is needed.
|
||||
You can open a hotspot on one of your devices to bridge the connection which omits the need of the TURN server.
|
||||
|
||||
- [How to open a hotspot on Windows](https://support.microsoft.com/en-us/windows/use-your-windows-pc-as-a-mobile-hotspot-c89b0fad-72d5-41e8-f7ea-406ad9036b85#WindowsVersion=Windows_11)
|
||||
- [How to open a hotspot on Mac](https://support.apple.com/guide/mac-help/share-internet-connection-mac-network-users-mchlp1540/mac)
|
||||
@@ -171,7 +173,7 @@ Then, all data should be sent directly between devices and your data plan should
|
||||
Snapdrop and PairDrop are a study in radical simplicity. The user interface is insanely simple. Features are chosen very carefully because complexity grows quadratically since every feature potentially interferes with each other feature. We focus very narrowly on a single use case: instant file transfer.
|
||||
We are not trying to optimize for some edge-cases. We are optimizing the user flow of the average users. Don't be sad if we decline your feature request for the sake of simplicity.
|
||||
|
||||
If you want to learn more about simplicity you can read [Insanely Simple: The Obsession that Drives Apple's Success](https://www.amazon.com/Insanely-Simple-Ken-Segall-audiobook/dp/B007Z9686O) or [Thinking, Fast and Slow](https://www.amazon.com/Thinking-Fast-Slow-Daniel-Kahneman/dp/0374533555).
|
||||
If you want to learn more about simplicity you can read *Insanely Simple: The Obsession that Drives Apple's Success* or *Thinking, Fast and Slow*.
|
||||
|
||||
|
||||
<br>
|
||||
@@ -183,7 +185,7 @@ If you want to learn more about simplicity you can read [Insanely Simple: The Ob
|
||||
Snapdrop and PairDrop are awesome! How can I support them?
|
||||
</summary>
|
||||
|
||||
* [Buy me a coffee to support open source software](https://www.buymeacoffee.com/pairdrop)
|
||||
* [Buy me a coffee](https://www.buymeacoffee.com/pairdrop) to pay for the domain and the server, and support open source software
|
||||
* [File bugs, give feedback, submit suggestions](https://github.com/schlagmichdoch/pairdrop/issues)
|
||||
* Share PairDrop on social media.
|
||||
* Fix bugs and make a pull request.
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
# Deployment Notes
|
||||
The easiest way to get PairDrop up and running is by using Docker.
|
||||
|
||||
> <b>TURN server for Internet Transfer</b>
|
||||
>
|
||||
> Beware that you have to host your own TURN server in order to enable transfers between different networks.
|
||||
>
|
||||
> You can follow [this guide](https://gabrieltanner.org/blog/turn-server/) to either install coturn directly on your system (Step 1) or deploy it via docker-compose (Step 5).
|
||||
|
||||
## Deployment with Docker
|
||||
|
||||
### Docker Image from Docker Hub
|
||||
@@ -50,6 +56,8 @@ Set options by using the following flags in the `docker run` command:
|
||||
> Specify the STUN/TURN servers PairDrop clients use by setting `RTC_CONFIG` to a JSON file including the configuration.
|
||||
> You can use `pairdrop/rtc_config_example.json` as a starting point.
|
||||
>
|
||||
> To host your own TURN server you can follow this guide: https://gabrieltanner.org/blog/turn-server/
|
||||
>
|
||||
> Default configuration:
|
||||
> ```json
|
||||
> {
|
||||
@@ -57,14 +65,6 @@ Set options by using the following flags in the `docker run` command:
|
||||
> "iceServers": [
|
||||
> {
|
||||
> "urls": "stun:stun.l.google.com:19302"
|
||||
> },
|
||||
> {
|
||||
> "urls": "stun:openrelay.metered.ca:80"
|
||||
> },
|
||||
> {
|
||||
> "urls": "turn:openrelay.metered.ca:443",
|
||||
> "username": "openrelayproject",
|
||||
> "credential": "openrelayproject"
|
||||
> }
|
||||
> ]
|
||||
> }
|
||||
@@ -186,6 +186,8 @@ $env:RTC_CONFIG="rtc_config.json"; npm start
|
||||
```
|
||||
> Specify the STUN/TURN servers PairDrop clients use by setting `RTC_CONFIG` to a JSON file including the configuration.
|
||||
> You can use `pairdrop/rtc_config_example.json` as a starting point.
|
||||
>
|
||||
> To host your own TURN server you can follow this guide: https://gabrieltanner.org/blog/turn-server/
|
||||
>
|
||||
> Default configuration:
|
||||
> ```json
|
||||
@@ -194,14 +196,6 @@ $env:RTC_CONFIG="rtc_config.json"; npm start
|
||||
> "iceServers": [
|
||||
> {
|
||||
> "urls": "stun:stun.l.google.com:19302"
|
||||
> },
|
||||
> {
|
||||
> "urls": "stun:openrelay.metered.ca:80"
|
||||
> },
|
||||
> {
|
||||
> "urls": "turn:openrelay.metered.ca:443",
|
||||
> "username": "openrelayproject",
|
||||
> "credential": "openrelayproject"
|
||||
> }
|
||||
> ]
|
||||
> }
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "pairdrop",
|
||||
"version": "1.6.0",
|
||||
"version": "1.6.1",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "pairdrop",
|
||||
"version": "1.6.0",
|
||||
"version": "1.6.1",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"express": "^4.18.2",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pairdrop",
|
||||
"version": "1.6.0",
|
||||
"version": "1.6.1",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const cacheVersion = 'v1.6.0';
|
||||
const cacheVersion = 'v1.6.1';
|
||||
const cacheTitle = `pairdrop-cache-${cacheVersion}`;
|
||||
const urlsToCache = [
|
||||
'index.html',
|
||||
|
||||
@@ -112,7 +112,7 @@ header > div:not(:hover) .icon-button:not(.selected) {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
header > div:hover::before {
|
||||
#theme-wrapper:hover::before {
|
||||
border-radius: 20px;
|
||||
background: currentColor;
|
||||
opacity: 0.1;
|
||||
@@ -204,7 +204,8 @@ body {
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
a {
|
||||
a,
|
||||
.icon-button {
|
||||
text-decoration: none;
|
||||
color: currentColor;
|
||||
cursor: pointer;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const cacheVersion = 'v1.6.0';
|
||||
const cacheVersion = 'v1.6.1';
|
||||
const cacheTitle = `pairdrop-included-ws-fallback-cache-${cacheVersion}`;
|
||||
const urlsToCache = [
|
||||
'index.html',
|
||||
|
||||
@@ -113,7 +113,7 @@ header > div:not(:hover) .icon-button:not(.selected) {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
header > div:hover::before {
|
||||
#theme-wrapper:hover::before {
|
||||
border-radius: 20px;
|
||||
background: currentColor;
|
||||
opacity: 0.1;
|
||||
@@ -205,7 +205,8 @@ body {
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
a {
|
||||
a,
|
||||
.icon-button {
|
||||
text-decoration: none;
|
||||
color: currentColor;
|
||||
cursor: pointer;
|
||||
|
||||
@@ -3,6 +3,11 @@
|
||||
"iceServers": [
|
||||
{
|
||||
"urls": "stun:stun.l.google.com:19302"
|
||||
},
|
||||
{
|
||||
"urls": "turn:example.com:3478",
|
||||
"username": "username",
|
||||
"credential": "password"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
38
turnserver_example.conf
Normal file
38
turnserver_example.conf
Normal file
@@ -0,0 +1,38 @@
|
||||
# TURN server name and realm
|
||||
realm=<DOMAIN>
|
||||
server-name=pairdrop
|
||||
|
||||
# IPs the TURN server listens to
|
||||
listening-ip=0.0.0.0
|
||||
|
||||
# External IP-Address of the TURN server
|
||||
external-ip=<IP_ADDRESS>
|
||||
|
||||
# Main listening port
|
||||
listening-port=3478
|
||||
|
||||
# Further ports that are open for communication
|
||||
min-port=10000
|
||||
max-port=20000
|
||||
|
||||
# Use fingerprint in TURN message
|
||||
fingerprint
|
||||
|
||||
# Log file path
|
||||
log-file=/var/log/turnserver.log
|
||||
|
||||
# Enable verbose logging
|
||||
verbose
|
||||
|
||||
# Specify the user for the TURN authentification
|
||||
user=user:password
|
||||
|
||||
# Enable long-term credential mechanism
|
||||
lt-cred-mech
|
||||
|
||||
# SSL certificates
|
||||
cert=/etc/letsencrypt/live/<DOMAIN>/cert.pem
|
||||
pkey=/etc/letsencrypt/live/<DOMAIN>/privkey.pem
|
||||
|
||||
# 443 for TURN over TLS, which can bypass firewalls
|
||||
tls-listening-port=443
|
||||
Reference in New Issue
Block a user