ProxymanApp / ProxymanApp/Proxyman
Mixup of localhost ports between multiple requests
@NghiaTranUIT is already working on this.
Since Oct 28, 2024.
- Dominant language
- No language data
- Stars
- 7k
- Forks
- 237
- PR merge metrics
- No merged PRs in 30d
Description
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 Ahttp://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:
But the ports are somehow mixed up for service B requests:
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:
Expected Behavior
We expect Proxyman to be able to correctly route these requests to the correct localhost/proxyman.debug port.
Environment
- App version: Proxyman 5.9.0 (Using the Proxyman Helper Tool)
- macOS version: macOS Sequoia 15.0
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.