I am planning to ship a "home server" type device to customers, that communicates with their (Android or iPhone) smart phone. The problem is that, depending on their internet service provider, the customer has no outside-reachable IPv4 address (DS-lite tunneling), so the smart phone can't just use an IPv4 DNS record to find the server.
Alternatives I can think of:
Make the server use an IPv6 DynDNS service, and make IPv6 take preference over IPv4 on the smart phone. Since the solution should work without the customer having to sign up for a DynDNS service, I have not found any service that allows me to do that.
Set up my own "directory server", such that the home server registers it's serial number in intervals - so similar like DynDNS, but on the application layer via HTTPS. A client could then simply enter the serial number into the app to find the server. Due to authentication/encryption requirements, this solution is harder to implement than I like.
Any other ideas on how to make a home server reachable? I would really like to avoid running my own "cloud service". Some type of peer to peer network discovery, perhaps?
[UPDATE:] This is what I am essentially looking for:
Home server Relay DynDNS Client
| | | |
|-------- open tunnel to port 80 ----->| | |
|<-success, listening on 192.0.2.1:80 -| | |
| | | |
|----- Register "my.ddns.net" ---------------------->| |
|<------------ "my.ddns.net" is now 192.0.2.1 -------| |
| | | |
| |<- GET http://my.ddns.net -|
|<------- GET http://my.ddns.net ----| | |
|--- HTTP response ------------------->| | |
| |----- HTTP response ------>|
Thanks to the other responses, I had the starting points to find some existing solutions: ngrok and localtunnel solve the problem by mapping a dedicated subdomain to each Home Server, and dispatching requests based on HTTP(S) GET requests.
The latter is an open source project, and the server, as well as a javascript client are on Github.