Commit graph

33 commits

Author SHA1 Message Date
schlagmichdoch
6fe348ab4b Merge remote-tracking branch 'fork/patch-1' into add_device_pairing 2022-12-22 23:52:44 +01:00
schlagmichdoch
39ee016875 Merge remote-tracking branch 'fork/fix-list-self-in-peers' into add_device_pairing 2022-12-22 23:51:22 +01:00
schlagmichdoch
3688ed0c98 put all devices on the same network as the server into the same room to make it possible to run snapdrop on the local network 2022-12-22 01:05:49 +01:00
Leonardo Scoppitto
0cd73f10ef
Check for CF-Connecting-IP and decreased timeout
When hosting Snapdrop behind Cloudflare, X-Forwarded-For is useless. Furthermore, I'm hosting my installation behind another internal proxy, so, in the end, X-Forwarder-For is set to the internal proxy's IP for all the peer, which can see each other regardless being on different networks. To fix this I made _setIP check if the header "cf-connecting-ip" exists, then sets the IP accordingly.

Lastly, when a peer changes network (e.g. a phone switches from wifi to mobile data), the function _leaveRoom is not called and the peer stays visible to others connected to the same room for a whole minute: I adjusted the timeout to what I think is a more reasonable value (500ms, so _leaveRoom is called after 1s).
2022-11-24 13:51:39 +01:00
MWY001
cb84bef2c2 Should not notify peer the existence of itself. 2022-11-05 00:35:55 +08:00
RobinLinus
2e0619fbba
Add error handler to ws connection 2022-10-13 15:20:38 +02:00
RobinLinus
fad4632eb9 Handle undefined device names - simplify + minor fix 2021-03-10 15:49:45 +01:00
RobinLinus
4b15aa0417 Handle undefined device names 2021-03-10 15:25:03 +01:00
RobinLinus
130f5391f8
Merge pull request #162 from LEXUGE/patch-1
Add support for SIGINT and SIGTERM handling
2020-12-22 17:55:37 +01:00
RobinLinus
7469086cda Combine browser name and unique name 2020-12-19 21:05:48 +01:00
RobinLinus
85dedf03ce Cleanup 2020-12-16 04:18:42 +01:00
RobinLinus
612d8cf1ea Use device type as display name
Pro:
- Device types are more descriptive.
- Device types don’t change after every reload

Con:
- Device types may not be unique.
2020-12-16 04:16:21 +01:00
Ying Kanyang (Harry Ying)
f9bace9a16
Add support for SIGINT and SIGTERM handling
Currently, server run by `node index.js` is not able to handle SIGTERM or SIGINT properly. The only fate is being killed. This change adds basic handling logic for these two signals, helping server to behave more properly as expected by many daemons and users.
2020-08-28 22:07:25 +08:00
Paul Szymanski
26fd1aade3 Set peerid cookie with SameSite=None; Secure 2020-07-16 14:00:21 +02:00
Paul Szymanski
4b1417224b Increase ws keepalive interval to 30 seconds 2020-07-14 02:34:13 +02:00
Paul Szymanski
150fdc8bc1 Change layout of peer name and remove unneccessary text 2020-07-13 23:56:58 +02:00
Paul Szymanski
d89a92b217 Upgrade unique-names-generator 2020-07-12 14:52:26 +02:00
Mrigank Krishan
e7c484f428 show displayName on UI 2020-07-12 14:52:26 +02:00
Mrigank Krishan
0c7abfbf1d generate unique peer names
use unique-names-generator to generate peer names instead of relying on
UA. This prevents confusion when there are multiple clients on the network
with same UA.
2020-07-12 14:52:26 +02:00
PaulSzymanski
984d1e75ec Less logging 2020-03-24 15:23:20 +01:00
RobinLinus
993b484396
Don't crash when parsing malformed JSON 2019-05-29 21:35:39 +02:00
JBYoshi
cd221881b6
Make IPv4 and IPv6 localhost connections use the same room 2019-02-18 15:52:05 -06:00
JBYoshi
6de5e297d8
Revert "Make IPv4 and IPv6 localhost connections use the same room."
This reverts commit 8b99e921e7.
2019-02-18 15:47:21 -06:00
JBYoshi
8b99e921e7
Make IPv4 and IPv6 localhost connections use the same room. 2019-02-11 18:47:12 -06:00
RobinLinus
e9e8d6336b Refactor and cleanup 2018-10-09 15:45:07 +02:00
RobinLinus
0ede41f8d5 Cancel keep alive on join room 2018-09-21 20:34:49 +02:00
RobinLinus
1d9581632f Cancel keep alive on join room 2018-09-21 20:25:54 +02:00
RobinLinus
e71564a97c Cancel keep alive on join room 2018-09-21 20:15:55 +02:00
RobinLinus
0731a21d68 Cancel keep alive on join room 2018-09-21 20:09:49 +02:00
RobinLinus
61697d3abc Cancel keep alive on join room 2018-09-21 20:01:59 +02:00
RobinLinus
b67afca8ac Cancel keep alive on join room 2018-09-21 19:54:16 +02:00
RobinLinus
23e7c04393 Network fixes 2018-09-21 19:51:29 +02:00
RobinLinus
663db5cbb3 Version 2 initial commit 2018-09-21 16:05:03 +02:00