#include "quiche/quic/masque/masque_server_backend.h"
#include <cstdint>
#include <cstring>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "absl/strings/escaping.h"
#include "absl/strings/str_split.h"
#include "absl/strings/string_view.h"
#include "openssl/curve25519.h"
#include "quiche/quic/core/quic_connection_id.h"
#include "quiche/quic/masque/masque_utils.h"
#include "quiche/quic/platform/api/quic_bug_tracker.h"
#include "quiche/quic/platform/api/quic_ip_address.h"
#include "quiche/quic/platform/api/quic_logging.h"
#include "quiche/quic/tools/quic_backend_response.h"
#include "quiche/quic/tools/quic_memory_cache_backend.h"
#include "quiche/quic/tools/quic_simple_server_backend.h"
#include "quiche/common/http/http_header_block.h"
#include "quiche/common/quiche_text_utils.h"
namespace quic {
MasqueServerBackend::MasqueServerBackend(MasqueMode ,
const std::string& server_authority,
const std::string& cache_directory)
: … { … }
bool MasqueServerBackend::MaybeHandleMasqueRequest(
const quiche::HttpHeaderBlock& request_headers,
QuicSimpleServerBackend::RequestHandler* request_handler) { … }
void MasqueServerBackend::FetchResponseFromBackend(
const quiche::HttpHeaderBlock& request_headers,
const std::string& request_body,
QuicSimpleServerBackend::RequestHandler* request_handler) { … }
void MasqueServerBackend::HandleConnectHeaders(
const quiche::HttpHeaderBlock& request_headers,
RequestHandler* request_handler) { … }
void MasqueServerBackend::CloseBackendResponseStream(
QuicSimpleServerBackend::RequestHandler* request_handler) { … }
void MasqueServerBackend::RegisterBackendClient(QuicConnectionId connection_id,
BackendClient* backend_client) { … }
void MasqueServerBackend::RemoveBackendClient(QuicConnectionId connection_id) { … }
QuicIpAddress MasqueServerBackend::GetNextClientIpAddress() { … }
void MasqueServerBackend::SetConcealedAuth(absl::string_view concealed_auth) { … }
bool MasqueServerBackend::GetConcealedAuthKeyForId(
absl::string_view key_id,
uint8_t out_public_key[ED25519_PUBLIC_KEY_LEN]) const { … }
}