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

This commit is contained in:
Juan José Gutiérrez de Quevedo Pérez 2025-03-28 10:34:52 +01:00
parent 3c8bd791e6
commit b4b995dd19
3 changed files with 8 additions and 9 deletions

View file

@ -9,10 +9,11 @@
#define SMTP_STATE_WAIT_FOR_RCPTTO 2
#define SMTP_STATE_WAIT_FOR_DATA 3
class Proxy {
class Proxy
{
public:
Proxy();
void run(boost::asio::ssl::stream<boost::asio::ip::tcp::socket>* outside);
void run(boost::asio::ssl::stream<boost::asio::ip::tcp::socket>* outside, const std::string& peer_address);
private:
boost::asio::io_service& io_service_;

View file

@ -1,6 +1,5 @@
// Proxy.cpp
#include "Proxy.h"
#include "HostnameResolver.h"
#include <iostream>
#include <thread>
#include <format>
@ -10,7 +9,7 @@
extern Configfile cfg;
void Proxy::run(boost::asio::ssl::stream<boost::asio::ip::tcp::socket>* outside) {
void Proxy::run(boost::asio::ssl::stream<boost::asio::ip::tcp::socket>* outside, const std::string& peer_address) {
boost::asio::ssl::stream<boost::asio::ip::tcp::socket>* inside;
// Original comments and variables retained
std::string from = "";

View file

@ -67,12 +67,11 @@ string Utils::ulongtostr(unsigned long number)
* @return string lowercase version of s
*
*/
string Utils::strtolower(string s)
string Utils::strtolower(const std::string_view s)
{
for(unsigned int i=0;i<s.length();i++)
s[i]=tolower(s[i]);
const std::string lower_str = boost::algorithm::to_lower_copy(s);
return s;
return lower_str;
}
/**
@ -83,7 +82,7 @@ string Utils::strtolower(string s)
* @return string trimmed string
*
*/
string Utils::trim(string s)
string Utils::trim(const std::string_view s)
{
while(isspace(s[0]))
s.erase(0,1);