[GH-ISSUE #739] Request: Add support for organizing scripts, and other rules, using expandable nested sections. #735

Open
opened 2026-03-03 19:21:25 +03:00 by kerem · 28 comments
Owner

Originally created by @mprice-banno on GitHub (Dec 22, 2020).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/739

Originally assigned to: @NghiaTranUIT on GitHub.

Proxyman version? (Ex. Proxyman 1.4.3)

2.15.0 (21500)

macOS Version? (Ex. mac 10.14)

macOS 10.15.6

Feature request to add the ability to organize scripts in the Scripting window. I already have 40-50 scripts and it's beginning to get difficult to manage them. I would like to be able to:

  • Create folders of scripts that I can expand or contract.
  • Enable scripts either individually, or a folder of them all at once (and then be able to disable some).
  • Drag and drop scripts from folder to folder to re-organize them.
  • Nested folders would be fantastic, would make it easy to organize by project and then function. But non-nested would be great start.

Sorry for the poor quality mock-up , but something along the lines of:

Screen Shot 2020-12-22 at 8 47 18 AM

Thanks!

Originally created by @mprice-banno on GitHub (Dec 22, 2020). Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/739 Originally assigned to: @NghiaTranUIT on GitHub. ### Proxyman version? (Ex. Proxyman 1.4.3) 2.15.0 (21500) ### macOS Version? (Ex. mac 10.14) macOS 10.15.6 Feature request to add the ability to organize scripts in the Scripting window. I already have 40-50 scripts and it's beginning to get difficult to manage them. I would like to be able to: * Create folders of scripts that I can expand or contract. * Enable scripts either individually, or a folder of them all at once (and then be able to disable some). * Drag and drop scripts from folder to folder to re-organize them. * Nested folders would be fantastic, would make it easy to organize by project and then function. But non-nested would be great start. Sorry for the poor quality mock-up , but something along the lines of: ![Screen Shot 2020-12-22 at 8 47 18 AM](https://user-images.githubusercontent.com/58708906/102927001-eda1ba80-444a-11eb-8419-cad303bdad67.png) Thanks!
Author
Owner

@NghiaTranUIT commented on GitHub (Dec 23, 2020):

Thanks for the feature request. It's quite popular recently (#713) and I suppose that it should be supported in the next major release 👍

<!-- gh-comment-id:749891614 --> @NghiaTranUIT commented on GitHub (Dec 23, 2020): Thanks for the feature request. It's quite popular recently (#713) and I suppose that it should be supported in the next major release 👍
Author
Owner

@mprice-banno commented on GitHub (Dec 23, 2020):

I should have checked to see if it was already filed 🙂 Thanks for the update!

<!-- gh-comment-id:749966592 --> @mprice-banno commented on GitHub (Dec 23, 2020): I should have checked to see if it was already filed 🙂 Thanks for the update!
Author
Owner

@NghiaTranUIT commented on GitHub (Jan 8, 2021):

Good new that I'm working on this feature because I've recently received a lot of requests 😄

<!-- gh-comment-id:756540845 --> @NghiaTranUIT commented on GitHub (Jan 8, 2021): Good new that I'm working on this feature because I've recently received a lot of requests 😄
Author
Owner

@mprice-banno commented on GitHub (Jan 8, 2021):

Great! Perfect timing I just requested 32 new licenses, hopefully our purchasing department will get those ordered soon :-)
Thanks!

<!-- gh-comment-id:756833549 --> @mprice-banno commented on GitHub (Jan 8, 2021): Great! Perfect timing I just requested 32 new licenses, hopefully our purchasing department will get those ordered soon :-) Thanks!
Author
Owner

@NghiaTranUIT commented on GitHub (Jan 9, 2021):

@mprice-banno wow, it's awesome. Thank you so much for supporting the Proxyman team 🎉

<!-- gh-comment-id:757077233 --> @NghiaTranUIT commented on GitHub (Jan 9, 2021): @mprice-banno wow, it's awesome. Thank you so much for supporting the Proxyman team 🎉
Author
Owner

