[GH-ISSUE #1448] [Feature Request] If map remote works, the request record should be replaced to real url . #1444

Open
opened 2026-03-03 19:51:33 +03:00 by kerem · 22 comments
Owner

Originally created by @lqscript on GitHub (Nov 24, 2022).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1448

Originally assigned to: @NghiaTranUIT on GitHub.

Description

If map remote works, the request record should be replaced to real url like charles

Why this feature/change is important?

  1. if map remote works,the original url is useless.
  2. easier and faster to know the real request server,instead of click every edited record's Summary and see Debugging Tool.
  3. easier to copy and share to others,no need to replace by hand everytime.
Originally created by @lqscript on GitHub (Nov 24, 2022). Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1448 Originally assigned to: @NghiaTranUIT on GitHub. ## Description If map remote works, the request record should be replaced to real url like charles ## Why this feature/change is important? 1. if map remote works,the original url is useless. 2. easier and faster to know the real request server,instead of click every edited record's Summary and see Debugging Tool. 3. easier to copy and share to others,no need to replace by hand everytime.
Author
Owner

@NghiaTranUIT commented on GitHub (Nov 24, 2022):

Thanks. I will update it.

To work around, you can simply use this Snippet code: https://docs.proxyman.io/scripting/snippet-code#change-request-destination-scheme-host-port-path

The snippet code does the same thing as Map Remote does.

From what I know, it will change the URL as you expect 👍

<!-- gh-comment-id:1326063080 --> @NghiaTranUIT commented on GitHub (Nov 24, 2022): Thanks. I will update it. To work around, you can simply use this Snippet code: https://docs.proxyman.io/scripting/snippet-code#change-request-destination-scheme-host-port-path The snippet code does the same thing as Map Remote does. From what I know, it will change the URL as you expect 👍
Author
Owner

@lqscript commented on GitHub (Nov 24, 2022):

I tried,but it will cause overflow problem when server return bigint in json,even i do nothing in onResponse function.

<!-- gh-comment-id:1326068998 --> @lqscript commented on GitHub (Nov 24, 2022): I tried,but it will cause overflow problem when server return bigint in json,even i do nothing in onResponse function.
Author
Owner

@NghiaTranUIT commented on GitHub (Nov 24, 2022):

You might turn off the On Response checkbox, so the response body is intact.

<!-- gh-comment-id:1326077339 --> @NghiaTranUIT commented on GitHub (Nov 24, 2022): You might turn off the On Response checkbox, so the response body is intact.
Author
Owner

@lqscript commented on GitHub (Nov 24, 2022):

It works, thanks for your help!

<!-- gh-comment-id:1326082182 --> @lqscript commented on GitHub (Nov 24, 2022): It works, thanks for your help!
Author
Owner

@DaysJan commented on GitHub (Feb 23, 2023):

Thanks. I will update it.

To work around, you can simply use this Snippet code: https://docs.proxyman.io/scripting/snippet-code#change-request-destination-scheme-host-port-path

The snippet code does the same thing as Map Remote does.

From what I know, it will change the URL as you expect 👍

Could you please leak any plan? I enjoy various features of Proxyman except copying a mapped request.

<!-- gh-comment-id:1441152034 --> @DaysJan commented on GitHub (Feb 23, 2023): > Thanks. I will update it. > > To work around, you can simply use this Snippet code: https://docs.proxyman.io/scripting/snippet-code#change-request-destination-scheme-host-port-path > > The snippet code does the same thing as Map Remote does. > > From what I know, it will change the URL as you expect 👍 Could you please leak any plan? I enjoy various features of Proxyman except copying a mapped request.
Author
Owner

@NghiaTranUIT commented on GitHub (Feb 23, 2023):

Thanks. It seems that we should add an option to change the Request URL to the mapped URL.

I will put this feature to 4.5.0 👍

<!-- gh-comment-id:1441153651 --> @NghiaTranUIT commented on GitHub (Feb 23, 2023): Thanks. It seems that we should add an option to change the Request URL to the mapped URL. I will put this feature to 4.5.0 👍
Author
Owner

@NghiaTranUIT commented on GitHub (Mar 28, 2023):

There is another user, who request this feature too. I'm working on it now 👍

<!-- gh-comment-id:1486721999 --> @NghiaTranUIT commented on GitHub (Mar 28, 2023): There is another user, who request this feature too. I'm working on it now 👍
Author
Owner

@NghiaTranUIT commented on GitHub (Mar 28, 2023):

Hey @DaysJan @lqscript, if you don't mind, please try this Beta build: https://download.proxyman.io/beta/Proxyman_4.5.0_Map_Remote_will_update_new_URL.dmg

Changelog

  • Use new URL (after matching with the Map Remote)
  • Map Remote, then Breakpoint will work
<!-- gh-comment-id:1486956512 --> @NghiaTranUIT commented on GitHub (Mar 28, 2023): Hey @DaysJan @lqscript, if you don't mind, please try this Beta build: https://download.proxyman.io/beta/Proxyman_4.5.0_Map_Remote_will_update_new_URL.dmg ### Changelog - Use new URL (after matching with the Map Remote) - Map Remote, then Breakpoint will work
Author
Owner

@NghiaTranUIT commented on GitHub (Mar 29, 2023):

Update 2:

<!-- gh-comment-id:1487887441 --> @NghiaTranUIT commented on GitHub (Mar 29, 2023): ### Update 2: - Support Websocket with Map Remote - Fix the cURL issue #1588 - Beta: https://download.proxyman.io/beta/Proxyman_4.5.0_Fix_cURL_security_issue.dmg
Author
Owner

@lqscript commented on GitHub (Apr 6, 2023):

@NghiaTranUIT It works as expected, thanks!

<!-- gh-comment-id:1498435974 --> @lqscript commented on GitHub (Apr 6, 2023): @NghiaTranUIT It works as expected, thanks!
Author
Owner

@raxityo commented on GitHub (Apr 20, 2023):

@NghiaTranUIT is it possible to opt out of this change? If not, is there any workaround to keep the request transparent from the interface?

My use case - I make requests to production and local environments using the same host but flip the toggle of map remote to switch between the env. Now the requests show up in different sections of the pinned domain (the production domain) and the other features don't use the uniform domain anymore, so it's disruptive.

<!-- gh-comment-id:1516364391 --> @raxityo commented on GitHub (Apr 20, 2023): @NghiaTranUIT is it possible to opt out of this change? If not, is there any workaround to keep the request transparent from the interface? My use case - I make requests to production and local environments using the same host but flip the toggle of map remote to switch between the env. Now the requests show up in different sections of the pinned domain (the production domain) and the other features don't use the uniform domain anymore, so it's disruptive.
Author
Owner

@NghiaTranUIT commented on GitHub (Apr 20, 2023):

Sorry that this change breaks your current workflow @raxityo. I decide to change the Map Remote Behavior because it makes sense and has the same result with the Charles Proxy app.

I guess I can introduce the Option to switch betwen two mode: Keep the original URL or replace with new URL.

<!-- gh-comment-id:1516388865 --> @NghiaTranUIT commented on GitHub (Apr 20, 2023): Sorry that this change breaks your current workflow @raxityo. I decide to change the Map Remote Behavior because it makes sense and has the same result with the Charles Proxy app. I guess I can introduce the Option to switch betwen two mode: Keep the original URL or replace with new URL.
Author
Owner

@NghiaTranUIT commented on GitHub (Apr 20, 2023):

To workaround, you can rollback to v4.5.0 👍 I will fix the change.

<!-- gh-comment-id:1516390674 --> @NghiaTranUIT commented on GitHub (Apr 20, 2023): To workaround, you can rollback to v4.5.0 👍 I will fix the change.
Author
Owner

@raxityo commented on GitHub (Apr 20, 2023):

Thanks so much for your consideration to introduce an option. I am guessing it could behave similarly to the "Preserve Host in Header Field".

I agree with the arguments in favor of this. In fact, this was one of the things I found to be annoying in Charles Proxy because of frequently switching environment when working in full-stack environment :)

