Thursday, June 7, 2018

Browsermob as a whitelisting/blacklisting Proxy

http://bmp.lightbody.net/

https://github.com/lightbody/browsermob-proxy

It's based on our friend Littleproxy.

Its latest release it 2.1.6. It seems not much going on recently... no commits in last 8 months...

In our case, 2 APIs are interesting:

Sets a list of URL patterns to whitelist PUT /proxy/[port]/whitelist

Request Parameters:

regex - A comma separated list of regular expressions.

status - The HTTP status code to return for URLs that do not match the whitelist.



Set a URL to blacklist
PUT /proxy/[port]/blacklist

Request Parameters:

regex - The blacklist regular expression.

status - The HTTP status code to return for URLs that are blacklisted.

method - The regular expression for matching HTTP method (GET, POST, PUT, etc). Optional, by default processing all HTTP method.




No comments: