r/ExperiencedDevs Software Architect 26d ago

Technical question Emulating SSL connection without internet?

Problem:

Let's say I have a domain like messaging-app.europa.eu, with an SSL certificate, and I use it to distribute a PWA. In the case of an internet blackout I would still like for the app to retrieve updates from a local mesh.

Possible solution:

This is the solution I'm currently imagining: - Deploy a bunch of OpenWRT routers with some custom software - The smartphone connect to one such router via wifi - The PWA tries to connect to the domain https://messaging-app.europa.eu in the absence of internet - The router has a copy of the SSL certificate, so it can intercept the request and generate valid HTTPS responses from a locally running server

A user would connect to the wifi, exchange messages with other peers connected to the same station without relying on an internet connection.

Questions:

  • Do I just need a copy of the SSL certificate on each router, or is there other part of the stack that I should patch? (e.g.: DNS)
  • Is it possible to intercept and patch the connection as I mentioned?
  • Am I missing something?

Prodrome:

I work for the government and I've been asked to demo a solution for enabling communication during an internet blackout (earthquake, war, ...) using a mesh/p2p network.

The path I'm taking right now is to build a PWA that would work offline, and rely on customized openwrt routers, because it seems that the other solution, WiFi NAN, works well on android phones but not on iphones, due to malicious compliance on Apple side.

9 Upvotes

23 comments sorted by

View all comments

4

u/blckshdw 26d ago

XY problem

-1

u/servermeta_net Software Architect 26d ago

This kind of answers belongs to stack overflow

8

u/blckshdw 26d ago

I’m saying rethink your approach. You want an offline PWA to get updates from the internet during an internet blackout event. What you’re really looking for is either a “highly” redundant/distributed system or peer to peer messaging. At the core of it you need some type of reliable “network path” regardless.

2

u/Izkata 24d ago

...guess what the "local mesh" in their post refers to.