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.
Spawns Chroxy.ChromeProxy process.
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
child_spec(init_arg)
Returns a specification to start this module under a supervisor.
See Supervisor.
chrome_connection(ref)
Starts a chrome page, and returns a websocket connection routed via the underlying proxy.
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.
page_id(arg)
Extract Chrome page_id from http request.
start_link(args)
Spawns Chroxy.ChromeProxy process.
Keyword args:
:chrome- pid of aChroxy.ChromeServerprocess.
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.