@cameroncooke commented on GitHub (Jan 15, 2021):

Out of interest because I'm curious what are common use-cases for scripting?

<!-- gh-comment-id:760932616 --> @cameroncooke commented on GitHub (Jan 15, 2021): Out of interest because I'm curious what are common use-cases for scripting?
Author
Owner

@NghiaTranUIT commented on GitHub (Jan 15, 2021):

@cameroncooke Basically, you can do Map Local, Map Remote, and Breakpoint and more complicated tasks by writing JS Code instead of using GUI.

You can take a look at the Snippet Code that how Scripting can do: https://docs.proxyman.io/scripting/snippet-code 👍

<!-- gh-comment-id:760933774 --> @NghiaTranUIT commented on GitHub (Jan 15, 2021): @cameroncooke Basically, you can do Map Local, Map Remote, and Breakpoint and more complicated tasks by writing JS Code instead of using GUI. You can take a look at the Snippet Code that how Scripting can do: https://docs.proxyman.io/scripting/snippet-code 👍
Author
Owner

@cameroncooke commented on GitHub (Jan 15, 2021):

@cameroncooke Basically, you can do Map Local, Map Remote, and Breakpoint and more complicated tasks by writing JS Code instead of using GUI.

You can take a look at the Snippet Code that how Scripting can do: https://docs.proxyman.io/scripting/snippet-code 👍

Sorry don't want to take this thread too far off topic and sure I understand what it does I'm more interested in what the actual use-cases are as breakpoints and map local are pretty powerful and anything more dynamic just feels like an API builder to me which is probably better served with mocking using something like Postman.

<!-- gh-comment-id:760936719 --> @cameroncooke commented on GitHub (Jan 15, 2021): > @cameroncooke Basically, you can do Map Local, Map Remote, and Breakpoint and more complicated tasks by writing JS Code instead of using GUI. > > > > You can take a look at the Snippet Code that how Scripting can do: https://docs.proxyman.io/scripting/snippet-code 👍 > Sorry don't want to take this thread too far off topic and sure I understand what it does I'm more interested in what the actual use-cases are as breakpoints and map local are pretty powerful and anything more dynamic just feels like an API builder to me which is probably better served with mocking using something like Postman.
Author
Owner

@NghiaTranUIT commented on GitHub (Jan 15, 2021):

You can do a Mock API with the Scripting or Map Local too 😄 If you have time, let explore the Scripting, it's powerful and useful than other tools 🎉

<!-- gh-comment-id:760941440 --> @NghiaTranUIT commented on GitHub (Jan 15, 2021): You can do a Mock API with the Scripting or Map Local too 😄 If you have time, let explore the Scripting, it's powerful and useful than other tools 🎉
Author
Owner

@michaelhogg commented on GitHub (Mar 25, 2021):

Good new that I'm working on this feature because I've recently received a lot of requests 😄

@NghiaTranUIT: Really looking forward to this feature! 🎉

<!-- gh-comment-id:806300155 --> @michaelhogg commented on GitHub (Mar 25, 2021): > Good new that I'm working on this feature because I've recently received a lot of requests 😄 @NghiaTranUIT: Really looking forward to this feature! :tada:
Author
Owner

@mprice-banno commented on GitHub (May 6, 2021):

@NghiaTranUIT any update on this feature, I know it's a big one :-)

<!-- gh-comment-id:833672368 --> @mprice-banno commented on GitHub (May 6, 2021): @NghiaTranUIT any update on this feature, I know it's a big one :-)
Author
Owner

@NghiaTranUIT commented on GitHub (May 7, 2021):

Hey @mprice-banno, we're currently working on the GraphQL Matching for tools #840.

It's almost done. After that, we will focus on this feature 👍 Sorry for this inconvenience

<!-- gh-comment-id:833995348 --> @NghiaTranUIT commented on GitHub (May 7, 2021): Hey @mprice-banno, we're currently working on the GraphQL Matching for tools #840. It's almost done. After that, we will focus on this feature 👍 Sorry for this inconvenience
Author
Owner

