Open mariusvn opened 8 months ago
Yes it does 👍🏻
jeez that was fast,
is there anthing special to do because i struggle with that.
The link is hidden as it is owned by clients
on the image the websocket ignore the map remote here
it is still on the original url (yes it is the same url as the blurred part on the previous image)
@kics223w1 please investigate it. Try to Map Remote from WSS (production) to a local WS.
@mariusvn In the Rule text fields, can you try to remove the wss://
prefix part, it should be my-domain.fr
and try again? 🤔
May I also ask what Proxyman Windows version you're using?
Okay, I'll investigate this issue.
on the image the websocket ignore the map remote here
If you would, can you click on the Summary Tab -> expand the Debugging Tool
node -> Verify there is the Map Remote information 🤔 .
If there is, it means the MapRemote Tool has failed to map your request.
If there is nothing, it means the request doesn't match the MapRemote Tool. Please delete the rule and right click on the request in the MainTable to create new rule.
For instance:
i'll take a look in a few minutes, thanks for the active support btw
So yeah i do have the map remote entry in the debugging tool section
May I also ask what Proxyman Windows version you're using?
2.13.0
In the Rule text fields, can you try to remove the wss:// prefix part, it should be my-domain.fr and try again? 🤔
same result :/
Okay, I'm fixing this issue 👍🏻
Found the reason why this issue happened. @mariusvn
When Map Remote Tool started mapping the request, it will parse the origin URL to extract the hostname, port, scheme, etc...
For instance, when I map https://httpbin.proxyman.app/get
to https://httpbin.org/get
-> The tool will parse the https://httpbin.proxyman.app/get
to get those above properties.
If it fails to parse the origin URL, the tool will ignore the request and do nothing.
May I ask, if your URL contains any invalid characters 🤔 (you don't need to provide the full URL)
If you don't mind, can you test your URL with the below code in https://playcode.io/typescript , I'm pretty sure the result will be false.
const isValidURL = (url: string): boolean => {
try {
new URL(url);
return true;
} catch (e) {
return false;
}
};
const yourURL = "https://github.com";
console.log(isValidURL(yourURL));
@kics223w1 The URL is likely valid because modern network clients always construct valid URLs.
@mariusvn if you don't mind, please use this Beta build: https://download.proxyman.io/beta/Proxyman+Setup+2.13.0_Fix_Map_Remote_Websocket.exe
and share with me your result 👍
i will try this afternoon 👍
If you don't mind, can you test your URL with the below code in https://playcode.io/typescript , I'm pretty sure the result will be false.
It does returns true
.
May I ask, if your URL contains any invalid characters 🤔 (you don't need to provide the full URL)
x are alphabetic characters [a-z]
wss://xxx-xxxxx-xxx.xxxxxx.fr/ng-cli-ws
@mariusvn if you don't mind, please use this Beta build and share with me your result 👍
So I tried even without the wss://
prefix and it did not work.
it detects that the map remote should apply but mark -
as note and do not map it.
it does works perfectly for http. In fact, I am using the map remote tool to simulate that my angular dev server is located on another domain, which works perferctly. (yes this is weird but my clients have a weird setup x) )
I noticed the issue when i wanted to make the live reload work.
it looks like its only with other protocols than http
.
@mariusvn May I ask, did you enable Allow List, Block List or Network Conditions Tool while working with Map Remote and Websocket 🤔
If you are enabling the Allow List with Map Remote, please turn off the Allow List. There is a bug about Allow List + Map Remote + Websocket.
Yep that's it !!
Is it possible to add script before or after the map remote step ? because i need to update the origin header to make it work
@mariusvn Currently, Scripting doesn't support WebSocket yet.
May I ask, did you need to set the origin header equal the host in Map Remote Editor to make your WebSocket request work, right 🤔
I can refactor the code in Map Remote to do that, no need to use Scripting.
P/S: For HTTP and HTTPS, Scripting executes request after Map Remote.
May I ask, did you need to set the origin header equal the host in Map Remote Editor to make your WebSocket request work, right 🤔
Yes that's exactly that
I can refactor the code in Map Remote to do that, no need to use Scripting.
That would be nice but its not super urgent so no worries if i dont have it real soon
P/S: For HTTP and HTTPS, Scripting executes request after Map Remote.
Noted ! 👍
Yes that's exactly that
Okay, I'll refactor the code 👍🏻
@mariusvn
The new release 2.14.0 contains the fixed, please give it a try when you get a chance 🚀
Allow List's now working with Map Remote as usual, you don't need to turn off Allow List when using Map Remote Tool.
I also refactored the code in Map Remote Tool to update the origin header 👍🏻
Description
Does the map remote tool supports websockets on windows ?