chromedp-proxy

command
v0.0.0-...-fd310a9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2017 License: MIT Imports: 13 Imported by: 0

README

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")

Documentation

Overview

chromedp-proxy provides a cli utility that will proxy requests from a Chrome Debugging Protocol client to a application instance.

chromedp-proxy is particularly useful for recording events/data from Selenium (ChromeDriver), Chrome DevTools in the browser, or for debugging remote application instances compatible with the debugging protocol.

Please see README.md for more information on using chromedp-proxy.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL