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 
270  routerset_t *HSLayer2Nodes;
271 
274  routerset_t *HSLayer3Nodes;
275 
288  /* Makes hidden service clients and servers non-anonymous on this tor
289  * instance. Allows the non-anonymous HiddenServiceSingleHopMode. Enables
290  * non-anonymous behaviour in the hidden service protocol.
291  * Use rend_service_non_anonymous_mode_enabled() instead of using this option
292  * directly.
293  */
294  int HiddenServiceNonAnonymousMode;
295 
296  int ConnLimit;
319 
363  int MaxOnionQueueDelay; /*< DOCDOC */
368  uint64_t BandwidthRate;
370  uint64_t BandwidthBurst;
378  uint64_t PerConnBWRate;
379  uint64_t PerConnBWBurst;
380  int NumCPUs;
388  char *ContactInfo;
395  char *HTTPProxy;
397  uint16_t HTTPProxyPort;
400  char *HTTPSProxy;
402  uint16_t HTTPSProxyPort;
405  char *Socks4Proxy;
407  uint16_t Socks4ProxyPort;
409  char *Socks5Proxy;
411  uint16_t Socks5ProxyPort;
419 
424 
428 
432 
435 
456  struct smartlist_t *AuthDirBadExitCCs;
457  struct smartlist_t *AuthDirInvalidCCs;
458  struct smartlist_t *AuthDirRejectCCs;
471 
475 
478  uint64_t AccountingMax;
487  enum { ACCT_MAX, ACCT_SUM, ACCT_IN, ACCT_OUT } AccountingRule;
488 
493 
515 
518  char *SafeLogging;
520  /* Derived from SafeLogging */
521  enum {
522  SAFELOG_SCRUB_ALL, SAFELOG_SCRUB_RELAY, SAFELOG_SCRUB_NONE
523  } SafeLogging_;
524 
525  int Sandbox;
526  int SafeSocks;
530  int TestSocks;
536  char *AccelName;
537  char *AccelDir;
547 
554 
563 
566 
567  int DirCache;
606 
610 
617 
620 
623 
626 
629 
632 
640 
643 
648 
652 
671 
674 
683 
687 
690 
693 
697 
701 
705 
709 
713 
717 
722 
727 
731 
735 
739 
743 
753 
763 
773 
777 
781 
786 
790 
795 
800 
803 
806 
810  int TestingDirAuthVoteExitIsStrict;
811 
815  int TestingDirAuthVoteGuardIsStrict;
816 
820  int TestingDirAuthVoteHSDirIsStrict;
821 
824 
827 
832 
834  char *GeoIPFile;
835  char *GeoIPv6File;
836 
841 
845 
846  /* The main parameter for picking circuits within a connection.
847  *
848  * If this value is positive, when picking a cell to relay on a connection,
849  * we always relay from the circuit whose weighted cell count is lowest.
850  * Cells are weighted exponentially such that if one cell is sent
851  * 'CircuitPriorityHalflife' seconds before another, it counts for half as
852  * much.
853  *
854  * If this value is zero, we're disabling the cell-EWMA algorithm.
855  *
856  * If this value is negative, we're using the default approach
857  * according to either Tor or a parameter set in the consensus.
858  */
859  double CircuitPriorityHalflife;
860 
865 
869 
874 
875 #define MAX_MAX_CLIENT_CIRCUITS_PENDING 1024
876 
879 
883 
887 
914  double PathBiasNoticeRate;
915  double PathBiasWarnRate;
916  double PathBiasExtremeRate;
917  int PathBiasDropGuards;
918  int PathBiasScaleThreshold;
940  double PathBiasNoticeUseRate;
941  double PathBiasExtremeUseRate;
942  int PathBiasScaleUseThreshold;
945  int IPv6Exit;
949 
953 
956 
963 
970 
977 
981 
982  enum {
983  FORCE_PASSPHRASE_AUTO=0,
984  FORCE_PASSPHRASE_ON,
985  FORCE_PASSPHRASE_OFF
986  } keygen_force_passphrase;
987  int use_keygen_passphrase_fd;
988  int keygen_passphrase_fd;
989  int change_key_passphrase;
990  char *master_key_fname;
991 
994 
999 
1005 
1008 
1012 
1015  /* NOTE: remove this option someday. */
1017 
1020 
1025 
1028  int NoExec;
1029 
1035 
1038 
1042  /* An ordered list of scheduler_types mapped from Schedulers. */
1043  struct smartlist_t *SchedulerTypes_;
1044 
1047 
1052 
1070 
1078 
1081 
1086 
1091 
1095 };
1096 
1097 #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
enum or_options_t::@29 TransProxyType_parsed
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
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
enum or_options_t::@28 command
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 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
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