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

Proxyman improperly changing URL in Map Remote #2202

Open
nmackey opened this issue Dec 3, 2024 · 3 comments
Open

Proxyman improperly changing URL in Map Remote #2202

nmackey opened this issue Dec 3, 2024 · 3 comments
Assignees
Labels
bug Something isn't working ✅ Done Ticket is addressed and fixed.

Comments

@nmackey
Copy link

nmackey commented Dec 3, 2024

Description

Upgrading from 5.4.0 to 5.5.0 and above break my Map Remote Rules.

Steps to Reproduce

Setup the following rule:

image

In Proxyman 5.4.0 and below via the debugging tool it will map as follows:

original URL - https://foo.com/test/admin?_data=routes%2Fmerchant%2B%2Fadmin%2F_index
mapped URL - http://localhost:3000/test/admin?_data=routes%2Fmerchant%2B%2Fadmin%2F_index

in Proxyman 5.5.0 and above via the debugging tool it will map as follows:

original URL - https://foo.com/test/admin?_data=routes%2Fmerchant%2B%2Fadmin%2F_index
mapped URL - http://localhost:3000/test/admin?_data=routes%2Fmerchant+%2Fadmin%2F_index

Notice that %2B gets mapped to + - which is not desired

I'm guessing there is a good chance this issue is related to one of these issues:

Current Behavior

URL path/query gets altered when using Map Remote

Expected Behavior

URL path/query should stay the same when using Map Remote

Environment

  • Proxyman 5.5.0 and above
  • macOS (haven't tested any other OS)
@nmackey nmackey added the bug Something isn't working label Dec 3, 2024
@NghiaTranUIT
Copy link
Member

Thank @nmackey I'm working on it now.

To workaround, you can simply use the Scripting to to change the Host and port.

Here is an example:

  1. Turn off your Map Remote first
  2. Scripting menu -> Create new script -> Rule = foo.com/test/*
  3. Script Content:
function onRequest(context, url, request) {
    request.scheme = "http";
    request.host = "localhost";
    request.port = 3000;
    return request;
}

You can find all useful cheat code at https://docs.proxyman.io/scripting/snippet-code#change-request-destination-scheme-host-port-path


Meanwhile, I will fix the bug and send you a hot fix asap 👍

@NghiaTranUIT NghiaTranUIT self-assigned this Dec 3, 2024
@NghiaTranUIT NghiaTranUIT added this to the Proxyman 5.12.0 milestone Dec 3, 2024
@NghiaTranUIT
Copy link
Member

@nmackey
Copy link
Author

nmackey commented Dec 3, 2024

This seems to work, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ✅ Done Ticket is addressed and fixed.
Projects
None yet
Development

No branches or pull requests

2 participants