chroxy v0.7.0 Chroxy.ChromeProxy

Process which establishes a single proxied websocket connection to an underlying chrome browser page remote debugging websocket.

Upon initialisation, the chrome proxy signal the Chroxy.ProxyListener to accept a TCP connection. The Chroxy.ProxyListener will initialise a Chroxy.ProxyServer to manage the connection between the upstream client and the downstream chrome remote debugging websocket.

When either the upstream or downstream connections close, the down/2 behaviours Chroxy.ProxyServer.Hook callback is invoked, allowing the Chroxy.ChromeProxy to close the chrome page.

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Starts a chrome page, and returns a websocket connection routed via the underlying proxy.

Chroxy.ProxyServer Callback Hook Called when upstream or downstream connections are closed. Will close the chrome page and shutdown this process.

Extract Chrome page_id from http request.

Chroxy.ProxyServer Callback Hook Called when upstream connection is established to ProxyServer. Will return downstream connection information of the Chrome instance.

Link to this section Functions

Link to this function

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

chrome_connection(ref)

Starts a chrome page, and returns a websocket connection routed via the underlying proxy.

Link to this function

down(ref, proxy_state)

Chroxy.ProxyServer Callback Hook Called when upstream or downstream connections are closed. Will close the chrome page and shutdown this process.

Extract Chrome page_id from http request.

Link to this function

start_link(args)

Spawns Chroxy.ChromeProxy process.

Keyword args:

Link to this function

up(ref, proxy_state)

Chroxy.ProxyServer Callback Hook Called when upstream connection is established to ProxyServer. Will return downstream connection information of the Chrome instance.