<!-- gh-comment-id:1516413441 --> @raxityo commented on GitHub (Apr 20, 2023): Thanks so much for your consideration to introduce an option. I am guessing it could behave similarly to the "Preserve Host in Header Field". I agree with the arguments in favor of this. In fact, this was one of the things I found to be annoying in Charles Proxy because of frequently switching environment when working in full-stack environment :)
Author
Owner

@NghiaTranUIT commented on GitHub (Apr 21, 2023):

@raxityo let's try this Beta build: https://download.proxyman.io/beta/Proxyman_4.6.1_Support_Preseve_URL_in_Map_Remote.dmg

You can enable the "Preserve the original URL" in your Map Remote Rule.

CleanShot 2023-04-21 at 10 43 36@2x

<!-- gh-comment-id:1517222433 --> @NghiaTranUIT commented on GitHub (Apr 21, 2023): @raxityo let's try this Beta build: https://download.proxyman.io/beta/Proxyman_4.6.1_Support_Preseve_URL_in_Map_Remote.dmg You can enable the "Preserve the original URL" in your Map Remote Rule. ![CleanShot 2023-04-21 at 10 43 36@2x](https://user-images.githubusercontent.com/5878421/233537364-880cba32-afa2-41c0-b6fd-ff19913424e6.jpg)
Author
Owner

@raxityo commented on GitHub (Apr 21, 2023):

This is perfect, Thanks so much @NghiaTranUIT!!

<!-- gh-comment-id:1517900668 --> @raxityo commented on GitHub (Apr 21, 2023): This is perfect, Thanks so much @NghiaTranUIT!!
Author
Owner

