Open ahmedtalhakhan opened 4 years ago
When creating a proxy when toxiproxy is running inside a docker container you should use 0.0.0.0
as the listen address IP because listening on the localhost inside the container will not expose the proxy's port outside of the container.
toxiproxy-cli create test-proxy -l 0.0.0.0:26379 -u api.box.com:443
I am trying to do a simple setup of using toxiproxy for 3rd party service APIs but running into an issue that I cant seem to resolve. I am running toxiproxy inside a container on my local machine and then trying to access the upstream service from the host. Here are the simple configurations
Run toxiproxy
Create a simple proxy
Make sure proxy is created
The
/etc/hosts
file on the host machine contains the following entry.Now when I try to access the upstream service from the host, the request fails with some SSL initiation error
I have already looked at the issue https://github.com/Shopify/toxiproxy/issues/175#issuecomment-301464691 but it seems that those steps are not valid if toxiproxy is running inside a container.
The issue does not go away even If I take the approach of using a different hostname for the call by doing the following:
Use
test1.box.com
as the hostname of the upstream service and put it in/etc/hosts
of the host machine asAnd then doing a request from the host machine