[GH-ISSUE #1956] User-defined tabs (similar to the "Comment" tab) #1946

Open
opened 2026-03-03 19:55:41 +03:00 by kerem · 19 comments
Owner

Originally created by @ACATTAN on GitHub (Mar 5, 2024).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1956

Originally assigned to: @NghiaTranUIT on GitHub.

Description

It would be nice if we could use javascript to write information to "user-defined tabs", similar to the way we write to the "comment" tab. For example something like this:

request.userDefinedTab["myTab"] = "hello world";

If this is too complex, then we could have pre-defined user-defined tabs with predefined names. For example "tab1", "tab2" up to "tab9". And then we would do something like:

request.tab1 = "hello world";

Why this feature/change is important?

This feature can be useful if we have a lot of javascript code that extracts information from requests or responses, analyzes it, formats it etc. Currently we write everything to the "comment" tab, but it becomes cumbersome and hard to read. Using custom tabs could be very helpful for separation - write different information to different tabs.

Thanks for considering it!
Ariel

Originally created by @ACATTAN on GitHub (Mar 5, 2024). Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/1956 Originally assigned to: @NghiaTranUIT on GitHub. ## Description It would be nice if we could use javascript to write information to "user-defined tabs", similar to the way we write to the "comment" tab. For example something like this: `request.userDefinedTab["myTab"] = "hello world"; ` If this is too complex, then we could have pre-defined user-defined tabs with predefined names. For example "tab1", "tab2" up to "tab9". And then we would do something like: `request.tab1 = "hello world"; ` ## Why this feature/change is important? This feature can be useful if we have a lot of javascript code that extracts information from requests or responses, analyzes it, formats it etc. Currently we write everything to the "comment" tab, but it becomes cumbersome and hard to read. Using custom tabs could be very helpful for separation - write different information to different tabs. <!-- Explain why Proxyman needs this feature/change? --> Thanks for considering it! Ariel
Author
Owner

@NghiaTranUIT commented on GitHub (Mar 6, 2024):

Thanks for your suggestion @ACATTAN. For now, this feature is not possible.

May I ask some questions:

  1. Do you write JSON Body to the comment tab too? If yes, do you need a JSON syntax highlighting? For now, you can select all JSON Text -> Right Click -> View as -> JSON Prettier -> It will open a small window (auto prettify and syntax highlighting)
  2. What kind of data do you write to the comment tab?

There is a tip for you:

  1. When using the Scripting, write a piece of data to your headers.
    For example:
response.headers["x-my-user-id"] = "abcef"
  1. Use Custom Header Column (documents) and create a new column with name x-my-user-id for the Response
  2. it will show this data on your new columns. Make sure to resize and reorder, so it's easier to read 👍
<!-- gh-comment-id:1979944304 --> @NghiaTranUIT commented on GitHub (Mar 6, 2024): Thanks for your suggestion @ACATTAN. For now, this feature is not possible. May I ask some questions: 1. Do you write JSON Body to the comment tab too? If yes, do you need a JSON syntax highlighting? For now, you can select all JSON Text -> Right Click -> View as -> JSON Prettier -> It will open a small window (auto prettify and syntax highlighting) 2. What kind of data do you write to the comment tab? --------------------- There is a tip for you: 1. When using the Scripting, write a piece of data to your headers. For example: ```js response.headers["x-my-user-id"] = "abcef" ``` 2. Use Custom Header Column ([documents](https://docs.proxyman.io/basic-features/custom-header-column)) and create a new column with name `x-my-user-id` for the Response 3. ✅ it will show this data on your new columns. Make sure to resize and reorder, so it's easier to read 👍
Author
Owner

@ACATTAN commented on GitHub (Mar 6, 2024):

Thank you for the quick response and the tips!
To your questions - we make a lot of use of the comments tab. We write a lot of things to it which is derived from requests/responses, such as validation information like missing fields in requests or responses and many more.
The reason I asked for additional "custom tabs" is because, for example, one of the JSON fields in a request we have contains a complete log formatted in a proprietary way. It is not JSON, it contains many acronyms, and needs to be decoded and blown into a full log that is readable to a human eye by translating various acronyms, rearranging it etc. We can write a piece of javascript code that decodes and reformats this log, but we would have to output it into the comments tab. This will be mixed with other information we already write to the comments tab and becomes too cumbersome. That's why we wished we would be able to write such information to a tab of its own. Btw since we're talking about a lot of information - adding a column (such as your suggestion of custom headers) is not suited for that; it needs an entire tab that you can open and see its content.

<!-- gh-comment-id:1980318376 --> @ACATTAN commented on GitHub (Mar 6, 2024): Thank you for the quick response and the tips! To your questions - we make a lot of use of the comments tab. We write a lot of things to it which is derived from requests/responses, such as validation information like missing fields in requests or responses and many more. The reason I asked for additional "custom tabs" is because, for example, one of the JSON fields in a request we have contains a complete log formatted in a proprietary way. It is not JSON, it contains many acronyms, and needs to be decoded and blown into a full log that is readable to a human eye by translating various acronyms, rearranging it etc. We can write a piece of javascript code that decodes and reformats this log, but we would have to output it into the comments tab. This will be mixed with other information we already write to the comments tab and becomes too cumbersome. That's why we wished we would be able to write such information to a tab of its own. Btw since we're talking about a lot of information - adding a column (such as your suggestion of custom headers) is not suited for that; it needs an entire tab that you can open and see its content.
Author
Owner

@NghiaTranUIT commented on GitHub (Mar 6, 2024):

May I ask: How many users in your company have the same problem?

From what I remember, there were some users requested this similar feature: "Ability to write a custom preview on a new tab, by using the Script"

<!-- gh-comment-id:1980350541 --> @NghiaTranUIT commented on GitHub (Mar 6, 2024): May I ask: How many users in your company have the same problem? From what I remember, there were some users requested this similar feature: "Ability to write a custom preview on a new tab, by using the Script"
Author
Owner

@ACATTAN commented on GitHub (Mar 6, 2024):

We are about 15 users using Proxyman for almost two years now. We find Proxyman very powerful and flexible, and are making extensive use of it, including a lot of scripting. Unfortunately most of our company still uses Charles out of habit, but it means there's a lot of additional potential :-)
I don't think it was one of us asking for the feature you mentioned, but it does sound somewhat similar.

<!-- gh-comment-id:1980370636 --> @ACATTAN commented on GitHub (Mar 6, 2024): We are about 15 users using Proxyman for almost two years now. We find Proxyman very powerful and flexible, and are making extensive use of it, including a lot of scripting. Unfortunately most of our company still uses Charles out of habit, but it means there's a lot of additional potential :-) I don't think it was one of us asking for the feature you mentioned, but it does sound somewhat similar.
Author
Owner

@NghiaTranUIT commented on GitHub (Mar 7, 2024):

and what is the current solution for users who use Charles Proxy for their work? 🤔

I will keep this ticket open, and see if there are more requests 👍

<!-- gh-comment-id:1982294671 --> @NghiaTranUIT commented on GitHub (Mar 7, 2024): and what is the current solution for users who use Charles Proxy for their work? 🤔 I will keep this ticket open, and see if there are more requests 👍
Author
Owner

@ACATTAN commented on GitHub (Mar 7, 2024):

Users using Charles are in other R&D groups. We hope that at some points they will "see the light" and move to Proxyman :-)
Anyway I appreciate the fact that you are keeping this ticket open. I realize this is not an ordinary request.
Thanks a lot,
Ariel

<!-- gh-comment-id:1982618369 --> @ACATTAN commented on GitHub (Mar 7, 2024): Users using Charles are in other R&D groups. We hope that at some points they will "see the light" and move to Proxyman :-) Anyway I appreciate the fact that you are keeping this ticket open. I realize this is not an ordinary request. Thanks a lot, Ariel
Author
Owner

@elijahdou commented on GitHub (Jun 6, 2024):

@NghiaTranUIT We also have similar requirements. We want to support "user-defined tabs" similar to the "comment" tab or custom options to "text selection".

<!-- gh-comment-id:2151337593 --> @elijahdou commented on GitHub (Jun 6, 2024): @NghiaTranUIT We also have similar requirements. We want to support "user-defined tabs" similar to the "comment" tab or custom options to "text selection".
Author
Owner

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

@elijahdou can you share your user case what you need for the "User-defined tabs"?

  • Why do you need it?
  • What data are you going to display?

I'd like to understand to make a better decision 👍

<!-- gh-comment-id:2153702371 --> @NghiaTranUIT commented on GitHub (Jun 7, 2024): @elijahdou can you share your user case what you need for the "User-defined tabs"? - Why do you need it? - What data are you going to display? I'd like to understand to make a better decision 👍
Author
Owner

@Brontojoris commented on GitHub (Jun 19, 2024):

I am also interested in using some form of User Defined Tabs/Custom Preview.

I am testing Adobe Analytics tracking from a mobile app.

The tracking calls are url encoded POST requests, and the built in Form preview does a pretty good job, but I'd love a way to process the data a bit more, ideally reformatting into a JSON Treeview, removing some unnecessary fields, renaming others.

I'm already using the scripting feature to write some fields like app version, page name, action name, etc in the request to custom headers. Example.
proxyman example
Or could this be achieved using addons?

<!-- gh-comment-id:2177318330 --> @Brontojoris commented on GitHub (Jun 19, 2024): I am also interested in using some form of User Defined Tabs/Custom Preview. I am testing Adobe Analytics tracking from a mobile app. The tracking calls are url encoded POST requests, and the built in Form preview does a pretty good job, but I'd love a way to process the data a bit more, ideally reformatting into a [JSON Treeview](https://docs.proxyman.io/basic-features/request-response-viewer), removing some unnecessary fields, renaming others. I'm already using the scripting feature to write some fields like app version, page name, action name, etc in the request to custom headers. [Example](https://gist.github.com/Brontojoris/193f7d03e9db3b3129d007df63e5f4ed). ![proxyman example](https://github.com/ProxymanApp/Proxyman/assets/572375/3cb6f8c2-6927-40b4-a984-be9cc6c8daa3) Or could this be achieved using [addons](https://docs.proxyman.io/scripting/addons)?
Author
Owner

@NghiaTranUIT commented on GitHub (Jun 19, 2024):

Thanks @Brontojoris for your insight 👍

Do you think that If I provide:

const myJSONString = "<My JSON String>"
request.userDefinedTab["myTab"] = myJSONString;

could solve your problem?

userDefinedTab["myTab"] only accepts a String, so you can craft any string that you need to display. It also automatically prettifies the JSON if the data is a JSON String.

<!-- gh-comment-id:2177365294 --> @NghiaTranUIT commented on GitHub (Jun 19, 2024): Thanks @Brontojoris for your insight 👍 Do you think that If I provide: ```js const myJSONString = "<My JSON String>" request.userDefinedTab["myTab"] = myJSONString; ``` could solve your problem? `userDefinedTab["myTab"]` only accepts a String, so you can craft any string that you need to display. It also automatically prettifies the JSON if the data is a JSON String.
Author
Owner

@Brontojoris commented on GitHub (Jun 19, 2024):

Yeah that would work for me.

<!-- gh-comment-id:2177416714 --> @Brontojoris commented on GitHub (Jun 19, 2024): Yeah that would work for me.
Author
Owner

@NghiaTranUIT commented on GitHub (Jun 26, 2024):

@Brontojoris @elijahdou @ACATTAN good news 🎉

What's news:

How to use

  1. Click on the + button on the Request / Response Tab to open the Custom Previewer windows
  2. Click on the Add custom tab button
  3. Enter name
  4. Proxyman will show how to use it with Javascript Code
  5. Create a new script -> Add this code
// String
request.customPreviewerTabs["body"] = "My String";

// JSON
const obj = {"name": "Proxyman"};
request.customPreviewerTabs["body"] = JSON.stringify(obj, null, 2);
  1. Done. New tab will show your data

Screenshots

1
Screenshot 2024-06-26 at 1 18 31 PM
Screenshot 2024-06-26 at 1 19 13 PM
CleanShot 2024-06-26 at 1  17 49@2x

<!-- gh-comment-id:2190924280 --> @NghiaTranUIT commented on GitHub (Jun 26, 2024): @Brontojoris @elijahdou @ACATTAN good news 🎉 ### What's news: - Beta build: https://download.proxyman.io/beta/Proxyman_5.5.0_Support_Custom_Tab_with_scripting_v2.dmg - Able to create a new custom tab with a given name - Use Scripting to add data to this tab. - Support Request and Response Panel - Support String or JSON String (auto-prettify) ### How to use 1. Click on the `+` button on the Request / Response Tab to open the Custom Previewer windows 2. Click on the `Add custom tab` button 3. Enter name 4. Proxyman will show how to use it with Javascript Code 5. Create a new script -> Add this code ```js // String request.customPreviewerTabs["body"] = "My String"; // JSON const obj = {"name": "Proxyman"}; request.customPreviewerTabs["body"] = JSON.stringify(obj, null, 2); ``` 7. Done. New tab will show your data ### Screenshots ![1](https://github.com/ProxymanApp/Proxyman/assets/5878421/24d2901d-10e3-4fa0-a472-579df7385358) ![Screenshot 2024-06-26 at 1 18 31 PM](https://github.com/ProxymanApp/Proxyman/assets/5878421/1a336092-5c50-4e23-afbb-9a41f9679bb9) ![Screenshot 2024-06-26 at 1 19 13 PM](https://github.com/ProxymanApp/Proxyman/assets/5878421/dc7e6346-9ac6-4601-b07a-8294de2c4a02) ![CleanShot 2024-06-26 at 1  17 49@2x](https://github.com/ProxymanApp/Proxyman/assets/5878421/d5eaca51-9243-4a78-9245-06effefee6ab)
Author
Owner

@ACATTAN commented on GitHub (Jun 26, 2024):

That is awesome!

<!-- gh-comment-id:2191373609 --> @ACATTAN commented on GitHub (Jun 26, 2024): That is awesome!
Author
Owner

@ACATTAN commented on GitHub (Jun 26, 2024):

Btw, is it possible to also add the option to filter by some string inside a custom tab, like we can now search in the "comment" tab? Or is it asking for too much? :-)

Screenshot 2024-06-26 at 13 53 21
<!-- gh-comment-id:2191409819 --> @ACATTAN commented on GitHub (Jun 26, 2024): Btw, is it possible to also add the option to filter by some string inside a custom tab, like we can now search in the "comment" tab? Or is it asking for too much? :-) <img width="215" alt="Screenshot 2024-06-26 at 13 53 21" src="https://github.com/ProxymanApp/Proxyman/assets/11505149/24260d10-01ec-465c-8536-d0db5cda3f63">
Author
Owner

