Squidman, iOS devices, SSL and Docker I want to access a website and an API both running in Docker containers behind another nginx Docker container (reverse proxy managing SSL) from an iOS device.

So I have:
1 iOS device having IP 192.168.178.57
1 MacBook Pro having IP 192.168.178.64
1 Docker container running nginx having two server_name settings:  app.dev and api.dev, both using self-signed SSL certificates
/etc/hosts points has these entries:

192.168.178.64 app.dev
192.168.178.64 api.dev


~/proxy.pac contains these entries:

function FindProxyForURL(url, host){
  if (shExpMatch(host, "app.dev")) {
    return "PROXY app.dev:443; DIRECT";
  }
  if (shExpMatch(host, "api.dev")) {
    return "PROXY api.dev:443; DIRECT";
  }
  return "DIRECT";
}


Squidman is configured on port 9090 and allowed clients are 192.168.178.0/24.

Squidman template allows access to localhost

# protect web apps running on the proxy host from external users
# http_access deny to_localhost

# rules for client access go here
http_access allow localhost
%HTTPACCESSALLOWED%


The iOS device proxy is configured as 192.168.178.64, port 9090.

The MacBooks Networks Automatic Proxy Configuration points to the ~/proxy.pac file.

I can browse web sites from the iOS website like http://apple.com.

I can browse https://app.dev and call https://api.dev from the MacBook.

I cannot browse https://app.dev nor call https://api.dev from the iOS device.

What am I doing wrong?
I solved it using this Docker container:
https://github.com/jpillora/docker-dnsmasq

Simply follow the instructions and add e.g. 127.0.0.1 app.dev and 127.0.0.1 api.dev to your /etc/hosts.

Then change the DNS on the macOS and iOS device to 192.168.178.64 (following the initial question).