Replies: 7 comments 7 replies
-
|
I'd be interested in this use case as well |
Beta Was this translation helpful? Give feedback.
-
|
Hi all, thanks for raising this question. I don't see how Chitchatter would work in an air-gapped, offline environment by default. However, I imagine it would work if self-hosted with a bit of custom configuration. Specifically, you'd need to self-host both Chitchatter and a WebTorrent tracker. From there you'd need to configure your Chitchatter instance to use your self-hosted tracker.1 I don't think you'd need a TURN server at all since everyone would be on the same local network (though that may depend on local network configuration). It's my understanding that WebRTC (Chitchatter's underlying browser-level networking stack) can work in a LAN environment. Either way you'd need a signaling server, which is effectively what the Webtorrent tracker accomplishes. I think the real question here is whether Trystero supports LAN connections, since that's the WebRTC library that Chitchatter uses for networking. I think the answer for that would be much the same as what I've described here, but if this winds up being more involved we may want to raise the question in that project's issue tracker. I haven't tried any of this myself so it's all pretty theoretical, but I bet it could be made to work one way or another just by playing with the configuration and setup. If you give this a try, let me know what you learn! Footnotes |
Beta Was this translation helpful? Give feedback.
-
|
Hey @jeremyckahn - thank you so much for sharing this information! I'm going to be setting this up soon, will keep you guys posted! |
Beta Was this translation helpful? Give feedback.
-
|
Somewhat good news - I managed to get an offline setup working with the self-hosting steps and deploying Mosquitto MQTT locally. I had to change some of the code to use MQTT rather than WebTorrent/trackers as I have very limited compute in the airgap environment to play with. Video, voice and messaging seem to work well. However, I cannot get image/file sharing working. On the sending side, the photo (image) displays perfectly fine, but on the receiving side, I just get an endless spinner. Do I need to deploy something else for file sharing? |
Beta Was this translation helpful? Give feedback.
-
That's awesome! Would you mind sharing the diff for getting MQTT to work, as well as your general deployment approach? |
Beta Was this translation helpful? Give feedback.
-
|
That's great to hear @bt! I'm glad it's at least working somewhat for you.
This is because file sharing uses an inherently WebTorrent-based networking strategy that your deployment would need to account for. Data transmission for file sharing is handled by https://jeremyckahn.github.io/secure-file-transfer/, a package I extracted out of Chitchatter a while ago. For your deployment, I see two paths forward:
Option 2 would be a nontrivial code change, so I'd suggest pursuing it only if option 1 is truly infeasible.
I would be surprised to learn that MQTT is meaningfully lighter-weight than a WebTorrent tracker. For context, I use a local WebTorrent tracker when working on Chitchatter because I don't want to depend on the internet when developing. The local tracker has never struck me as particularly resource-intensive, though admittedly I use a reasonably powerful laptop for development. What have you found to indicate that WebTorrent's performance is insufficient in your deployment? I'm just wondering if that is indeed a nonstarter, because it seems like the path of least resistance for solving this. |
Beta Was this translation helpful? Give feedback.
-
|
@bt @jsherman256 FYI I moved this to a discussion thread from #538. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, thanks for building and maintaining Chitchatter. I just came across this repo as I'm looking for a local/offline P2P chatting solution.
I'm trying to self host this on a completely air-gapped, offline LAN; and then allowing two (or more) users to chat with each other. However, I can't seem to get them to connect as it attempts to connect to an external TURN server and/or public torrent trackers.
If I was to host a local TURN server, would this suffice to allow the connection? Or, is there another way I can get the connection made between the peers?
Beta Was this translation helpful? Give feedback.
All reactions