chromedp/cmd/chromedp-proxy
Kenneth Shaw 4145d8367d Addition of chromedp-proxy, fixing SendKeys, more
- Adding chromedp-proxy command to help record chrome sessions
- Changing the headless writeup to point to the knq chrome-headless
  docker image
- Fixing issues with SendKeys action (should correctly work for all
  well known keys)
- Updated to latest Chrome protocol.json and re-generated API
- Other minor fixes
2017-02-07 11:34:35 +07:00
..
.gitignore Addition of chromedp-proxy, fixing SendKeys, more 2017-02-07 11:34:35 +07:00
main.go Addition of chromedp-proxy, fixing SendKeys, more 2017-02-07 11:34:35 +07:00
README.md Addition of chromedp-proxy, fixing SendKeys, more 2017-02-07 11:34:35 +07:00

About chromedp-proxy

chromedp-proxy is a simple cli tool to log/intercept Chrome Debugging Protocol sessions, notably the websocket messages sent to/from Chrome DevTools and a Chromium/Chrome/headless_shell/etc. instance.

This is useful for finding problems/issues with the chromedp package or to review/log/capture Chrome Debugging Protocol commands, command results, and events sent/received by DevTools, Selenium, or any other application speaking the Chrome Debugging Protocol.

Installation

Install in the usual Go way:

go get -u github.com/knq/chromedp/cmd/chromedp-proxy

Use

By default, chromedp-proxy will listen on localhost:9223 and will proxy requests to/from localhost:9222:

chromedp-proxy

chromedp-proxy can also be used to expose a local Chrome instance on an external address/port:

chromedp-proxy -l 192.168.1.10:9222

By default, chromedp-proxy will log to both stdout and to logs/cdp-<id>.log, and can be modified using cli flags:

# only log to stdout
chromedp-proxy -n

# another way to only log to stdout
chromedp-proxy -log ''

# log to /var/log/cdp/session-<id>.log
chromedp-proxy -log '/var/log/cdp/session-%s.log'

Flags:

$ ./chromedp-proxy -help
Usage of ./chromedp-proxy:
  -l string
    	listen address (default "localhost:9223")
  -log string
    	log file mask (default "logs/cdp-%s.log")
  -n	disable logging to file
  -r string
    	remote address (default "localhost:9222")