@mprice-banno commented on GitHub (May 7, 2021):

No worries. Good to hear it's still in the works though. :-)

<!-- gh-comment-id:834618025 --> @mprice-banno commented on GitHub (May 7, 2021): No worries. Good to hear it's still in the works though. :-)
Author
Owner

@mprice-banno commented on GitHub (Jul 26, 2021):

Just checking in again, my list of scripts is getting bigger ;-) Any updates on this one?

<!-- gh-comment-id:887086032 --> @mprice-banno commented on GitHub (Jul 26, 2021): Just checking in again, my list of scripts is getting bigger ;-) Any updates on this one?
Author
Owner

@NghiaTranUIT commented on GitHub (Jul 27, 2021):

@mprice-banno We're still working on it 🙇 . Sorry for the delay since we have to implement other features (Socks, http/2), which is in high priority.

<!-- gh-comment-id:887258291 --> @NghiaTranUIT commented on GitHub (Jul 27, 2021): @mprice-banno We're still working on it 🙇 . Sorry for the delay since we have to implement other features (Socks, http/2), which is in high priority.
Author
Owner

@crankygeek commented on GitHub (Sep 17, 2021):

@NghiaTranUIT I've been running into limitations with the current scripting list, too. I realize the original request is a big lift, so I was wondering if there may be some other things that could be added while that's in progress? For example, I use pretty verbose names for my scripts, so having the ability to filter the list by strings would help.

I know this could introduce some other issues, such as indicating if non-visible scripts are enabled.

<!-- gh-comment-id:921931771 --> @crankygeek commented on GitHub (Sep 17, 2021): @NghiaTranUIT I've been running into limitations with the current scripting list, too. I realize the original request is a big lift, so I was wondering if there may be some other things that could be added while that's in progress? For example, I use pretty verbose names for my scripts, so having the ability to filter the list by strings would help. I know this could introduce some other issues, such as indicating if non-visible scripts are enabled.
Author
Owner

@mprice-banno commented on GitHub (Feb 17, 2022):

@NghiaTranUIT Any news on this one? My script list is getting longer all the time.

<!-- gh-comment-id:1043343730 --> @mprice-banno commented on GitHub (Feb 17, 2022): @NghiaTranUIT Any news on this one? My script list is getting longer all the time.
Author
Owner

@jrobinson01 commented on GitHub (Feb 17, 2022):

No idea how big of an ask this is, but could the data in ScriptService (which looks like standard JSON) be moved to a comment block in the script file itself, and the application adjusted to just use a user-defined file-system directory as the source for all scripts? This would open up the option to much more easily use external editors and git to manage scripts vs a gui in the app (I don't see why the gui would need to go away or change, but external editing would be a welcome addition).

<!-- gh-comment-id:1043417340 --> @jrobinson01 commented on GitHub (Feb 17, 2022): No idea how big of an ask this is, but could the data in `ScriptService` (which looks like standard JSON) be moved to a comment block in the script file itself, and the application adjusted to just use a user-defined file-system directory as the source for all scripts? This would open up the option to much more easily use external editors and git to manage scripts vs a gui in the app (I don't see why the gui would need to go away or change, but external editing would be a welcome addition).
Author
Owner

@NghiaTranUIT commented on GitHub (Feb 18, 2022):

@mprice-banno here is the sneak peek of what we're still working 👍

Folder Rule

Basically, you can create a folder, drag and drop, enable/disable a folder or single rules, nest folder with multiple levels...

It's done, but only for Map Local, Breakpoint, and Scripting. Our team is still working on refactoring the Block List, SSL Proxying, Map Remote, etc.

The difficult part is that we have to use a different structure, switch from NSTableView (1 layer) to NSOutlineView (multiple layers), so it takes more time.

<!-- gh-comment-id:1043870582 --> @NghiaTranUIT commented on GitHub (Feb 18, 2022): @mprice-banno here is the sneak peek of what we're still working 👍 <img width="1236" alt="Folder Rule" src="https://user-images.githubusercontent.com/5878421/154617685-d53e2a1d-1c04-4b8d-bb29-f4de4ed0f3aa.png"> Basically, you can create a folder, drag and drop, enable/disable a folder or single rules, nest folder with multiple levels... It's done, but only for Map Local, Breakpoint, and Scripting. Our team is still working on refactoring the Block List, SSL Proxying, Map Remote, etc. The difficult part is that we have to use a different structure, switch from NSTableView (1 layer) to NSOutlineView (multiple layers), so it takes more time.
Author
Owner

@NghiaTranUIT commented on GitHub (Feb 18, 2022):

@jrobinson01 if we put the ScriptService as a comment block in the script, it's inconsistent with other tools (Breakpoint, Map Loca, ...).

To use git, you can easily add this folder ~/Library/Application Support/com.proxyman.NSProxy/user-data/. It's where all debugging tools's configs are stored.

If you change these data (JSON), the GUI is updated.


Regarding the script file, you can parse the ScriptService file and get the filePath.

For example:

[{"id":"676C54FE","isMockResponse":false,"regex":"useWildcard","url":"","graphQLQueryName":null,"isEnableRequest":true,"isEnabled":true,"filePath":"~\/Library\/Application Support\/com.proxyman.NSProxy\/scripts\/676C54FE.js","isIncludingPaths":false,"isEnableResponse":true,"name":"Untitled","method":{"any":{}}}]

Thus, you can use the external editor to modify the script.

<!-- gh-comment-id:1043872912 --> @NghiaTranUIT commented on GitHub (Feb 18, 2022): @jrobinson01 if we put the ScriptService as a comment block in the script, it's inconsistent with other tools (Breakpoint, Map Loca, ...). To use `git`, you can easily add this folder `~/Library/Application Support/com.proxyman.NSProxy/user-data/`. It's where all debugging tools's configs are stored. If you change these data (JSON), the GUI is updated. ---------- Regarding the script file, you can parse the `ScriptService` file and get the `filePath`. For example: ``` [{"id":"676C54FE","isMockResponse":false,"regex":"useWildcard","url":"","graphQLQueryName":null,"isEnableRequest":true,"isEnabled":true,"filePath":"~\/Library\/Application Support\/com.proxyman.NSProxy\/scripts\/676C54FE.js","isIncludingPaths":false,"isEnableResponse":true,"name":"Untitled","method":{"any":{}}}] ``` Thus, you can use the external editor to modify the script.
Author
Owner

@jrobinson01 commented on GitHub (Feb 18, 2022):

@NghiaTranUIT I'll have to play with the git setup. My goal with moving the json to the script files was to self-contain the script files for ease of sharing across teams. Understandable that that's not consistent with the rest of the app.

<!-- gh-comment-id:1044594619 --> @jrobinson01 commented on GitHub (Feb 18, 2022): @NghiaTranUIT I'll have to play with the `git` setup. My goal with moving the json to the script files was to self-contain the script files for ease of sharing across teams. Understandable that that's not consistent with the rest of the app.
Author
Owner

@mprice-banno commented on GitHub (Feb 18, 2022):

@NghiaTranUIT That looks great! Can't wait!

<!-- gh-comment-id:1045365730 --> @mprice-banno commented on GitHub (Feb 18, 2022): @NghiaTranUIT That looks great! Can't wait!
Author
Owner

@NghiaTranUIT commented on GitHub (Jun 6, 2022):

Hey @crankygeek @jrobinson01 @mprice-banno @cameroncooke here is the good news 🎉

The folder for debugging tools is finally done 😄 If you don't mind, you guys can check out this beta build: Beta build: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_3.5.2_Support_Folder.dmg

Changelog

  • Support Folder on Map Local, Breakpoint, and Scripting tool.
  • Only 1 level folder for now.
  • Enable an entire folder or particular rules.
  • Drag and drop
  • Filter on folders
  • Redesign the Scripting Editor to utilize the working space on small screens and be easier to use.
  • and minor changes.

Notes

As soon as you use this build, Proxyman will perform the data migration to the new format (treeview). Your data is safely backup. (You can access it in Help Menu -> Advanced -> Open Backup folder) 👍

GIF

CleanShot 2022-06-06 at 21 37 30

<!-- gh-comment-id:1147531013 --> @NghiaTranUIT commented on GitHub (Jun 6, 2022): Hey @crankygeek @jrobinson01 @mprice-banno @cameroncooke here is the good news 🎉 The folder for debugging tools is finally done 😄 If you don't mind, you guys can check out this beta build: Beta build: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_3.5.2_Support_Folder.dmg ### Changelog - Support Folder on Map Local, Breakpoint, and Scripting tool. - Only 1 level folder for now. - Enable an entire folder or particular rules. - Drag and drop - Filter on folders - Redesign the Scripting Editor to utilize the working space on small screens and be easier to use. - and minor changes. ### Notes As soon as you use this build, Proxyman will perform the data migration to the new format (treeview). Your data is safely backup. (You can access it in Help Menu -> Advanced -> Open Backup folder) 👍 ### GIF ![CleanShot 2022-06-06 at 21 37 30](https://user-images.githubusercontent.com/5878421/172183883-67224beb-8918-4748-af8e-beeaef845a82.gif)
Author
Owner

@mprice-banno commented on GitHub (Jun 6, 2022):

@NghiaTranUIT Checking it now! Does this build also resolve the script data loss issue?

<!-- gh-comment-id:1147682674 --> @mprice-banno commented on GitHub (Jun 6, 2022): @NghiaTranUIT Checking it now! Does this build also resolve the script data loss issue?
Author
Owner

@NghiaTranUIT commented on GitHub (Jun 7, 2022):

Since I've redesigned the Scripting UI, the lost issues is fixed too 👍

<!-- gh-comment-id:1148092885 --> @NghiaTranUIT commented on GitHub (Jun 7, 2022): Since I've redesigned the Scripting UI, the lost issues is fixed too 👍
Author
Owner

@mprice-banno commented on GitHub (Jun 10, 2022):

@NghiaTranUIT seeing a couple of issues. Haven't completely debugged them yet, but wanted to note here before I forget.

  • Creating a new script, it doesn't show any console output until I quit and restart the app.
  • The console doesn't seem to update when a script is executed, I have to close the script/console window and re-open to see the output.
  • The clear console 🗑️ icon doesn't seem to clear the console.
<!-- gh-comment-id:1152698844 --> @mprice-banno commented on GitHub (Jun 10, 2022): @NghiaTranUIT seeing a couple of issues. Haven't completely debugged them yet, but wanted to note here before I forget. - Creating a new script, it doesn't show any console output until I quit and restart the app. - The console doesn't seem to update when a script is executed, I have to close the script/console window and re-open to see the output. - The clear console 🗑️ icon doesn't seem to clear the console.
Author
Owner

@NghiaTranUIT commented on GitHub (Jun 11, 2022):

Thanks for letting me know @mprice-banno 👍 it seems that all about the Scripting new UI. I'm going to fix it now 👍

<!-- gh-comment-id:1152868219 --> @NghiaTranUIT commented on GitHub (Jun 11, 2022): Thanks for letting me know @mprice-banno 👍 it seems that all about the Scripting new UI. I'm going to fix it now 👍
Author
Owner

@NghiaTranUIT commented on GitHub (Jun 14, 2022):

Here is the fix @mprice-banno : https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_3.5.2_Fix_Scripting_and_Console_Log.dmg

There was a mistake that I forget to link the Script to the Console Log Controller. Thus, it causes all problems, that you report 👍

<!-- gh-comment-id:1154626111 --> @NghiaTranUIT commented on GitHub (Jun 14, 2022): Here is the fix @mprice-banno : https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_3.5.2_Fix_Scripting_and_Console_Log.dmg There was a mistake that I forget to link the Script to the Console Log Controller. Thus, it causes all problems, that you report 👍
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#735
No description provided.