Update copyrights to 2021, using "make update-copyright"
[tor.git] / src / feature / hs / hs_config.h
blobb250c62c8b600acd4fafa224b28f72a7ab0f2f4d
1 /* Copyright (c) 2016-2021, The Tor Project, Inc. */
2 /* See LICENSE for licensing information */
4 /**
5 * \file hs_config.h
6 * \brief Header file containing configuration ABI/API for the HS subsystem.
7 **/
9 #ifndef TOR_HS_CONFIG_H
10 #define TOR_HS_CONFIG_H
12 #include "core/or/or.h"
14 /* Max value for HiddenServiceMaxStreams */
15 #define HS_CONFIG_MAX_STREAMS_PER_RDV_CIRCUIT 65535
16 /* Maximum number of intro points per version 3 services. */
17 #define HS_CONFIG_V3_MAX_INTRO_POINTS 20
18 /* Default value for the introduction DoS defenses. The MIN/MAX are inclusive
19 * meaning they can be used as valid values. */
20 #define HS_CONFIG_V3_DOS_DEFENSE_DEFAULT 0
21 #define HS_CONFIG_V3_DOS_DEFENSE_RATE_PER_SEC_DEFAULT 25
22 #define HS_CONFIG_V3_DOS_DEFENSE_RATE_PER_SEC_MIN 0
23 #define HS_CONFIG_V3_DOS_DEFENSE_RATE_PER_SEC_MAX INT32_MAX
24 #define HS_CONFIG_V3_DOS_DEFENSE_BURST_PER_SEC_DEFAULT 200
25 #define HS_CONFIG_V3_DOS_DEFENSE_BURST_PER_SEC_MIN 0
26 #define HS_CONFIG_V3_DOS_DEFENSE_BURST_PER_SEC_MAX INT32_MAX
28 /* API */
30 int hs_config_service_all(const or_options_t *options, int validate_only);
31 int hs_config_client_auth_all(const or_options_t *options, int validate_only);
33 void hs_config_free_all(void);
35 #endif /* !defined(TOR_HS_CONFIG_H) */