12#include <Simple-Web-Server/server_https.hpp>
13#include <boost/property_tree/ptree.hpp>
61 setup(
const std::string &pkey,
const std::string &cert);
65 SunshineHTTPS(boost::asio::io_context &io_context, boost::asio::ssl::context &ctx):
66 SimpleWeb::HTTPS(io_context, ctx) {}
70 SimpleWeb::error_code ec;
85 std::string uniqueID = {};
86 std::string cert = {};
87 std::string name = {};
90 std::unique_ptr<crypto::aes_t> cipher_key = {};
91 std::vector<uint8_t> clienthash = {};
93 std::string serversecret = {};
94 std::string serverchallenge = {};
98 std::shared_ptr<typename SimpleWeb::ServerBase<SimpleWeb::HTTP>::Response>,
99 std::shared_ptr<typename SimpleWeb::ServerBase<SunshineHTTPS>::Response>>
101 std::string salt = {};
143 clientchallenge(
pair_session_t &sess, boost::property_tree::ptree &tree,
const std::string &challenge);
153 serverchallengeresp(
pair_session_t &sess, boost::property_tree::ptree &tree,
const std::string &encrypted_response);
182 pin(std::string
pin, std::string name);
200 boost::property_tree::ptree
Definition thread_safe.h:261
Declarations for cryptography functions.
Contains all the functions and variables related to the nvhttp (GameStream) server.
Definition nvhttp.cpp:39
constexpr auto GFE_VERSION
The GFE version we are replicating.
Definition nvhttp.h:34
int unpair_client(std::string uuid)
Remove single client.
Definition nvhttp.cpp:1202
PAIR_PHASE
Definition nvhttp.h:75
@ SERVERCHALLENGERESP
Sunshine is in the server challenge response phase.
@ CLIENTCHALLENGE
Sunshine is in the client challenge phase.
@ NONE
Sunshine is not in a pairing phase.
@ CLIENTPAIRINGSECRET
Sunshine is in the client pairing secret phase.
@ GETSERVERCERT
Sunshine is in the get server certificate phase.
constexpr auto PORT_HTTPS
The HTTPS port, as a difference from the config port.
Definition nvhttp.h:44
constexpr auto VERSION
The protocol version.
Definition nvhttp.h:29
void start()
Start the nvhttp server.
Definition nvhttp.cpp:1057
void setup(const std::string &pkey, const std::string &cert)
Setup the nvhttp server.
Definition nvhttp.cpp:1051
constexpr auto PORT_HTTP
The HTTP port, as a difference from the config port.
Definition nvhttp.h:39
bool pin(std::string pin, std::string name)
Compare the user supplied pin to the Moonlight pin.
Definition nvhttp.cpp:641
void erase_all_clients()
Remove all paired clients.
Definition nvhttp.cpp:1194
pt::ptree get_all_clients()
Get all paired clients.
Definition nvhttp.cpp:786
void remove_session(const pair_session_t &sess)
removes the temporary pairing session
Definition nvhttp.cpp:335
PAIR_PHASE last_phase
used as a security measure to prevent out of order calls
Definition nvhttp.h:107
Declarations for thread-safe data structures.