Chrome Debugging Protocol Proxy - reverse websocket proxy suitable for debugging a debugger 😎
Branch: master
Clone or download
Mateusz Gajewski
Mateusz Gajewski Merge pull request #2 from wendigo/issue_1
#1 Support /devtools/browser/{id} endpoints
Latest commit 657eab6 Nov 23, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Add .gitingore Jun 11, 2017
.goreleaser.yml
.travis.yml Build on 1.9 Aug 26, 2017
LICENSE
README.md Update README.md Aug 25, 2017
filter.go
flags.go Include/exclude filtering Aug 25, 2017
logger.go Include/exclude filtering Aug 25, 2017
main.go #1 Support /devtools/browser/{id} endpoints Nov 23, 2017
protocol.go
proxy.go Extended logging May 1, 2017
utils.go gofmt, govet Aug 25, 2017

README.md

chrome-protocol-proxy

chrome-protocol-proxy is small reverse websocket proxy designed for chrome debugging protocol. It's purpose is to capture messages written to and received from Chrome Debugging Protocol, coalesce requests with responses, unpack messages from Target domain and provide easy to read, colored output. This tool is a fork of (and heavily inspired by) chromedp-proxy.

chrome-protocol-proxy screenshot

features

  • colored output,
  • protocol frames filtering,πŸ––
  • request-response coalescing,
  • interprets Target.sendMessageToTarget requests,
  • interprets Target.receivedMessageFromTarget responses and events with both targetId and newly introduced sessionId,
  • calculates and displays time delta between consecutive frames,
  • writes logs and splits them based on connection id and target/session id.

usage

go get -u github.com/wendigo/chrome-protocol-proxy

configuration options

 Usage of chrome-protocol-proxy:
  -d	write logs file per targetId
  -delta
    	show delta time between log entries
  -exclude value
    	exclude requests/responses/events matching pattern (default exclude = )
  -i	include request frames as they are sent
  -include value
    	display only requests/responses/events matching pattern (default include = )
  -l string
    	listen address (default "localhost:9223")
  -log-dir string
    	logs directory (default "logs")
  -m	display time in microseconds
  -once
    	debug single session
  -q	do not show logs on stdout
  -r string
    	remote address (default "localhost:9222")
  -s	shorten requests and responses

demo

asciicast

tips & tricks

When using Headless Chrome navigate to inspectable pages and open inspector pane for url of your choosing. Then replace port in ?ws= query param and point it to running chrome-protocol-proxy instance (default port is 9223). Now you're able to see what Chrome Debugger is exactly doing. Enjoy!

headless chrome inspector traffic