This commit is contained in:
parent
b05c4ad5d9
commit
3c8bd791e6
2 changed files with 163 additions and 137 deletions
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue