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

Mixup of localhost ports between multiple requests #2164

Open
perhells opened this issue Oct 18, 2024 · 2 comments
Open

Mixup of localhost ports between multiple requests #2164

perhells opened this issue Oct 18, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@perhells
Copy link

perhells commented Oct 18, 2024

Description

Ports are mixed together if connecting to multiple services using localhost in a Go application.

Steps to Reproduce

We're running an application using multiple forwarded ports due to our services residing inside a VPC using internal load balancers. A part of our configuration used to access these by using port forwarding to an ECS task in our application looks like this:

  • http://localhost:32003 -> Service A
  • http://localhost:32004 -> Service B

Then in our local application we use the following environment configuration:

export SERVICE_A_URL="http://localhost:32003"
export SERVICE_B_URL="http://localhost:32004"

Our application works as intended with this setup, but we cannot inspect the outgoing requests since Proxyman doesn't catch them (at least not on macOS).

This can be solved by adding an entry to /etc/hosts:

127.0.0.1 proxyman.debug

If we then change our URLs in the application environment from localhost to proxyman.debug we can see the requests in Proxyman. Doing this for one service works perfectly:

export SERVICE_A_URL="http://proxyman.debug:32003"
export SERVICE_B_URL="http://localhost:32004"

Current Behavior

When we try to use the proxyman.debug URL for both services like this we run into an issue:

export SERVICE_A_URL="http://proxyman.debug:32003"
export SERVICE_B_URL="http://proxyman.debug:32004"

The service A requests looks correct:

image

But the ports are somehow mixed up for service B requests:

image

We tried adding two different mappings to make Proxyman think these were different endpoints as well:

127.0.0.1 proxyman.first
127.0.0.1 proxyman.second

But this still results in the same issue:

image

Expected Behavior

We expect Proxyman to be able to correctly route these requests to the correct localhost/proxyman.debug port.

Environment

@perhells perhells added the bug Something isn't working label Oct 18, 2024
@NghiaTranUIT
Copy link
Member

NghiaTranUIT commented Oct 18, 2024

@perhells may I if you're using any debugging tools that can change the port number? like Scripting or Map Remote? or Reverer Proxy?

@perhells
Copy link
Author

perhells commented Oct 18, 2024

@perhells may I if you're using any debugging tools that can change the port number? like Scripting or Map Remote? or Reverer Proxy?

Hi!

No, we're not using any other debugging tool.

I'm using the "Proxyman Helper Tool" only, otherwise no outgoing requests from our Go application shows up at all: https://docs.proxyman.io/troubleshooting/i-couldnt-see-any-traffics-on-proxyman#id-2.3-install-proxyman-helper-tool

Edit: Added detail about using Go and Proxyman Helper Tool to issue.

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

2 participants