MicroOcpp icon indicating copy to clipboard operation
MicroOcpp copied to clipboard

Google DNS 8.8.8.8 hardcoded in mongoose.c

Open alain-forcioli opened this issue 6 months ago • 0 comments

Hi,

I am facing a DNS resolution issue when trying to establish a secure WebSocket connection between two services running in separate Docker containers.

Setup:

  • Device A: Container MicroOcpp Simulator
  • Device B: Container Steve CSMS

Problem:

The Steve CSMS requires Server Name Indication (SNI) for secure connections (wss://), which means the MicroOcpp client must connect using a hostname or FQDN, not an IP address.

However, I've discovered that the MicroOcpp simulator has a hardcoded DNS resolver (Google DNS) in its mongoose.c source file. This causes the simulator to bypass the container's local DNS settings, preventing it from resolving the internal hostname of the Steve CSMS container.

Question: While I can modify the source code to resolve this, I am looking for a less invasive solution. Is there a configuration file or an alternative method to force the MicroOcpp simulator to use a different DNS server, without needing to recompile the application?

alain-forcioli avatar Jun 09 '25 09:06 alain-forcioli