mirror of
https://github.com/ProxymanApp/Proxyman.git
synced 2026-04-26 16:45:57 +03:00
[GH-ISSUE #683] Map remote not working for localhost #678
Labels
No labels
Discussion
Feature request
In Progress...
Plugins
Waiting response
Windows
Windows
bug
duplicate
enhancement
feature
good first issue
iOS
macOS 10.11
question
wontfix
✅ Done
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Proxyman#678
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @phhoef on GitHub (Nov 11, 2020).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/683
Proxyman version? (Ex. Proxyman 1.4.3)
Version 2.12.0 (21200)
macOS Version? (Ex. mac 10.14)
macOS Catalina 10.15.7
Steps to reproduce
Add remote mapping:
Rule: *
Method: Any
Use Wildcard
Map to:
any remote host
Expected behavior
all requests are forwarded to the remote host.
When firing a request with Postman against localhost on the listening port of Proxyman, I see the request in the list, but the mapping is not working. Proxyman returns the Welcome page and that's it.
@NghiaTranUIT commented on GitHub (Nov 12, 2020):
Can you verify that if you can see the "X-Proxyman-Map-Remote" key in the Response?
I tested exactly your scenario, but it works fine. I can see this header and the response is from the Remote. Please beware that the URL is still a
localhost, but the response is actually from the Remote Server.@phhoef commented on GitHub (Nov 14, 2020):
Hallo @NghiaTranUIT, sorry I missed your reply on this thread...
No, I do not see the new header.
Maybe one difference is, that you've enabled "override proxy". I am directly sending the request from postman to Proxyman and I was expecting, that it will be forwarded based on the map-to-remote-rule. Is that assumption wrong?
Please find attached a screenshot.



@NghiaTranUIT commented on GitHub (Nov 15, 2020):
It's not related. If I disable the macOS Proxy Overriden and use Postman to send directly to Proxyman. The result is the same.
I see the problem.
You're to map to HTTP (not HTTPS) with port 443.
Since it's invalid (443 is reserved for HTTPS), Proxyman returns "Welcome to Local Proxyman Server", it's our local server to serve the Certificate Key for remote devices (It means, you can install Proxyman Certificate from iOS devices when accessing to
http://proxy.man/sslorhttp://proxy.man)I tested to map
http://localhost/blogtohttps://proxyman.io/blogand it works fine 😄@NghiaTranUIT commented on GitHub (Nov 15, 2020):
One more thing, the reason why you couldn't see X-Proxyman-Map-Remote from your test, it because of the invalid Map URL (HTTP with port 443), so Local Server handles it, instead of Map Remote Tool 👍
Please change HTTPS and it should work 😄
@phhoef commented on GitHub (Nov 15, 2020):
Thanks for pointing this out and sorry for my mistake.
In the first place, I tried to forward to another server running not on https and I modified the rule for this test. Unfortunately, I misconfigured the remote mapping.
That said, I changed it to https and gave it another try: The result is the same.
Please find the screenshots attached. Do I need to restart proxyman/do anything else to take the changes effect?
@NghiaTranUIT commented on GitHub (Nov 15, 2020):
Thanks. I see the problem. You're listening at port
80, not 9090 or another number that is not 80 or 443For the reason why Remote Tools doesn't work port 80 on Proxyman. I have an
ifstatement to redirect the traffic to Proxyman's local server. It's incorrect behavior. I should work in your scenario. I will fix it 👍@phhoef commented on GitHub (Nov 15, 2020):
Can you please explain why port 80 is a problem?
I am not sure, if this is the problem for several reasons:
I would like to debug requests from an external application arriving on my public ip. The Sophos XG is forwarding it to my local machine/proxyman and I would like to route it to another external server, that actually can handle these requests.
Traffic flow is:
External application --9090--> Sophos XG --80--> proxyman --90--> external serverGreat to hear, that you could figure out the problem of the remote mapping :-)
@NghiaTranUIT commented on GitHub (Nov 15, 2020):
yes, It's a bug 😄 I'm not aware that some users will try to set 80 for a listening port.
I will try to remove this Redirection logic, and send you a build soon. Maybe your problem could be fixed 👍
@NghiaTranUIT commented on GitHub (Nov 15, 2020):
You can fix it by
/ect/hostor using127.0.0.1. It should work 👍@phhoef commented on GitHub (Nov 15, 2020):
Thanks for your help, using
127.0.0.1in combination with the remote map is working.