Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proxy-nginx: invalid proxy_pass address resolved when connected to a VPN #583

Open
mfranciszkiewicz opened this issue Mar 29, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@mfranciszkiewicz
Copy link
Contributor

mfranciszkiewicz commented Mar 29, 2022

While building the proxy-nginx Docker image and being connected to a VPN, the host address can be resolved to an invalid, VPN-specific address:

# proxy-nginx.Dockerfile
getent hosts host.docker.internal | awk '{ print $1 }'

the output, if present, is assigned to the HOST_ADDR variable:

# proxy-nginx.Dockerfile
sed -i "s/{HOST_ADDR}/$HOST_ADDR/" /etc/nginx/nginx.conf

and used as a proxy_pass destination:

# nginx.conf
proxy_pass http://{HOST_ADDR}:{MITM_PROXY_PORT};

the end result is that any yagna API call will be redirected to an invalid network address

@mfranciszkiewicz mfranciszkiewicz added the bug Something isn't working label Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant