Skip to content

Instantly share code, notes, and snippets.

@jazlopez
Created December 9, 2022 02:12
Show Gist options
  • Select an option

  • Save jazlopez/e1ad78beac5fa3a488f38150364a1523 to your computer and use it in GitHub Desktop.

Select an option

Save jazlopez/e1ad78beac5fa3a488f38150364a1523 to your computer and use it in GitHub Desktop.
Configured alieases to work with mobproxy
# configured alias to work with mobproxy. It can be download from github page
# https://github.com/lightbody/browsermob-proxy/releases
# ----
# author: jazlopez @ github.com
# Dec 2022
# INSTRUCTIONS
# create a new file mobproxy.alias.zsh and enter the below
alias launch-browser-proxy="browsermob-proxy --port 8080"
alias create-new-proxy="curl -X POST http://localhost:8080/proxy"
alias get-proxy-requests="curl http://localhost:8080/proxy/8081/har"
alias init-proxy-har="curl -X PUT -d initialPageRef=Foo http://localhost:8080/proxy/8081/har"
# save and exit
# source the file:
source mobproxy.alias.zsh
# sequence: how it should be called
# in a new terminal, leave it open while running
launch-browser-proxy
# another terminal
create-new-proxy # it should return the proxy port is 8081
init-proxy-har # empty response but as long as there are not errors
# open your browser and edit the preferences to use proxy at localhost:8081.
# That should activate mobproxy to keep track of requests
# when you are done surfing the internet get the all request-response information
get-proxy-requests
# ...end....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment