mirror of
https://github.com/ProxymanApp/Proxyman.git
synced 2026-04-25 16:15:55 +03:00
[GH-ISSUE #1190] Scripting - only first script is applied if there are multiple scripts enabled for the same endpoint #1186
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#1186
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 @adrianwoda-viacom on GitHub (Mar 29, 2022).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1190
Originally assigned to: @NghiaTranUIT on GitHub.
Proxyman version? (Ex. Proxyman 1.4.3)
3.3.0
macOS Version? (Ex. mac 10.14)
12.3
Steps to reproduce
So currently if user has more than one scripts for the same endpoint, only the first one (on the top) is actually applied. Others are skipped.
How to reproduce:
on first script - console.log("first")
on second script - console.log("second")
actual:
on console, you will only see the "first" message but no "second", which means that only the first script was applied
expected:
I would love to be able to launch multiple scripts for the same request but in the order preserved as on the script list.
@NghiaTranUIT commented on GitHub (Mar 30, 2022):
Yes, it's our intention. We don't allow multiple scripts to be executed for 1 request/response.
Just wondering: Why do you need to execute multiple scripts? Why don't you write a single one, which contains all you need?
@adrianwoda-viacom commented on GitHub (Mar 30, 2022):
first of all, there is no information on the app that only the first script will be applied. This leads to a misunderstanding of how the feature should work. My coworkers who use your tool also made that mistake, unfortunately :)
I want to have the ability to have multiple scripts assigned to one endpoint for a few reasons:
@NghiaTranUIT commented on GitHub (Mar 30, 2022):
Thanks for your input @adrianwoda-viacom 👍
Currently, Proxyman will try to find the matched script by Top-Down order. If the Regex/wildcard is matched, this script is executed. Other scripts are ignored.
Thanks for your insight. We intentionally design this way, so the user can be aware of which script should be executed by explicitly enabling/disabling the rule.
If we allow multiple scripts can be executed, it's hard to trace down which one should be executed first, or later.
Yes, there are multiple Regex/Wildcard rules that can match the given request's URL, however, the first one (top-down) will be executed.
Anyway, I will escalate to the dev and see if might support multiple scripts.
@adrianwoda-viacom commented on GitHub (Mar 30, 2022):
thanks, looking forward to hearing from you
@aruudboy commented on GitHub (Nov 10, 2022):
Any updates on this @NghiaTranUIT? I'm running Proxyman 3.13.0 (31300) on MacOS Ventura 13.0, and I experience the same as originally reported here.
I can heavily relate to point 2 raised by @adrianwoda-viacom - I would love to be able to chose at will which parts of the response from one particular endpoint that I would like changed with different scripts without the need of changing the code of a single script. This is something I often did with Charles during regression tests, but as a business we've started our move over to Proxyman. :)
@NghiaTranUIT commented on GitHub (Nov 10, 2022):
Thanks for your input @aruudboy.
I guess I can add an option to allow executing multiple scripts, but keep the current behavior (1 script at once) as a default setting.
and this change is exclusive to the scripting.
@aruudboy commented on GitHub (Nov 10, 2022):
Thank you very much @NghiaTranUIT, I'm looking forward to try it out!
@aruudboy commented on GitHub (Jan 3, 2023):
Just following up on this @NghiaTranUIT.
I have updated to 3.15.0, and didn't see this as part of the release notes - and the behaviour is also the same as before. Do you know if this option will be available in any later versions of Proxyman?
@NghiaTranUIT commented on GitHub (Jan 3, 2023):
Sorry @aruudboy I did it, but implementing both: Multiple scripts (new feature) and a single script (current feature) doesn't work well and doesn't satisfy my standard. I'd like to postpone to suppose this feature until there are more requests on this 👍
@aruudboy commented on GitHub (Jan 5, 2023):
I fully support your decision - thank you for replying, and for the work you're doing on Proxyman!
@lesyuk commented on GitHub (Mar 5, 2023):
Unfortunately, in my particular case, I abandoned the use of the Proxyman in favor of Charles due to the lack of this feature.
It's very important for me to have a general rule for the entire domain using a wildcard, and separate rules for child methods. Now this is impossible.
@barbrzez commented on GitHub (Jun 20, 2023):
@NghiaTranUIT
The company I work for is currently in final stages of Macbook rollout planning.
I have been evaluating different web-debugging solutions. So far, proxyman has been my favourite, but the lack of this feature may be a deal-breaker for us.
We need to be able to perform different actions for the same domain, and be able to quickly toggle some of these actions on/off.
This can be resolved with different scripts and the switches in the script list, but unfortunately only one script can ever be executed.
The alternative that I can see is to use one script per domain, and to use add-ons to handle different behaviour, but even then we need the ability to quickly toggle behaviour on/off. Fiddler Classic allows plugins to contribute additional elements to the app's menu bar, items that modify the global state which the scripts can then read and apply the logic as required.
Please let me know your thoughts, or perhaps there is an alternative solution that I've not considered?
@NghiaTranUIT commented on GitHub (Jun 20, 2023):
Thanks for your input @barbrzez. I will move this ticket to the next release. Will send a Beta build here for testing 👍
Just to clarify that this "Multiple Scripts" is disabled by default, and it can be enabled in the Advanced Options.
Here is what it looks like (I suppose):
@NghiaTranUIT commented on GitHub (Jun 23, 2023):
Hey @barbrzez @lesyuk, @aruudboy @adrianwoda-viacom if you guys don't mind, let's try this Beta build: https://download.proxyman.io/beta/Proxyman_4.8.1_Support_Multiple_Scripts.dmg
Let me know if it works. If there are bugs, I'm all hears to fix it 👍
@barbrzez commented on GitHub (Jun 23, 2023):
@NghiaTranUIT many thanks for addressing this so quickly.
Two behaviours that I've noticed (and please bear in mind I don't know proxyman that well yet) are:
@NghiaTranUIT commented on GitHub (Jun 23, 2023):
Yes, it's a bug. I'm going to fix it now 👍
It's our decision. Map Remote doesn't work with Scripting.
@NghiaTranUIT commented on GitHub (Jun 23, 2023):
@barbrzez you can write a small JS code to change the host/path/scheme/query ... similar to Map Remote does
@barbrzez commented on GitHub (Jun 26, 2023):
@NghiaTranUIT yep thanks, we will use that going forwards.
@NghiaTranUIT commented on GitHub (Jul 14, 2023):
Update #3
@adrianwoda-viacom commented on GitHub (Sep 6, 2023):
@NghiaTranUIT when do you guys expect to add this to official release?
@NghiaTranUIT commented on GitHub (Sep 6, 2023):
Soon if you don't mind to test this Beta build on your end @adrianwoda-viacom, to check if it works as you expect 🤔
@adrianwoda-viacom commented on GitHub (Sep 7, 2023):
@NghiaTranUIT I've tested it and for me it works great - exactly as I want. It suits my and few of my colleagues needs! Can't wait for the release!
@NghiaTranUIT commented on GitHub (Sep 7, 2023):
Thanks @adrianwoda-viacom I will send a new Beta update today for you. Please use this Beta build awhile and report the bug if you don't mind 👍
If everything is good, I can release this version in the new update 👍
@NghiaTranUIT commented on GitHub (Sep 7, 2023):
Beta v4:
@adrianwoda-viacom please use this build for 1-2 weeks. If there is no major issue, I will include it in the next release 👍
@adrianwoda-viacom commented on GitHub (Sep 7, 2023):
@NghiaTranUIT thanks! Will do! 👍🏼
@adrianwoda-viacom commented on GitHub (Sep 13, 2023):
@NghiaTranUIT after almost a week, I'm pretty satisfied how it works :)
@adrianwoda-viacom commented on GitHub (Sep 28, 2023):
@NghiaTranUIT when you plan to release? :) Green light from me
@barbrzez commented on GitHub (Sep 28, 2023):
@NghiaTranUIT another vote from myself :)
@NghiaTranUIT commented on GitHub (Sep 28, 2023):
Awesome. I will include it in the next release. ETA: This weekend 👍
@aruudboy commented on GitHub (Oct 4, 2023):
Wow, I didn't see the notification when you tagged me @NghiaTranUIT - I just saw this feature is the latest release notes, and got to test it out now. IT WORKS PERFECTLY! 🎉 Thanks a lot!
@adrianwoda-viacom commented on GitHub (Oct 9, 2023):
because issue is fixed, I'm closing the ticket. Thank you all.