foo
This commit is contained in:
parent
8b7b40d3ab
commit
600d7146d3
21 changed files with 175 additions and 39 deletions
|
|
@ -1,4 +1,7 @@
|
|||
SET(CMAKE_AUTOMOC ON)
|
||||
|
||||
find_package(cppzmq REQUIRED)
|
||||
|
||||
add_compile_definitions(IS_HTTP_PROXY_INTERFACE)
|
||||
add_library(mitmproxy_plugin SHARED mitmproxy_network.cpp mitmproxy_network.h mitmproxy.json)
|
||||
target_include_directories(mitmproxy_plugin PRIVATE ../../include/)
|
||||
|
|
|
|||
|
|
@ -22,6 +22,11 @@ void mitmproxyPlugin::reconnect()
|
|||
this->connect();
|
||||
}
|
||||
|
||||
QString mitmproxyPlugin::getName()
|
||||
{
|
||||
return QString("mitmproxy bridge");
|
||||
}
|
||||
|
||||
void mitmproxyPlugin::process()
|
||||
{
|
||||
connect();
|
||||
|
|
@ -46,7 +51,7 @@ void mitmproxyPlugin::process()
|
|||
qDebug() << "received " << msg_type.c_str();
|
||||
} else if(msg_type == "response") {
|
||||
qDebug() << "received " << msg_type.c_str();
|
||||
message(j);
|
||||
emit message(j);
|
||||
} else if(msg_type == "requestheaders") {
|
||||
qDebug() << "received " << msg_type.c_str();
|
||||
} else if(msg_type == "request") {
|
||||
|
|
@ -55,8 +60,8 @@ void mitmproxyPlugin::process()
|
|||
qDebug() << "received " << msg_type.c_str();
|
||||
} else if(msg_type == "error") {
|
||||
qDebug() << "received " << msg_type.c_str();
|
||||
|
||||
// websocket events
|
||||
emit error("error received");
|
||||
} else if(msg_type == "websocket_handshake") {
|
||||
qDebug() << "received " << msg_type.c_str();
|
||||
} else if(msg_type == "websocket_start") {
|
||||
|
|
|
|||
|
|
@ -28,6 +28,8 @@ private:
|
|||
void reconnect();
|
||||
|
||||
public:
|
||||
//! name of the plugin
|
||||
QString getName() override;
|
||||
//! returns, whether the proxy is currently connected
|
||||
bool connected() override;
|
||||
//! disconnects the handle
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue