2020-01-08 18:39:17 -05:00
|
|
|
/* Copyright (c) 2016-2020, The Tor Project, Inc. */
|
2017-01-16 13:19:44 -05:00
|
|
|
/* 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
|
|
|
|
|
2018-07-05 16:34:59 -04:00
|
|
|
#include "core/or/or.h"
|
2017-01-16 13:19:44 -05:00
|
|
|
|
2017-01-13 16:00:07 -05:00
|
|
|
/* Max value for HiddenServiceMaxStreams */
|
|
|
|
#define HS_CONFIG_MAX_STREAMS_PER_RDV_CIRCUIT 65535
|
2017-05-10 09:37:41 -04:00
|
|
|
/* Maximum number of intro points per version 3 services. */
|
|
|
|
#define HS_CONFIG_V3_MAX_INTRO_POINTS 20
|
2019-08-20 09:38:13 -04:00
|
|
|
/* Default value for the introduction DoS defenses. The MIN/MAX are inclusive
|
|
|
|
* meaning they can be used as valid values. */
|
2019-06-25 10:26:57 -04:00
|
|
|
#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
|
2017-05-10 09:37:41 -04:00
|
|
|
|
2017-01-16 13:19:44 -05:00
|
|
|
/* API */
|
|
|
|
|
|
|
|
int hs_config_service_all(const or_options_t *options, int validate_only);
|
2018-08-19 08:22:13 +07:00
|
|
|
int hs_config_client_auth_all(const or_options_t *options, int validate_only);
|
2017-01-16 13:19:44 -05:00
|
|
|
|
2020-01-21 10:23:27 -05:00
|
|
|
void hs_config_free_all(void);
|
2017-01-16 13:19:44 -05:00
|
|
|
|
2020-01-21 10:23:27 -05:00
|
|
|
#endif /* !defined(TOR_HS_CONFIG_H) */
|