[GH-ISSUE #540] Breakpoint Rules with regEx-like abilities #536

Open
opened 2026-03-03 19:19:38 +03:00 by kerem · 6 comments
Owner

Originally created by @2bitmarv on GitHub (Jul 1, 2020).
Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/540

Originally assigned to: @NghiaTranUIT on GitHub.

Proxyman Version: 2.0.1

Mac OS Version: 10.15.4 (catalina)

How to reproduce:

creating a breakpoint rule like *://rp-online.de/ with subdirectories excluded because this would trigger the breakpoint by nearly EVERY type of call (doc, css and js files, images, etc). But now you have to create a rule for EVERY page call you want to trigger the breakpoint.

Expected behavior

I suggest to implement a more specific regex like possibility to create a single rule that can handle a pattern of a URL to trigger the breakpoint. In my case *://rp-online.de/ triggers on the homepage wether it its http or https. but with a more specific regex like pattern it could trigger also:

*://rp-online.de/panorama/deutschland/drama-in-vorpommern-mann-rettet-kinder-aus-ostsee-und-ertrinkt-dann-selbst_aid-51976133

which means a URL with lots of slashes and predictable patterns at the end. I want these URL to trigger, but I don't want URLs to trigger the breakpoint when its a JS or CSS or a media file.

I do understand that a full fledged regex engine is a pain for performance. But eventually I could be something in between.

Originally created by @2bitmarv on GitHub (Jul 1, 2020). Original GitHub issue: https://github.com/ProxymanApp/Proxyman/issues/540 Originally assigned to: @NghiaTranUIT on GitHub. ### Proxyman Version: 2.0.1 ### Mac OS Version: 10.15.4 (catalina) ### How to reproduce: creating a breakpoint rule like *://rp-online.de/ with subdirectories excluded because this would trigger the breakpoint by nearly EVERY type of call (doc, css and js files, images, etc). But now you have to create a rule for EVERY page call you want to trigger the breakpoint. ### Expected behavior I suggest to implement a more specific regex like possibility to create a single rule that can handle a pattern of a URL to trigger the breakpoint. In my case *://rp-online.de/ triggers on the homepage wether it its http or https. but with a more specific regex like pattern it could trigger also: *://rp-online.de/panorama/deutschland/drama-in-vorpommern-mann-rettet-kinder-aus-ostsee-und-ertrinkt-dann-selbst_aid-51976133 which means a URL with lots of slashes and predictable patterns at the end. I want these URL to trigger, but I don't want URLs to trigger the breakpoint when its a JS or CSS or a media file. I do understand that a full fledged regex engine is a pain for performance. But eventually I could be something in between.
Author
Owner

@NghiaTranUIT commented on GitHub (Jul 2, 2020):

I'm not sure if I understand your mean, but:

*://rp-online.de/panorama/deutschland/drama-in-vorpommern-mann-rettet-kinder-aus-ostsee-und-ertrinkt-dann-selbst_aid-51976133

I want these URL to trigger, but I don't want URLs to trigger the breakpoint when its a JS or CSS or a media file.

It's possible to achieve your need by specifying the exact path that you need for the breakpoint

For instance,

*://rp-online.de/panorama/deutschland/drama-in-vorpommern-mann-rettet-kinder-aus-ostsee-und-ertrinkt-dann-selbst_aid-51976133 will trigger the breakpoint on the HTML page, but not for JS/CSS

Screen Shot 2020-07-02 at 12 15 41 Screen Shot 2020-07-02 at 12 15 48

You can combine wildcard (* and ?) like:
*://rp-online.de/panorama/deutschland/drama-in-vorpommern-mann-rettet-kinder-aus-ostsee-und-ertrinkt-dann-selbst_aid-51976133/*.js -> trigger only JS file

<!-- gh-comment-id:652788850 --> @NghiaTranUIT commented on GitHub (Jul 2, 2020): I'm not sure if I understand your mean, but: > *://rp-online.de/panorama/deutschland/drama-in-vorpommern-mann-rettet-kinder-aus-ostsee-und-ertrinkt-dann-selbst_aid-51976133 > > **I want these URL to trigger, but I don't want URLs to trigger the breakpoint when its a JS or CSS or a media file.** It's possible to achieve your need by specifying the exact path that you need for the breakpoint For instance, `*://rp-online.de/panorama/deutschland/drama-in-vorpommern-mann-rettet-kinder-aus-ostsee-und-ertrinkt-dann-selbst_aid-51976133` will trigger the breakpoint on the HTML page, but not for JS/CSS <img width="1264" alt="Screen Shot 2020-07-02 at 12 15 41" src="https://user-images.githubusercontent.com/5878421/86319260-56f3fe00-bc5e-11ea-9684-0fe1517b46b1.png"> <img width="1840" alt="Screen Shot 2020-07-02 at 12 15 48" src="https://user-images.githubusercontent.com/5878421/86319276-6115fc80-bc5e-11ea-9312-d450f15f1b1f.png"> --------------- You can combine wildcard (* and ?) like: `*://rp-online.de/panorama/deutschland/drama-in-vorpommern-mann-rettet-kinder-aus-ostsee-und-ertrinkt-dann-selbst_aid-51976133/*.js` -> trigger only JS file
Author
Owner

@2bitmarv commented on GitHub (Jul 2, 2020):

Hi Nghia,
yes I probably did describe it not clear. what I meant is that I would find it very helpful to achieve as many matches as possible from one rule but ignore some of those (like JS or CSS files for example. So this would be like this URLs and its "subdirs":

pattern: ^.(http|https)://rp-online.de/.*

but not these URLs that have a "/assets/":

It would be like this regex

image
<!-- gh-comment-id:652848123 --> @2bitmarv commented on GitHub (Jul 2, 2020): Hi Nghia, yes I probably did describe it not clear. what I meant is that I would find it very helpful to achieve as many matches as possible from one rule but ignore some of those (like JS or CSS files for example. So this would be like this URLs and its "subdirs": pattern: ^.(http|https)://rp-online.de/.* - https://rp-online.de (homepage) - https://rp-online.de/nrw/ (subdir) - https://rp-online.de/nrw/panorama/ (subdir) - https://rp-online.de/nrw/panorama/nrw-mehr-straftaten-gegen-kommunalpolitiker-zahlen-deutlich-gestiegen_aid-51971787 (page) but not these URLs that have a "/assets/": - https://rp-online.de/assets/skins/rp-online/main.css?v=1593529587 It would be like this regex <img width="1073" alt="image" src="https://user-images.githubusercontent.com/37209176/86331706-b8f63880-bc49-11ea-87c2-a6e6658a8094.png">
Author
Owner

@NghiaTranUIT commented on GitHub (Jul 2, 2020):

It totally makes sense @2bitmarv. I will consider to support Regex for URL matching in the next releases 👍

<!-- gh-comment-id:653064888 --> @NghiaTranUIT commented on GitHub (Jul 2, 2020): It totally makes sense @2bitmarv. I will consider to support Regex for URL matching in the next releases 👍
Author
Owner

@NghiaTranUIT commented on GitHub (Jul 19, 2020):

Hi @2bitmarv, if you have free time, let check out this BETA build: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_2.2.0_Regex_For_All_Tools_v2.dmg

This build supports full-matching Regex for all tools (Breakpoint, Map Local, Map Remote, Block and Allow Tool). Therefore, you can write specific Regex to match requests that you need.

Document here: Regex

Screen Shot 2020-07-19 at 10 17 34
<!-- gh-comment-id:660608248 --> @NghiaTranUIT commented on GitHub (Jul 19, 2020): Hi @2bitmarv, if you have free time, let check out this BETA build: https://proxyman.s3.us-east-2.amazonaws.com/beta/Proxyman_2.2.0_Regex_For_All_Tools_v2.dmg This build supports full-matching Regex for all tools (Breakpoint, Map Local, Map Remote, Block and Allow Tool). Therefore, you can write specific Regex to match requests that you need. Document here: [Regex](https://docs.proxyman.io/basic-features/regex) <img width="1170" alt="Screen Shot 2020-07-19 at 10 17 34" src="https://user-images.githubusercontent.com/5878421/87870583-a1ea7100-c9d3-11ea-9a42-5c2a8836745f.png">
Author
Owner

@2bitmarv commented on GitHub (Jul 21, 2020):

Hi @NghiaTranUIT, it works like a charm 👍. I just took a glance and will dig deeper into it. But for now I could replace 10 Rules with just ONE :) Awesome!

<!-- gh-comment-id:662026044 --> @2bitmarv commented on GitHub (Jul 21, 2020): Hi @NghiaTranUIT, it works like a charm 👍. I just took a glance and will dig deeper into it. But for now I could replace 10 Rules with just ONE :) Awesome!
Author
Owner

@NghiaTranUIT commented on GitHub (Jul 22, 2020):

Glad to hear that 🙌

<!-- gh-comment-id:662193752 --> @NghiaTranUIT commented on GitHub (Jul 22, 2020): Glad to hear that 🙌
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#536
No description provided.