@JasonBoy commented on GitHub (May 1, 2023):

@NghiaTranUIT what's the difference between this new option with the old preserve host in header, because when i upgrade to 4.7, my map remote rule returns 404 from remote server, i had to switch back to 4.6, i guess it did not preserve the host?

<!-- gh-comment-id:1529444526 --> @JasonBoy commented on GitHub (May 1, 2023): @NghiaTranUIT what's the difference between this new option with the old `preserve host in header`, because when i upgrade to 4.7, my map remote rule returns 404 from remote server, i had to switch back to 4.6, i guess it did not preserve the host?
Author
Owner

@NghiaTranUIT commented on GitHub (May 2, 2023):

@JasonBoy can you explain why the Preserve Host in Header is important? I decide to drop it because I could not find any reason that it should be supported.

For example:

  • Map from localhost:3000 to production (https://myserver.com). By default (Preserve Host in Header is OFF), the Host Request is changed from localhost:3000 -> myserver.com:443 -> My server will receive the host `myserver.com:443`` -> No different than I make a real request (https://myserver.com) without using the Map Remote.

If the Preserve Host in Header is ON, the server receives localhost:3000, which IMO makes no sense 🤔 Why the server needs the original Host (localhost:3000) instead of myserver.com ?

Therefore, I decided to drop this support. If you can share with me the reason why it's important, I'd like to reintroduce it and make it easier 👍

<!-- gh-comment-id:1530764971 --> @NghiaTranUIT commented on GitHub (May 2, 2023): @JasonBoy can you explain why the Preserve Host in Header is important? I decide to drop it because I could not find any reason that it should be supported. For example: - Map from localhost:3000 to production (https://myserver.com). By default (`Preserve Host in Header` is OFF), the Host Request is changed from `localhost:3000` -> `myserver.com:443` -> My server will receive the host `myserver.com:443`` -> No different than I make a real request (https://myserver.com) without using the Map Remote. If the `Preserve Host in Header` is ON, the server receives `localhost:3000`, which IMO makes no sense 🤔 Why the server needs the original Host (localhost:3000) instead of `myserver.com` ? Therefore, I decided to drop this support. If you can share with me the reason why it's important, I'd like to reintroduce it and make it easier 👍
Author
Owner

@JasonBoy commented on GitHub (May 2, 2023):

@NghiaTranUIT my case is in browser www.a.com -> some internal ip like:10.11.12.13, the server of this ip use the host header to proxy to different internal server, i'm not sure if the host is still domain or it changed to ip ?

<!-- gh-comment-id:1530780022 --> @JasonBoy commented on GitHub (May 2, 2023): @NghiaTranUIT my case is in browser `www.a.com` -> some internal ip like:`10.11.12.13`, the server of this ip use the host header to proxy to different internal server, i'm not sure if the host is still domain or it changed to ip ?
Author
Owner

@NghiaTranUIT commented on GitHub (May 2, 2023):

Thanks for your explanation @JasonBoy.

Sorry to all for the break changes. I will add this feature back in the next release 👍

  • Add the Preserve the Host feature back
  • Add the Preseve the Original URL
  • Bring these options into the Advanced section, so it doesn't mess up the UI.
<!-- gh-comment-id:1530804985 --> @NghiaTranUIT commented on GitHub (May 2, 2023): Thanks for your explanation @JasonBoy. Sorry to all for the break changes. I will add this feature back in the next release 👍 - Add the Preserve the Host feature back - Add the Preseve the Original URL - Bring these options into the Advanced section, so it doesn't mess up the UI.
Author
Owner

@NghiaTranUIT commented on GitHub (May 2, 2023):

@JasonBoy can you try this Beta build: https://download.proxyman.io/beta/Proxyman_4.7.1_Support_Preserve_Host_and_URL.dmg

I've re-introduced 2 options back:

  1. Preserve the original URL
  2. Preserve the Host Header

CleanShot 2023-05-02 at 14 25 07@2x

<!-- gh-comment-id:1531007482 --> @NghiaTranUIT commented on GitHub (May 2, 2023): @JasonBoy can you try this Beta build: https://download.proxyman.io/beta/Proxyman_4.7.1_Support_Preserve_Host_and_URL.dmg I've re-introduced 2 options back: 1. Preserve the original URL 2. Preserve the Host Header ![CleanShot 2023-05-02 at 14 25 07@2x](https://user-images.githubusercontent.com/5878421/235605031-8ed9fa26-254e-425f-a41f-c8a65f11a027.jpg)
Author
Owner

@JasonBoy commented on GitHub (May 4, 2023):

@NghiaTranUIT it works now, 👍

<!-- gh-comment-id:1534019364 --> @JasonBoy commented on GitHub (May 4, 2023): @NghiaTranUIT it works now, 👍
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Proxyman#1444
No description provided.