tor  0.4.1.0-alpha-dev
or_options_st.h
Go to the documentation of this file.
1 /* Copyright (c) 2001 Matej Pfajfar.
2  * Copyright (c) 2001-2004, Roger Dingledine.
3  * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
4  * Copyright (c) 2007-2019, The Tor Project, Inc. */
5 /* See LICENSE for licensing information */
6 
13 #ifndef TOR_OR_OPTIONS_ST_H
14 #define TOR_OR_OPTIONS_ST_H
15 
16 #include "lib/cc/torint.h"
17 #include "lib/net/address.h"
18 
19 struct smartlist_t;
20 struct config_line_t;
21 
24 typedef enum {OUTBOUND_ADDR_EXIT, OUTBOUND_ADDR_OR,
25  OUTBOUND_ADDR_EXIT_AND_OR,
26  OUTBOUND_ADDR_MAX} outbound_addr_t;
27 
29 struct or_options_t {
30  uint32_t magic_;
31 
33  enum {
34  CMD_RUN_TOR=0, CMD_LIST_FINGERPRINT, CMD_HASH_PASSWORD,
35  CMD_VERIFY_CONFIG, CMD_RUN_UNITTESTS, CMD_DUMP_CONFIG,
36  CMD_KEYGEN,
37  CMD_KEY_EXPIRATION,
38  } command;
39  char *command_arg;
41  struct config_line_t *Logs;
52  char *DebugLogFile;
55  char *DataDirectory;
60  char *KeyDirectory;
68  char *Nickname;
69  char *Address;
70  char *PidFile;
72  routerset_t *ExitNodes;
75  routerset_t *MiddleNodes;
78  routerset_t *EntryNodes;
84  routerset_t *ExcludeNodes;
88  routerset_t *ExcludeExitNodes;
93  routerset_t *ExcludeExitNodesUnion_;
94 
118  tor_addr_t OutboundBindAddresses[OUTBOUND_ADDR_MAX][2];
122  struct config_line_t *RecommendedClientVersions;
123  struct config_line_t *RecommendedServerVersions;
124  struct config_line_t *RecommendedPackages;
129  char *User;
141  enum {
142  TPT_DEFAULT,
143  TPT_PF_DIVERT,
144  TPT_IPFW,
145  TPT_TPROXY,
155 
162 
163  /* MaxMemInQueues value as input by the user. We clean this up to be
164  * MaxMemInQueues. */
165  uint64_t MaxMemInQueues_raw;
166  uint64_t MaxMemInQueues;
170 
184  unsigned int ORPort_set : 1;
185  unsigned int SocksPort_set : 1;
186  unsigned int TransPort_set : 1;
187  unsigned int NATDPort_set : 1;
188  unsigned int ControlPort_set : 1;
189  unsigned int DirPort_set : 1;
190  unsigned int DNSPort_set : 1;
191  unsigned int ExtORPort_set : 1;
192  unsigned int HTTPTunnelPort_set : 1;
208 
215 
227 
230 
238 
250 
255 
261 
281  routerset_t *HSLayer2Nodes;
282 
285  routerset_t *HSLayer3Nodes;
286 
299  /* Makes hidden service clients and servers non-anonymous on this tor
300  * instance. Allows the non-anonymous HiddenServiceSingleHopMode. Enables
301  * non-anonymous behaviour in the hidden service protocol.
302  * Use rend_service_non_anonymous_mode_enabled() instead of using this option
303  * directly.
304  */
305  int HiddenServiceNonAnonymousMode;
306 
307  int ConnLimit;
330 
374  int MaxOnionQueueDelay; /*< DOCDOC */
379  uint64_t BandwidthRate;
381  uint64_t BandwidthBurst;
389  uint64_t PerConnBWRate;
390  uint64_t PerConnBWBurst;
391  int NumCPUs;
399  char *ContactInfo;
406  char *HTTPProxy;
408  uint16_t HTTPProxyPort;
411  char *HTTPSProxy;
413  uint16_t HTTPSProxyPort;
416  char *Socks4Proxy;
418  uint16_t Socks4ProxyPort;
420  char *Socks5Proxy;
422  uint16_t Socks5ProxyPort;
430 
435 
439 
443 
446 
467  struct smartlist_t *AuthDirBadExitCCs;
468  struct smartlist_t *AuthDirInvalidCCs;
469  struct smartlist_t *AuthDirRejectCCs;
482 
486 
489  uint64_t AccountingMax;
498  enum { ACCT_MAX, ACCT_SUM, ACCT_IN, ACCT_OUT } AccountingRule;
499 
504 
526 
529  char *SafeLogging;
531  /* Derived from SafeLogging */
532  enum {
533  SAFELOG_SCRUB_ALL, SAFELOG_SCRUB_RELAY, SAFELOG_SCRUB_NONE
534  } SafeLogging_;
535 
536  int Sandbox;
537  int SafeSocks;
541  int TestSocks;
547  char *AccelName;
548  char *AccelDir;
558 
565 
574 
577 
578  int DirCache;
617 
621 
628 
631 
634 
637 
640 
643 
651 
654 
659 
663 
682 
685 
694 
698 
701 
704 
708 
712 
716 
720 
724 
728 
733 
738 
742 
746 
750 
754 
764 
774 
784 
788 
792 
797 
801 
806 
811 
814 
817 
821  int TestingDirAuthVoteExitIsStrict;
822 
826  int TestingDirAuthVoteGuardIsStrict;
827 
831  int TestingDirAuthVoteHSDirIsStrict;
832 
835 
838 
843 
845  char *GeoIPFile;
846  char *GeoIPv6File;
847 
852 
856 
857  /* The main parameter for picking circuits within a connection.
858  *
859  * If this value is positive, when picking a cell to relay on a connection,
860  * we always relay from the circuit whose weighted cell count is lowest.
861  * Cells are weighted exponentially such that if one cell is sent
862  * 'CircuitPriorityHalflife' seconds before another, it counts for half as
863  * much.
864  *
865  * If this value is zero, we're disabling the cell-EWMA algorithm.
866  *
867  * If this value is negative, we're using the default approach
868  * according to either Tor or a parameter set in the consensus.
869  */
870  double CircuitPriorityHalflife;
871 
876 
880 
885 
886 #define MAX_MAX_CLIENT_CIRCUITS_PENDING 1024
887 
890 
894 
898 
925  double PathBiasNoticeRate;
926  double PathBiasWarnRate;
927  double PathBiasExtremeRate;
928  int PathBiasDropGuards;
929  int PathBiasScaleThreshold;
951  double PathBiasNoticeUseRate;
952  double PathBiasExtremeUseRate;
953  int PathBiasScaleUseThreshold;
956  int IPv6Exit;
960 
964 
967 
974 
981 
988 
992 
993  enum {
994  FORCE_PASSPHRASE_AUTO=0,
995  FORCE_PASSPHRASE_ON,
996  FORCE_PASSPHRASE_OFF
997  } keygen_force_passphrase;
998  int use_keygen_passphrase_fd;
999  int keygen_passphrase_fd;
1000  int change_key_passphrase;
1001  char *master_key_fname;
1002 
1005 
1010 
1016 
1019 
1023 
1026  /* NOTE: remove this option someday. */
1028 
1031 
1036 
1039  int NoExec;
1040 
1046 
1049 
1053  /* An ordered list of scheduler_types mapped from Schedulers. */
1054  struct smartlist_t *SchedulerTypes_;
1055 
1058 
1063 
1081 
1089 
1092 
1097 
1102 
1111 };
1112 
1113 #endif
uint16_t HTTPProxyPort
char * OwningControllerProcess
int ShutdownWaitLength
int V3AuthoritativeDir
int ServerDNSSearchDomains
tor_addr_t OutboundBindAddresses[OUTBOUND_ADDR_MAX][2]
char * AccelName
int ClientAutoIPv6ORPort
struct config_line_t * HTTPTunnelPort_lines
int DoSCircuitCreationEnabled
int DirAllowPrivateAddresses
int ControlSocketsGroupWritable
int ClientBootstrapConsensusFallbackDownloadInitialDelay
char * PidFile
Definition: or_options_st.h:70
uint64_t AccountingMax
int ExitPolicyRejectLocalInterfaces
int MaxConsensusAgeForDiffs
struct config_line_t * Logs
Definition: or_options_st.h:41
int TestingLinkCertLifetime
int NumDirectoryGuards
int CookieAuthFileGroupReadable
int ClientPreferIPv6ORPort
uint64_t RelayBandwidthBurst
int ExitPortStatistics
struct smartlist_t * LongLivedPorts
int DoSCircuitCreationDefenseType
int TestingClientMaxIntervalWithoutRequest
enum or_options_t::@30 TransProxyType_parsed
int CountPrivateBandwidth
char * V3BandwidthsFile
int UseDefaultFallbackDirs
char * CookieAuthFile
int TestingAuthKeyLifetime
int MaxCircuitDirtiness
routerset_t * EntryNodes
Definition: or_options_st.h:78
int CacheDirectoryGroupReadable
Definition: or_options_st.h:66
int ServerDNSDetectHijacking
uint64_t PerConnBWBurst
uint64_t AuthDirGuardBWGuarantee
int UsingTestNetworkDefaults_
char * DataDirectory
Definition: or_options_st.h:55
char * DirPortFrontPage
struct config_line_t * OutboundBindAddressExit
struct config_line_t * NATDPort_lines
uint64_t BandwidthRate
tor_addr_t HTTPSProxyAddr
int VersioningAuthoritativeDir
int AutomapHostsOnResolve
int DisablePredictedCircuits
struct config_line_t * ExtORPort_lines
struct smartlist_t * WarnPlaintextPorts
int AuthDirTestEd25519LinkKeys
int ServerDNSAllowBrokenConfig
int TestingEnableCellStatsEvent
char * VirtualAddrNetworkIPv4
uint64_t ConstrainedSockSize
int DormantTimeoutDisabledByIdleStreams
struct smartlist_t * NodeFamilySets
int AuthDirListBadExits
char * SyslogIdentityTag
Definition: or_options_st.h:49
struct config_line_t * DNSPort_lines
routerset_t * TestingDirAuthVoteGuard
struct config_line_t * DirPort_lines
char * Socks5ProxyUsername
int ReloadTorrcOnSIGHUP
int HiddenServiceStatistics
int UseEntryGuards_option
char * CacheDirectory_option
Definition: or_options_st.h:63
struct config_line_t * ServerTransportOptions
char * KeyDirectory
Definition: or_options_st.h:60
char * HTTPSProxy
int DoSCircuitCreationDefenseTimePeriod
uint64_t MaxUnparseableDescSizeToLog
int GeoIPExcludeUnknown
int UseMicrodescriptors
char * Socks5ProxyPassword
int FetchHidServDescriptors
int TestingSigningKeySlop
char * AccountingRule_option
int PathBiasCircThreshold
struct config_line_t * AuthDirReject
struct config_line_t * MyFamily
int ServerDNSAllowNonRFC953Hostnames
char * SafeLogging
struct config_line_t * OutboundBindAddress
int AuthDirMaxServersPerAddr
dirinfo_type_t
Definition: or.h:887
Integer definitions used throughout Tor.
int MaxClientCircuitsPending
int CircuitsAvailableTimeout
int LogMessageDomains
Definition: or_options_st.h:45
uint64_t MaxMemInQueues_low_threshold
struct smartlist_t * TrackHostExits
char * AndroidIdentityTag
Definition: or_options_st.h:50
int DirReqStatistics_option
int CircuitBuildTimeout
int TestingV3AuthInitialDistDelay
int CircuitStreamTimeout
struct smartlist_t * FirewallPorts
int FetchServerDescriptors
routerset_t * ExcludeExitNodes
Definition: or_options_st.h:88
int TokenBucketRefillInterval
char * HTTPProxyAuthenticator
char * DataDirectory_option
Definition: or_options_st.h:53
struct config_line_t * RecommendedVersions
char * ServerDNSResolvConfFile
int ExitPolicyRejectPrivate
Definition: or_options_st.h:99
int V3AuthNIntervalsValid
struct config_line_t * AlternateBridgeAuthority
char * ContactInfo
struct smartlist_t * PublishServerDescriptor
int TestingAuthDirTimeToLearnReachability
char * Socks5Proxy
int AllowNonRFC953Hostnames
uint16_t HTTPSProxyPort
uint64_t PerConnBWRate
struct config_line_t * ClientTransportPlugin
int ExtendAllowPrivateAddresses
int TestingEstimatedDescriptorPropagationTime
routerset_t * ExitNodes
Definition: or_options_st.h:72
uint16_t Socks4ProxyPort
int PublishHidServDescriptors
int DoSRefuseSingleHopClientRendezvous
int ClientRejectInternalAddresses
int TestingAuthKeySlop
int TestingDirConnectionMaxStall
routerset_t * ExcludeNodes
Definition: or_options_st.h:84
struct config_line_t * ControlPort_lines
struct smartlist_t * AutomapHostsSuffixes
int ConnLimit_low_thresh
struct config_line_t * HashedControlSessionPassword
struct config_line_t * OutboundBindAddressOR
int TestingEnableConnBwEvent
int TestingLinkKeySlop
char * AccountingStart
double KISTSockBufSizeFactor
uint64_t AuthDirFastGuarantee
int UpdateBridgesFromAuthority
Headers for address.h.
int V3AuthVotingInterval
char * Nickname
Definition: or_options_st.h:68
int PathBiasUseThreshold
int RefuseUnknownExits
int DoSCircuitCreationMinConnections
struct config_line_t * ExitPolicy
Definition: or_options_st.h:98
int KeyDirectoryGroupReadable
Definition: or_options_st.h:61
char * KeyDirectory_option
Definition: or_options_st.h:58
struct smartlist_t * FilesOpenedByIncludes
struct config_line_t * ReachableORAddresses
double DirAuthorityFallbackRate
char * ControlPortWriteToFile
int UnixSocksGroupWritable
char * HTTPSProxyAuthenticator
int DoSCircuitCreationBurst
int V3AuthUseLegacyKey
int ReducedConnectionPadding
char * VirtualAddrNetworkIPv6
char * ClientOnionAuthDir
struct config_line_t * FallbackDir
uint64_t MaxAdvertisedBandwidth
int ClientBootstrapConsensusAuthorityDownloadInitialDelay
int ReducedCircuitPadding
enum or_options_t::@29 command
int MinUptimeHidServDirectoryV2
int ConnDirectionStatistics
routerset_t * TestingDirAuthVoteExit
int ClientBootstrapConsensusMaxInProgressTries
char * DebugLogFile
Definition: or_options_st.h:52
int ExtORPortCookieAuthFileGroupReadable
tor_addr_t Socks5ProxyAddr
routerset_t * HSLayer2Nodes
int ControlPortFileGroupReadable
int BridgeAuthoritativeDir
uint64_t TestingMinFastFlagThreshold
int TestingServerConsensusDownloadInitialDelay
int KeepBindCapabilities
int KISTSchedRunInterval
char * TransProxyType
struct config_line_t * DirPolicy
double PathsNeededToBuildCircuits
struct config_line_t * SocksPort_lines
struct config_line_t * ControlSocket
int FetchUselessDescriptors
struct config_line_t * HashedControlPassword
struct config_line_t * TransPort_lines
int ConnLimit_high_thresh
int BridgeRecordUsageByCountry
int DataDirectoryGroupReadable
Definition: or_options_st.h:56
int HiddenServiceSingleHopMode
struct config_line_t * AuthDirInvalid
struct config_line_t * DirAuthorities
int TrackHostExitsExpire
routerset_t * HSLayer3Nodes
routerset_t * ExcludeExitNodesUnion_
Definition: or_options_st.h:93
char * Socks4Proxy
int ClientPreferIPv6DirPort
int HiddenServiceStatistics_option
int TestingBridgeDownloadInitialDelay
struct config_line_t * ReachableDirAddresses
char * BridgePassword_AuthDigest_
struct config_line_t * RendConfigLines
struct smartlist_t * ServerDNSTestAddresses
struct smartlist_t * Schedulers
struct config_line_t * ORPort_lines
uint64_t BandwidthBurst
char * command_arg
Definition: or_options_st.h:39
int TestingBridgeBootstrapDownloadInitialDelay
struct config_line_t * MyFamily_lines
struct config_line_t * ServerTransportListenAddr
int AuthDirSharedRandomness
int DoSConnectionMaxConcurrentCount
struct config_line_t * ReachableAddresses
int DoSConnectionDefenseType
int DoSCircuitCreationRate
int LeaveStreamsUnattached
int LearnCircuitBuildTimeout
int EnforceDistinctSubnets
struct config_line_t * AuthDirBadExit
uint64_t OwningControllerFD
uint16_t Socks5ProxyPort
dirinfo_type_t PublishServerDescriptor_
outbound_addr_t
Definition: or_options_st.h:24
char * GeoIPFile
struct config_line_t * AlternateDirAuthority
int DisableSignalHandlers
struct config_line_t * HidServAuth
int MinMeasuredBWsForAuthToIgnoreAdvertised
int TestingV3AuthInitialVoteDelay
int TestingClientConsensusDownloadInitialDelay
struct config_line_t * Bridges
int DormantOnFirstStartup
struct smartlist_t * RejectPlaintextPorts
int DoSConnectionEnabled
tor_addr_t HTTPProxyAddr
routerset_t * MiddleNodes
Definition: or_options_st.h:75
int ClientDNSRejectInternalAddresses
struct config_line_t * ServerTransportPlugin
int SigningKeyLifetime
routerset_t * TestingDirAuthVoteHSDir
int TestingClientDownloadInitialDelay
int AllDirActionsPrivate
struct config_line_t * NodeFamilies
int ServerDNSRandomizeCase
char * HTTPProxy
char * Address
Definition: or_options_st.h:69
char * CacheDirectory
Definition: or_options_st.h:65
char * GuardfractionFile
int ConstrainedSockets
char * BridgeDistribution
char * BridgePassword
uint64_t RelayBandwidthRate
int ExtraInfoStatistics
int TestingV3AuthVotingStartOffset
int CookieAuthentication
int TestingServerDownloadInitialDelay
struct config_line_t * AddressMap
int DormantCanceledByStartup
char * ConsensusParams
int AuthDirHasIPv6Connectivity
int DormantClientTimeout
uint64_t TestingMinExitFlagThreshold
int FetchDirInfoExtraEarly
int LogTimeGranularity
Definition: or_options_st.h:43
tor_addr_t Socks4ProxyAddr
char * ExtORPortCookieAuthFile
uint64_t MaxMemInQueues
int ClientBootstrapConsensusAuthorityOnlyDownloadInitialDelay
int DisableDebuggerAttachment
struct config_line_t * SocksPolicy
int TestingV3AuthInitialVotingInterval