ProxymanApp / proxyman-windows-linux

Public tracker for Proxyman Windows/Linux
https://proxyman.io/
MIT License
108 stars 4 forks source link

request.query parsing and url rebuilding error #418

Open infchaos opened 4 months ago

infchaos commented 4 months ago

when proxing url like this one http://xxx.xxx/test?e=123&token=xxx-xxx:xxx-xxx= the server got the url /ajax?e=123 without the token(a base64 like value)

and I wrote such js to fix it

request.queries = {}
    for (const [k, v] of [...new URLSearchParams(new URL(url).search)]) {
       request.queries[k] = v
    }

it works,and then I got another problem the server need a url in this format http://xxx.xxx/test?aaa&bbb=123 but the proxy changed the url into http://xxx.xxx/test?aaa=&bbb=123 the extra "=" make the response data invalid because the server may parse the url by regex. is there any way to directly return the url string I computed or just return the origin url without any changes?

NghiaTranUIT commented 1 month ago
aaa=&bbb=123

It's expected as it's a standard URL Query. If the value is absent, it's displays as aaa=.