mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-27 16:45:53 +01:00
This patch doesn't actually use the results of the parsed object to create the service configuration: subsequent patches will do that. This patch just introduces the necessary configuration tables and starts using them to validate the configuration. As of this writing, this patch breaks tests. I'll likely fix that in a rebase later on: the current error messages for failures to parse options are a regression, so I've opened #33640 for that.
35 lines
1.2 KiB
C
35 lines
1.2 KiB
C
/* Copyright (c) 2016-2020, The Tor Project, Inc. */
|
|
/* See LICENSE for licensing information */
|
|
|
|
/**
|
|
* \file hs_config.h
|
|
* \brief Header file containing configuration ABI/API for the HS subsytem.
|
|
**/
|
|
|
|
#ifndef TOR_HS_CONFIG_H
|
|
#define TOR_HS_CONFIG_H
|
|
|
|
#include "core/or/or.h"
|
|
|
|
/* Max value for HiddenServiceMaxStreams */
|
|
#define HS_CONFIG_MAX_STREAMS_PER_RDV_CIRCUIT 65535
|
|
/* Maximum number of intro points per version 3 services. */
|
|
#define HS_CONFIG_V3_MAX_INTRO_POINTS 20
|
|
/* Default value for the introduction DoS defenses. The MIN/MAX are inclusive
|
|
* meaning they can be used as valid values. */
|
|
#define HS_CONFIG_V3_DOS_DEFENSE_DEFAULT 0
|
|
#define HS_CONFIG_V3_DOS_DEFENSE_RATE_PER_SEC_DEFAULT 25
|
|
#define HS_CONFIG_V3_DOS_DEFENSE_RATE_PER_SEC_MIN 0
|
|
#define HS_CONFIG_V3_DOS_DEFENSE_RATE_PER_SEC_MAX INT32_MAX
|
|
#define HS_CONFIG_V3_DOS_DEFENSE_BURST_PER_SEC_DEFAULT 200
|
|
#define HS_CONFIG_V3_DOS_DEFENSE_BURST_PER_SEC_MIN 0
|
|
#define HS_CONFIG_V3_DOS_DEFENSE_BURST_PER_SEC_MAX INT32_MAX
|
|
|
|
/* API */
|
|
|
|
int hs_config_service_all(const or_options_t *options, int validate_only);
|
|
int hs_config_client_auth_all(const or_options_t *options, int validate_only);
|
|
|
|
void hs_config_free_all(void);
|
|
|
|
#endif /* !defined(TOR_HS_CONFIG_H) */
|