Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chromedp/chromedp-proxy
chromedp-proxy is a logging proxy for Chrome DevTools Protocol clients.
https://github.com/chromedp/chromedp-proxy
Last synced: about 2 months ago
JSON representation
chromedp-proxy is a logging proxy for Chrome DevTools Protocol clients.
- Host: GitHub
- URL: https://github.com/chromedp/chromedp-proxy
- Owner: chromedp
- License: mit
- Created: 2017-12-22T23:38:10.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-06-19T02:58:19.000Z (3 months ago)
- Last Synced: 2024-06-19T21:00:55.836Z (3 months ago)
- Language: Go
- Homepage:
- Size: 10.7 KB
- Stars: 102
- Watchers: 6
- Forks: 26
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# About chromedp-proxy
`chromedp-proxy` is a simple command-line tool to proxy and log [Chrome
DevTools Protocol][devtools-protocol] sessions sent from a CDP client to a CDP
browser session. `chromedp-proxy` captures and (by default) logs all of the
WebSocket messages sent during a CDP session between a remote and local
endpoint, and can be used to expose a CDP browser listening on localhost to a
remote endpoint.`chromedp-proxy` is mainly used to capture and debug the wireline protocol sent
from DevTools/Selenium/Puppeteer to Chrome/Chromium/headless_shell/etc. It was
originally written for debugging wireline problems/issues with the
[`chromedp`][chromedp] project.## Installing
Install in the usual Go way:
```sh
$ go get -u github.com/chromedp/chromedp-proxy
```## Using
By default, `chromedp-proxy` listens on `localhost:9223` and proxies
requests to/from `localhost:9222`:```sh
$ chromedp-proxy
````chromedp-proxy` can also be used to expose a local Chrome instance on an
external address/port:```sh
$ chromedp-proxy -l 192.168.1.10:9222
```By default, `chromedp-proxy` logs to both `stdout` and to
`$PWD/logs/cdp-.log`, but that can be changed through flags:```sh
# only log to stdout
$ chromedp-proxy -n# or only log to stdout by specifying an empty log name
$ chromedp-proxy -log ''# log to /var/log/cdp/session-.log
$ chromedp-proxy -log '/var/log/cdp/session-%s.log'
```### Command-line options
```sh
$ ./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")
```[devtools-protocol]: https://chromedevtools.github.io/devtools-protocol/
[chromedp]: https://github.com/chromedp