logging: change client verified messages to debug (#1020)
This commit is contained in:
+4
-4
@@ -487,7 +487,7 @@ LOOKUP_CACHE_SIZE = 0
|
|||||||
# DOT_NUM_THREADS setting.
|
# DOT_NUM_THREADS setting.
|
||||||
# Minimum value: 0, maximum value: 32, default value: 1.
|
# Minimum value: 0, maximum value: 32, default value: 1.
|
||||||
|
|
||||||
NUM_PROC_THREADS = 1
|
NUM_PROC_THREADS = 0
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# Build related configuration options
|
# Build related configuration options
|
||||||
@@ -672,7 +672,7 @@ SORT_MEMBER_DOCS = YES
|
|||||||
# this will also influence the order of the classes in the class list.
|
# this will also influence the order of the classes in the class list.
|
||||||
# The default value is: NO.
|
# The default value is: NO.
|
||||||
|
|
||||||
SORT_BRIEF_DOCS = NO
|
SORT_BRIEF_DOCS = YES
|
||||||
|
|
||||||
# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
|
# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
|
||||||
# (brief and detailed) documentation of class members so that constructors and
|
# (brief and detailed) documentation of class members so that constructors and
|
||||||
@@ -919,7 +919,7 @@ WARN_LOGFILE =
|
|||||||
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
|
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
|
||||||
# Note: If this tag is empty the current directory is searched.
|
# Note: If this tag is empty the current directory is searched.
|
||||||
|
|
||||||
INPUT = ../src ../src/platform ../src/platform/linux ../src/platform/macos ../src/platform/windows
|
INPUT = ../src
|
||||||
|
|
||||||
# This tag can be used to specify the character encoding of the source files
|
# This tag can be used to specify the character encoding of the source files
|
||||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
||||||
@@ -1010,7 +1010,7 @@ FILE_PATTERNS = *.c \
|
|||||||
# be searched for input files as well.
|
# be searched for input files as well.
|
||||||
# The default value is: NO.
|
# The default value is: NO.
|
||||||
|
|
||||||
RECURSIVE = NO
|
RECURSIVE = YES
|
||||||
|
|
||||||
# The EXCLUDE tag can be used to specify files and/or directories that should be
|
# The EXCLUDE tag can be used to specify files and/or directories that should be
|
||||||
# excluded from the INPUT source files. This way you can easily exclude a
|
# excluded from the INPUT source files. This way you can easily exclude a
|
||||||
|
|||||||
+39
-16
@@ -1,22 +1,23 @@
|
|||||||
// Created by loki on 6/3/19.
|
/**
|
||||||
|
* @file nvhttp.h
|
||||||
|
*/
|
||||||
|
|
||||||
|
// macros
|
||||||
#define BOOST_BIND_GLOBAL_PLACEHOLDERS
|
#define BOOST_BIND_GLOBAL_PLACEHOLDERS
|
||||||
|
|
||||||
#include "process.h"
|
// standard includes
|
||||||
|
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
|
|
||||||
|
// lib includes
|
||||||
|
#include <Simple-Web-Server/server_http.hpp>
|
||||||
|
#include <Simple-Web-Server/server_https.hpp>
|
||||||
|
#include <boost/asio/ssl/context.hpp>
|
||||||
|
#include <boost/asio/ssl/context_base.hpp>
|
||||||
#include <boost/property_tree/json_parser.hpp>
|
#include <boost/property_tree/json_parser.hpp>
|
||||||
#include <boost/property_tree/ptree.hpp>
|
#include <boost/property_tree/ptree.hpp>
|
||||||
#include <boost/property_tree/xml_parser.hpp>
|
#include <boost/property_tree/xml_parser.hpp>
|
||||||
|
|
||||||
#include <boost/asio/ssl/context.hpp>
|
// local includes
|
||||||
|
|
||||||
#include <Simple-Web-Server/server_http.hpp>
|
|
||||||
#include <Simple-Web-Server/server_https.hpp>
|
|
||||||
#include <boost/asio/ssl/context_base.hpp>
|
|
||||||
|
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "crypto.h"
|
#include "crypto.h"
|
||||||
#include "httpcommon.h"
|
#include "httpcommon.h"
|
||||||
@@ -24,6 +25,7 @@
|
|||||||
#include "network.h"
|
#include "network.h"
|
||||||
#include "nvhttp.h"
|
#include "nvhttp.h"
|
||||||
#include "platform/common.h"
|
#include "platform/common.h"
|
||||||
|
#include "process.h"
|
||||||
#include "rtsp.h"
|
#include "rtsp.h"
|
||||||
#include "utility.h"
|
#include "utility.h"
|
||||||
#include "uuid.h"
|
#include "uuid.h"
|
||||||
@@ -31,10 +33,6 @@
|
|||||||
using namespace std::literals;
|
using namespace std::literals;
|
||||||
namespace nvhttp {
|
namespace nvhttp {
|
||||||
|
|
||||||
// The negative 4th version number tells Moonlight that this is Sunshine
|
|
||||||
constexpr auto VERSION = "7.1.431.-1";
|
|
||||||
constexpr auto GFE_VERSION = "3.23.0.74";
|
|
||||||
|
|
||||||
namespace fs = std::filesystem;
|
namespace fs = std::filesystem;
|
||||||
namespace pt = boost::property_tree;
|
namespace pt = boost::property_tree;
|
||||||
|
|
||||||
@@ -512,6 +510,16 @@ void pair(std::shared_ptr<safe::queue_t<crypto::x509_t>> &add_cert, std::shared_
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Compare the user supplied pin to the Moonlight pin.
|
||||||
|
* @param pin The user supplied pin.
|
||||||
|
* @return `true` if the pin is correct, `false` otherwise.
|
||||||
|
*
|
||||||
|
* EXAMPLES:
|
||||||
|
* ```cpp
|
||||||
|
* bool pin_status = nvhttp::pin("1234");
|
||||||
|
* ```
|
||||||
|
*/
|
||||||
bool pin(std::string pin) {
|
bool pin(std::string pin) {
|
||||||
pt::ptree tree;
|
pt::ptree tree;
|
||||||
if(map_id_sess.empty()) {
|
if(map_id_sess.empty()) {
|
||||||
@@ -845,6 +853,14 @@ void appasset(resp_https_t response, req_https_t request) {
|
|||||||
response->close_connection_after_response = true;
|
response->close_connection_after_response = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Start the nvhttp server.
|
||||||
|
*
|
||||||
|
* EXAMPLES:
|
||||||
|
* ```cpp
|
||||||
|
* nvhttp::start();
|
||||||
|
* ```
|
||||||
|
*/
|
||||||
void start() {
|
void start() {
|
||||||
auto shutdown_event = mail::man->event<bool>(mail::shutdown);
|
auto shutdown_event = mail::man->event<bool>(mail::shutdown);
|
||||||
|
|
||||||
@@ -892,8 +908,7 @@ void start() {
|
|||||||
|
|
||||||
X509_NAME_oneline(X509_get_subject_name(x509), subject_name, sizeof(subject_name));
|
X509_NAME_oneline(X509_get_subject_name(x509), subject_name, sizeof(subject_name));
|
||||||
|
|
||||||
|
BOOST_LOG(debug) << subject_name << " -- "sv << (verified ? "verified"sv : "denied"sv);
|
||||||
BOOST_LOG(info) << subject_name << " -- "sv << (verified ? "verified"sv : "denied"sv);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
while(add_cert->peek()) {
|
while(add_cert->peek()) {
|
||||||
@@ -984,6 +999,14 @@ void start() {
|
|||||||
tcp.join();
|
tcp.join();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Remove all paired clients.
|
||||||
|
*
|
||||||
|
* EXAMPLES:
|
||||||
|
* ```cpp
|
||||||
|
* nvhttp::erase_all_clients();
|
||||||
|
* ```
|
||||||
|
*/
|
||||||
void erase_all_clients() {
|
void erase_all_clients() {
|
||||||
map_id_client.clear();
|
map_id_client.clear();
|
||||||
save_state();
|
save_state();
|
||||||
|
|||||||
+31
-2
@@ -1,15 +1,44 @@
|
|||||||
// Created by loki on 6/3/19.
|
/**
|
||||||
|
* @file nvhttp.h
|
||||||
|
*/
|
||||||
|
|
||||||
|
// macros
|
||||||
#ifndef SUNSHINE_NVHTTP_H
|
#ifndef SUNSHINE_NVHTTP_H
|
||||||
#define SUNSHINE_NVHTTP_H
|
#define SUNSHINE_NVHTTP_H
|
||||||
|
|
||||||
#include "thread_safe.h"
|
// standard includes
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
// local includes
|
||||||
|
#include "thread_safe.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief This namespace contains all the functions and variables related to the nvhttp (GameStream) server.
|
||||||
|
*/
|
||||||
namespace nvhttp {
|
namespace nvhttp {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief The protocol version.
|
||||||
|
*/
|
||||||
|
constexpr auto VERSION = "7.1.431.-1";
|
||||||
|
// The negative 4th version number tells Moonlight that this is Sunshine
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief The GFE version we are replicating.
|
||||||
|
*/
|
||||||
|
constexpr auto GFE_VERSION = "3.23.0.74";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief The HTTP port, as a difference from the config port.
|
||||||
|
*/
|
||||||
constexpr auto PORT_HTTP = 0;
|
constexpr auto PORT_HTTP = 0;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief The HTTPS port, as a difference from the config port.
|
||||||
|
*/
|
||||||
constexpr auto PORT_HTTPS = -5;
|
constexpr auto PORT_HTTPS = -5;
|
||||||
|
|
||||||
|
// functions
|
||||||
void start();
|
void start();
|
||||||
bool pin(std::string pin);
|
bool pin(std::string pin);
|
||||||
void erase_all_clients();
|
void erase_all_clients();
|
||||||
|
|||||||
Reference in New Issue
Block a user