More proxy stuff
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Juanjo Gutiérrez 2025-03-27 08:29:26 +01:00
parent b05c4ad5d9
commit 3c8bd791e6
No known key found for this signature in database
GPG key ID: 2EE7726C7CA75D4E
2 changed files with 163 additions and 137 deletions

View file

@ -1,7 +1,8 @@
// Proxy.h
#pragma once
#include <string>
#include "SocketInterface.h"
#include <boost/asio.hpp>
#include <boost/asio/ssl.hpp>
#define SMTP_STATE_WAIT_FOR_HELO 0
#define SMTP_STATE_WAIT_FOR_MAILFROM 1
@ -10,10 +11,10 @@
class Proxy {
public:
Proxy(SocketInterface* outside_socket) : outside(outside_socket) {}
void run(std::string& peer_address);
Proxy();
void run(boost::asio::ssl::stream<boost::asio::ip::tcp::socket>* outside);
private:
SocketInterface* outside;
boost::asio::io_service& io_service_;
boost::asio::ssl::context ssl_context;
};