@NghiaTranUIT commented on GitHub (Jun 27, 2024):

Yes, let me quickly add it. However, it will filter all custom tabs so it's easier to implement and use.

  • It's complicated to filter on certain tabs.
<!-- gh-comment-id:2194019425 --> @NghiaTranUIT commented on GitHub (Jun 27, 2024): Yes, let me quickly add it. However, it will filter all custom tabs so it's easier to implement and use. - It's complicated to filter on certain tabs.
Author
Owner

@ACATTAN commented on GitHub (Jun 27, 2024):

Sounds good, thanks!

<!-- gh-comment-id:2194090838 --> @ACATTAN commented on GitHub (Jun 27, 2024): Sounds good, thanks!
Author
Owner

@NghiaTranUIT commented on GitHub (Jun 27, 2024):

@ACATTAN here is a Custom Tab Filter: https://download.proxyman.io/beta/Proxyman_5.5.0_Support_filter_on_custom_tabs.dmg

CleanShot 2024-06-27 at 15 52 26@2x

Please let me know if it works for you 👍

<!-- gh-comment-id:2194174268 --> @NghiaTranUIT commented on GitHub (Jun 27, 2024): @ACATTAN here is a Custom Tab Filter: https://download.proxyman.io/beta/Proxyman_5.5.0_Support_filter_on_custom_tabs.dmg ![CleanShot 2024-06-27 at 15 52 26@2x](https://github.com/ProxymanApp/Proxyman/assets/5878421/563de603-97a0-4bc5-8a76-43ea05e8314b) Please let me know if it works for you 👍
Author
Owner

@ACATTAN commented on GitHub (Jun 27, 2024):

Yes it works, very useful. Thanks!

<!-- gh-comment-id:2194261492 --> @ACATTAN commented on GitHub (Jun 27, 2024): Yes it works, very useful. Thanks!
Author
Owner

@wabiloo commented on GitHub (Nov 22, 2024):

Just for the record, this stuff is AWESOME. I will never be able to leave Proxyman now.

<!-- gh-comment-id:2493650883 --> @wabiloo commented on GitHub (Nov 22, 2024): Just for the record, this stuff is AWESOME. I will never be able to leave Proxyman now.
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#1946
No description provided.