#include #include #include #include #include #include #include #include #include "http/server.hpp" int main() { try { boost::asio::ssl::context sslContext(boost::asio::ssl::context::tls_server); SSL_CTX_set_cipher_list(sslContext.native_handle(), "EECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:!aNULL:!MD5:!DSS"); sslContext.set_options(boost::asio::ssl::context::default_workarounds | boost::asio::ssl::context::verify_none | boost::asio::ssl::context::no_sslv2 | boost::asio::ssl::context::no_sslv3 | boost::asio::ssl::context::no_tlsv1 | boost::asio::ssl::context::single_dh_use ); std::function f = [](std::size_t, boost::asio::ssl::context_base::password_purpose) -> std::string { return ""; }; sslContext.set_password_callback(f); sslContext.use_certificate_chain_file("/home/ubuntu/work/proxyServerTest/linux/fullchain1.pem"); sslContext.use_private_key_file("/home/ubuntu/work/proxyServerTest/linux/privkey1.pem", boost::asio::ssl::context::pem); sslContext.use_tmp_dh_file("dh2048.pem"); // Initialise the server. http::server::server s("0.0.0.0", "443", "/home/ubuntu/work/proxyServerTest/html/", sslContext); // Run the server until stopped. s.run(); } catch (std::exception& e) { std::cerr << "exception: " << e.what() << "\n"; } return 0; }