etherai / selfhosted-gateway

Self-hosted Docker native tunneling to localhost. Expose local docker containers to the public Internet via a simple docker compose interface.
https://fractalnetworks.co
GNU Affero General Public License v3.0
1.32k stars 66 forks source link

Handle Gateway in a private subnet #40

Closed rpersee closed 7 months ago

rpersee commented 7 months ago

The FQDN to access the exposed service ($LINK_DOMAIN) should resolve to the IP address of the Gateway. However, when the FQDN resolves to an IP in a private subnet, the GATEWAY_ENDPOINT ($GATEWAY_IP:$WIREGUARD_PORT) is not set correctly. Use a DNS lookup to find the ~public~ access IP address of the Gateway, instead of looking for the public IP of the Gateway.

thebalaa commented 7 months ago

Thanks for the contribution @rpersee