snoyberg / keter

Web app deployment manager
MIT License
261 stars 71 forks source link

Configuring IPv4 and IPv6 to listen on the same port? #192

Open achirkin opened 6 years ago

achirkin commented 6 years ago

The basic example of keter-config.yaml suggests to listen IPv4 interfaces only:

listeners:
    - host: "*4"
      port: 80

If I add another listener:

listeners:
    - host: "*4"
      port: 80
    - host: "*6"
      port: 81

then everything works fine - keter is accessible on http://[ipv6::addr]:81/. However, if I try to use port 80 for both listeners, keter does not start. If I remove "4" from the host line:

listeners:
    - host: "*"
      port: 80

then keter listens on IPv4 only.

Is there a way to make keter listen both IPv4 and IPv6 on the same port?

idcm commented 5 years ago

If I try to use port 80 for both listeners, only IPv4 work, IPv6 connection is refused. When I use yesod, the same thing also happen.

I find use "!6", both IPv4 and v6 can connect.