PairDrop/server
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
..
index.js Check for CF-Connecting-IP and decreased timeout 2022-11-24 13:51:39 +01:00
package-lock.json Merge pull request #307 from RobinLinus/dependabot/npm_and_yarn/server/ws-7.4.6 2021-06-04 15:38:04 +02:00
package.json Merge pull request #307 from RobinLinus/dependabot/npm_and_yarn/server/ws-7.4.6 2021-06-04 15:38:04 +02:00