I am looking for a lightweight server that can run inside an app. The key requirement is that it must support local IP communication over HTTPS.
I have searched Google and found several frameworks, but as far as I know, support for HTTPS in this environment has been discontinued or is no longer available.
If anyone knows a solution that meets these criteria, I would greatly appreciate your guidance. Thank you in advance!😀
There are two separate issues here:
-
Implementing the HTTP protocol
-
Local TLS
Those are very different problems. There are lots of good HTTP servers out there [1] but none of them tackle the local TLS issue. And for good reason. A good general-purpose solution isn’t possible because:
-
HTTPS is usually consumed by web browsers.
-
Web browsers assume the default PKI-based TLS, as described in TLS for App Developers.
-
PKI-based TLS doesn’t work for local communication.
So, something has to give:
-
You can choose not to support web browser clients. If you only supports clients that you control, you have a lot more options available to you. I talk about this in some detail in TLS For Accessory Developers.
-
If you must support web browsers, you have to live with the dire security warnings that they’ll present when you connect to a local server.
If you post details about the context of your question, I’d be happy to go into this in more depth.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
[1] A good place to start is here:
https://www.areweserveryet.org/