proxy.plugin.web_server_route module#
proxy.py#
⚡⚡⚡ Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on Network monitoring, controls & Application development, testing, debugging.
- copyright
2013-present by Abhinav Singh and contributors.
- license
BSD, see LICENSE for more details.
- class proxy.plugin.web_server_route.WebServerPlugin(uid: str, flags: argparse.Namespace, client: proxy.http.connection.HttpClientConnection, event_queue: proxy.core.event.queue.EventQueue, upstream_conn_pool: Optional[UpstreamConnectionPool] = None)[source]#
Bases:
proxy.http.server.plugin.HttpWebServerBasePlugin
Demonstrates inbuilt web server routing using plugin.
- _abc_impl = <_abc._abc_data object>#
- handle_request(request: proxy.http.parser.parser.HttpParser) None [source]#
Handle the request and serve response.
- on_websocket_message(frame: proxy.http.websocket.frame.WebsocketFrame) None [source]#
Open chrome devtools and try using following commands:
Example:
ws = new WebSocket(“ws://localhost:8899/ws-route-example”) ws.onmessage = function(m) { console.log(m); } ws.send(‘hello’)