hs_config.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. /* Copyright (c) 2016-2019, The Tor Project, Inc. */
  2. /* See LICENSE for licensing information */
  3. /**
  4. * \file hs_config.h
  5. * \brief Header file containing configuration ABI/API for the HS subsytem.
  6. **/
  7. #ifndef TOR_HS_CONFIG_H
  8. #define TOR_HS_CONFIG_H
  9. #include "core/or/or.h"
  10. /* Max value for HiddenServiceMaxStreams */
  11. #define HS_CONFIG_MAX_STREAMS_PER_RDV_CIRCUIT 65535
  12. /* Maximum number of intro points per version 3 services. */
  13. #define HS_CONFIG_V3_MAX_INTRO_POINTS 20
  14. /* Default value for the introduction DoS defenses. The MIN/MAX are inclusive
  15. * meaning they can be used as valid values. */
  16. #define HS_CONFIG_V3_DOS_DEFENSE_DEFAULT 0
  17. #define HS_CONFIG_V3_DOS_DEFENSE_RATE_PER_SEC_DEFAULT 25
  18. #define HS_CONFIG_V3_DOS_DEFENSE_RATE_PER_SEC_MIN 0
  19. #define HS_CONFIG_V3_DOS_DEFENSE_RATE_PER_SEC_MAX INT32_MAX
  20. #define HS_CONFIG_V3_DOS_DEFENSE_BURST_PER_SEC_DEFAULT 200
  21. #define HS_CONFIG_V3_DOS_DEFENSE_BURST_PER_SEC_MIN 0
  22. #define HS_CONFIG_V3_DOS_DEFENSE_BURST_PER_SEC_MAX INT32_MAX
  23. /* API */
  24. int hs_config_service_all(const or_options_t *options, int validate_only);
  25. int hs_config_client_auth_all(const or_options_t *options, int validate_only);
  26. #endif /* !defined(TOR_HS_CONFIG_H) */