PairDrop
PairDrop copied to clipboard
[Bug] cf tunnel+device discovery not working
I try to host pairdrop and using cloudflare tunnel i get log about connecting other device to network but its not loading fully and with error i tried some ways but still not working
this is what i get when i set up IPV6_LOCALIZE=true
this is when i set up IPV6_LOCALIZE=false
with IPV6_LOCALIZE=4 i get
its discovering device in console but not in gui and after 3 seconds, there is an error.
should i set true to Disable Chunked Encoding/No Happy Eyeballs? what env should i use which ip exposed/local should i reverse to make it work woth cloudflare tunnel I tried to solve problem looking through this issue https://github.com/schlagmichdoch/PairDrop/issues/69 but still no result
my docker compose:
version: "4" services: pairdrop: image: lscr.io/linuxserver/pairdrop container_name: pairdrop environment: - PUID=1000 - PGID=1000 - TZ=Europe/Warsaw - RATE_LIMIT=false #optional - WS_FALLBACK=false #optional - RTC_CONFIG= #optional - DEBUG_MODE=false #optional - IPV6_LOCALIZE=4 ports: - 3088:3000 restart: unless-stopped
As the error message explains you need to deploy a TURN server alongside PairDrop for it to work behind Cloudflare. See Deployment notes for instructions.
Probably I should also provide a docker-compose file that does it all at once. I will look into it.
i got same issue i think only after recent update even without cf bypassed it wouldn't work on a different network
@alexonpeace have you deployed a TURN server? If at least one device is behind a NAT you need that for connections:
TURN server for Internet Transfer
Beware that you have to host your own TURN server to enable transfers between different networks.
Follow this guide to either install coturn directly on your system (Step 1)
or deploy it via docker-compose (Step 5).
Alternatively, use a free, pre-configured TURN server like OpenRelay
I have refactored the documentation and fixed the Docker Compose file to host coturn alongside PairDrop.
@alexonpeace @rafalohaki Please checkout this branch to test if everything is as easy as expected:
-
git clone https://github.com/schlagmichdoch/PairDrop.git
-
cd PairDrop
-
git checkout fix-turn-container
- Follow the guide at https://github.com/schlagmichdoch/PairDrop/blob/fix-turn-container/docs/host-your-own.md#coturn-and-pairdrop-via-docker-compose
After your feedback I would merge this into master.
Corresponding PR: #195
The following comments were deleted by GitHub (via hubot) as part of mistakenly marking this account as spam on 17th February 2024. The correct thread order and the creation date is unclear. I decided to manually restore them anyway in order to complete the information this issue holds even though the restored information might be outdated:
Comment by @schlagmichdoch:
The docker changes have since been released into v1.10.0
so your can also find the documentation on the master branch:
https://github.com/schlagmichdoch/PairDrop/blob/master/docs/host-your-own.md#coturn-and-pairdrop-via-docker-compose
Have you since had any luck in hosting your PairDrop instance? :)
i used stun server from cloudflare. its working
i use stun,its not working, i don't know where is wrong.
i use google'turn server(stun.l.google.com), when i test webrtc on https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/,its work,but,when i use my deploy pairdrop,it show rtc connection failed。
Closing this as stale. Feel free to reopen if the issue is still present.
i used stun server from cloudflare. its working
@rafalohaki can you share some info on how you did it?
I've added the variable RTC_CONFIG=/config/rtc_config.json
into my docker-compose.yaml, I've created the file rtc_config.json like this:
{
"sdpSemantics": "unified-plan",
"iceServers": [
{
"urls": "stun:stun.cloudflare.com:3478"
}
]
}
The files gets read because in the log I see:
----DEBUG ENVIRONMENT VARIABLES----
pairdrop | {
pairdrop | "debugMode": true,
pairdrop | "port": 3000,
pairdrop | "wsFallback": false,
pairdrop | "rtcConfig": {
pairdrop | "sdpSemantics": "unified-plan",
pairdrop | "iceServers": [
pairdrop | {
pairdrop | "urls": "stun:stun.cloudflare.com:3478"
pairdrop | }
pairdrop | ]
pairdrop | },
pairdrop | "signalingServer": false,
pairdrop | "ipv6Localize": false,
pairdrop | "rateLimit": false,
pairdrop | "buttons": {
pairdrop | "donation_button": {},
pairdrop | "twitter_button": {},
pairdrop | "mastodon_button": {},
pairdrop | "bluesky_button": {},
pairdrop | "custom_button": {},
pairdrop | "privacypolicy_button": {}
pairdrop | },
pairdrop | "autoStart": false,
pairdrop | "localhostOnly": false
pairdrop | }
But it still doesn't see devices outside the same LAN that I pair.
But it still doesn't see devices outside the same LAN that I pair.
You’ll need to run a turn server alongside PairDrop in order to achieve that: https://github.com/schlagmichdoch/PairDrop/blob/master/docs/host-your-own.md#turn-server-for-internet-transfer
But it still doesn't see devices outside the same LAN that I pair.
You’ll need to run a turn server alongside PairDrop in order to achieve that: https://github.com/schlagmichdoch/PairDrop/blob/master/docs/host-your-own.md#turn-server-for-internet-transfer
Oh, I thought that a STUN server was enough (sorry, I don't know much about STUN/TURN). Thanks
There’s more info on the topic here: https://github.com/schlagmichdoch/PairDrop/blob/master/docs/technical-documentation.md#encryption-webrtc-stun-and-turn
There’s more info on the topic here: https://github.com/schlagmichdoch/PairDrop/blob/master/docs/technical-documentation.md#encryption-webrtc-stun-and-turn
Thanks a lot! That helped me understand how it works.
i used stun server from cloudflare. its working
@rafalohaki any chance you have a config available to share?
i used stun server from cloudflare. its working
@rafalohaki any chance you have a config available to share? rtc_config.json
docker compose