-
-
Notifications
You must be signed in to change notification settings - Fork 292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Enhancement] Implement the websocket fallback as a real fallback #228
Comments
First of all I would like to thank you for the quick response and also for the continuous effort on maintaining this grea project. It benefits a lot of people and we are all grateful!
Sorry for taking up your time. Once again, really appreciate the work! |
There was a bug in a version some months ago that accidentally enforced all connections to be made via ws if the fallback was activated. You can try some things:
If you worry about your privacy and try to hide your identity via VPN, step 2 or 3 would probably be wise regardless of PairDrop to prevent WebRTC leakage. About your fourth point: I’m heavily rewriting the complete WebRTC part that was written for Snapdrop right now so I will probably get to this issue soon as well while I’m at it. I’ll add it to the pipeline for the next minor version. |
Massive thank you! I will definitely try step 1 and 4, they are perfect for
my need.
schlagmichdoch ***@***.***> 于 2024年2月4日周日 22:02写道:
… There was a bug in a version some months ago that accidentally enforced
all connections to be made via ws if the fallback was activated.
You can try some things:
1. Set the iceServers of the rtcconfig.json to an empty array: this
could enable devices on the same network to find each other:
{
"sdpSemantics": "unified-plan",
"iceServers": []
}
2. Use uBlock Origin (or alike) to disable WebRTC on your device
3. Use Firefox' about:config to disable WebRTC on your device
4. Enforce the WS fallback for all devices by changing this line:
https://github.com/schlagmichdoch/PairDrop/blob/b36105b1cf51332bab548bc85cf3745090d706d6/public/scripts/util.js#L41
Into this:
window.isRtcSupported = false;
This way all clients broadcast that they do not support WebRTC.
If you worry about your privacy and try to hide your identity via VPN,
step 2 or 3 would probably be wise regardless of PairDrop to prevent WebRTC
leakage.
About your fourth point: I’m heavily rewriting the complete WebRTC part
that was written for Snapdrop right now so I will probably get to this
issue soon as well while I’m at it. I’ll add it to the pipeline for the
next minor version.
—
Reply to this email directly, view it on GitHub
<#228 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFY26LFJ4JRB6EJXSHGP6JLYR6IHRAVCNFSM6AAAAABAXGND2CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRVG43DCMRTHE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
What is the status on this? I would love the fallback to actually work. My use case is that if I want to share between two devices where one of them is behind a corporate firewall and therefore can't use my turn server, the fallback should be used. |
@swiftbird07 The project came to a halt for 1-2 months because GitHub falsely shadow hid my account and deleted loads of issues and comments. I have since restored everything back to its original state. The implementation as a real fallback will be part of the next minor version |
Yes I would do that |
@schlagmichdoch I took a look at the current codebase and apparently the websocket transfer uses base64 encoded content to be transferable as a single JSON message. Would it be possible to split this? e.g. send the control message as JSON and then send the data as a binary message? The reason I ask is because base64 adds 33% overhead for each file. |
This was the easiest way to implement the websocket fallback as each message must also include the addressee to be able to relay it. Probably there are other optimized methods than sending it encoded as text. I also think all peer to peer communication should be at least transport encrypted as with WebRTC transfers but this too is not implemented yet. (See this comment and the following) I'm open to ideas but would prefer to discuss them in a separate new issue as it is not connected to this issue. |
What problem is solved by the new feature
Currently, the websocket fallback (enabled via
WS_FALLBACK=true
) is only used when a device cannot usewindow.RTCPeerConnection
. Some admins have expected it to be a fallback to the WebRTC connection, so it is also used whenever the WebRTC connection fails.Describe the feature
If the WebRTC connection fails (3 times?) the websockets fallback is used instead.
Additional context
See also #215
Only implement this after implementing traffic encryption for the websocket fallback (part of #180)
The text was updated successfully, but these errors were encountered: