tor  0.4.2.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;
128  char *User;
140  enum {
141  TPT_DEFAULT,
142  TPT_PF_DIVERT,
143  TPT_IPFW,
144  TPT_TPROXY,
154 
161 
162  /* MaxMemInQueues value as input by the user. We clean this up to be
163  * MaxMemInQueues. */
164  uint64_t MaxMemInQueues_raw;
165  uint64_t MaxMemInQueues;
169 
183  unsigned int ORPort_set : 1;
184  unsigned int SocksPort_set : 1;
185  unsigned int TransPort_set : 1;
186  unsigned int NATDPort_set : 1;
187  unsigned int ControlPort_set : 1;
188  unsigned int DirPort_set : 1;
189  unsigned int DNSPort_set : 1;
190  unsigned int ExtORPort_set : 1;
191  unsigned int HTTPTunnelPort_set : 1;
207 
214 
226 
229 
237 
249 
254 
260 
280  routerset_t *HSLayer2Nodes;
281 
284  routerset_t *HSLayer3Nodes;
285 
298  /* Makes hidden service clients and servers non-anonymous on this tor
299  * instance. Allows the non-anonymous HiddenServiceSingleHopMode. Enables
300  * non-anonymous behaviour in the hidden service protocol.
301  * Use rend_service_non_anonymous_mode_enabled() instead of using this option
302  * directly.
303  */
304  int HiddenServiceNonAnonymousMode;
305 
306  int ConnLimit;
329 
373  int MaxOnionQueueDelay; /*< DOCDOC */
378  uint64_t BandwidthRate;
380  uint64_t BandwidthBurst;
388  uint64_t PerConnBWRate;
389  uint64_t PerConnBWBurst;
390  int NumCPUs;
398  char *ContactInfo;
405  char *HTTPProxy;
407  uint16_t HTTPProxyPort;
410  char *HTTPSProxy;
412  uint16_t HTTPSProxyPort;
415  char *Socks4Proxy;
417  uint16_t Socks4ProxyPort;
419  char *Socks5Proxy;
421  uint16_t Socks5ProxyPort;
429 
434 
438 
442 
445 
466  struct smartlist_t *AuthDirBadExitCCs;
467  struct smartlist_t *AuthDirInvalidCCs;
468  struct smartlist_t *AuthDirRejectCCs;
481 
485 
488  uint64_t AccountingMax;
497  enum { ACCT_MAX, ACCT_SUM, ACCT_IN, ACCT_OUT } AccountingRule;
498 
503 
525 
528  char *SafeLogging;
530  /* Derived from SafeLogging */
531  enum {
532  SAFELOG_SCRUB_ALL, SAFELOG_SCRUB_RELAY, SAFELOG_SCRUB_NONE
533  } SafeLogging_;
534 
535  int Sandbox;
536  int SafeSocks;
540  int TestSocks;
546  char *AccelName;
547  char *AccelDir;
557 
564 
573 
576 
577  int DirCache;
616 
620 
627 
630 
633 
636 
639 
642 
650 
653 
658 
662 
681 
684 
693 
697 
700 
703 
707 
711 
715 
719 
723 
727 
732 
737 
741 
745 
749 
753 
763 
773 
783 
787 
791 
796 
800 
805 
810 
813 
816 
820  int TestingDirAuthVoteExitIsStrict;
821 
825  int TestingDirAuthVoteGuardIsStrict;
826 
830  int TestingDirAuthVoteHSDirIsStrict;
831 
834 
837 
842 
844  char *GeoIPFile;
845  char *GeoIPv6File;
846 
851 
855 
856  /* The main parameter for picking circuits within a connection.
857  *
858  * If this value is positive, when picking a cell to relay on a connection,
859  * we always relay from the circuit whose weighted cell count is lowest.
860  * Cells are weighted exponentially such that if one cell is sent
861  * 'CircuitPriorityHalflife' seconds before another, it counts for half as
862  * much.
863  *
864  * If this value is zero, we're disabling the cell-EWMA algorithm.
865  *
866  * If this value is negative, we're using the default approach
867  * according to either Tor or a parameter set in the consensus.
868  */
869  double CircuitPriorityHalflife;
870 
875 
879 
884 
885 #define MAX_MAX_CLIENT_CIRCUITS_PENDING 1024
886 
889 
893 
897 
924  double PathBiasNoticeRate;
925  double PathBiasWarnRate;
926  double PathBiasExtremeRate;
927  int PathBiasDropGuards;
928  int PathBiasScaleThreshold;
950  double PathBiasNoticeUseRate;
951  double PathBiasExtremeUseRate;
952  int PathBiasScaleUseThreshold;
955  int IPv6Exit;
959 
963 
966 
973 
980 
987 
991 
992  enum {
993  FORCE_PASSPHRASE_AUTO=0,
994  FORCE_PASSPHRASE_ON,
995  FORCE_PASSPHRASE_OFF
996  } keygen_force_passphrase;
997  int use_keygen_passphrase_fd;
998  int keygen_passphrase_fd;
999  int change_key_passphrase;
1000  char *master_key_fname;
1001 
1004 
1009 
1015 
1018 
1022 
1025  /* NOTE: remove this option someday. */
1027 
1030 
1035 
1038  int NoExec;
1039 
1045 
1048 
1052  /* An ordered list of scheduler_types mapped from Schedulers. */
1053  struct smartlist_t *SchedulerTypes_;
1054 
1057 
1062 
1080 
1088 
1091 
1096 
1101 
1110 };
1111 
1112 #endif /* !defined(TOR_OR_OPTIONS_ST_H) */
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
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
int MinUptimeHidServDirectoryV2
int ConnDirectionStatistics
routerset_t * TestingDirAuthVoteExit
int ClientBootstrapConsensusMaxInProgressTries
char * DebugLogFile
Definition: or_options_st.h:52
enum or_options_t::@28 TransProxyType_parsed
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
enum or_options_t::@27 command
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