Tor 0.4.9.2-alpha-dev
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
hs_config.h
Go to the documentation of this file.
1/* Copyright (c) 2016-2021, The Tor Project, Inc. */
2/* See LICENSE for licensing information */
3
4/**
5 * \file hs_config.h
6 * \brief Header file containing configuration ABI/API for the HS subsystem.
7 **/
8
9#ifndef TOR_HS_CONFIG_H
10#define TOR_HS_CONFIG_H
11
12#include "core/or/or.h"
13
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
27
28/* Default values for the HS anti-DoS PoW defenses. */
29#define HS_CONFIG_V3_POW_DEFENSES_DEFAULT 0
30#define HS_CONFIG_V3_POW_QUEUE_RATE 250
31#define HS_CONFIG_V3_POW_QUEUE_BURST 2500
32
33/* API */
34
35int hs_config_service_all(const or_options_t *options, int validate_only);
36int hs_config_client_auth_all(const or_options_t *options, int validate_only);
37
38void hs_config_free_all(void);
39
40#endif /* !defined(TOR_HS_CONFIG_H) */
int hs_config_client_auth_all(const or_options_t *options, int validate_only)
Definition: hs_config.c:710
void hs_config_free_all(void)
Definition: hs_config.c:729
int hs_config_service_all(const or_options_t *options, int validate_only)
Definition: hs_config.c:644
Master header file for Tor-specific functionality.