Sunshine master
Self-hosted game stream host for Moonlight.
nvhttp::SunshineHTTPSServer Class Reference

HTTPS server backend that adds Sunshine's client-certificate verification. More...

Inheritance diagram for nvhttp::SunshineHTTPSServer:
[legend]
Collaboration diagram for nvhttp::SunshineHTTPSServer:
[legend]

Public Member Functions

 SunshineHTTPSServer (const std::string &certification_file, const std::string &private_key_file)
 Initialize the HTTPS server with Sunshine's certificate and key files.
 

Public Attributes

std::function< void(std::shared_ptr< Response >, std::shared_ptr< Request >)> on_verify_failed
 Handler used to return the pairing challenge when client verification fails.
 
std::function< int(SSL *)> verify
 Callback that validates a client's TLS certificate after handshake.
 

Protected Member Functions

void accept () override
 Accept a pending connection and arm the server for the next client.
 
void after_bind () override
 Enable client-certificate verification after the listening socket is bound.
 

Protected Attributes

boost::asio::ssl::context context
 TLS server context configured with Sunshine's certificate and protocol policy.
 

Detailed Description

HTTPS server backend that adds Sunshine's client-certificate verification.

Constructor & Destructor Documentation

◆ SunshineHTTPSServer()

nvhttp::SunshineHTTPSServer::SunshineHTTPSServer ( const std::string & certification_file,
const std::string & private_key_file )
inline

Initialize the HTTPS server with Sunshine's certificate and key files.

Parameters
certification_filePath to the server certificate file.
private_key_filePath to the matching private key file.

The documentation for this class was generated from the following file: