Tor源碼分析 -- 附錄 Tor Manual

TOR(1) Manual Page Analysis


NAME

tor - The second-generation onion router


SYNOPSIS

tor [OPTION value]…


DESCRIPTION

tor is a connection-oriented anonymizing communication service. Users choose a source-routed path through a set of nodes, and negotiate a "virtual circuit" through the network, in which each node knows its predecessor and successor, but no others. Traffic flowing down the circuit is unwrapped by a symmetric key at each node, which reveals the downstream node.

Basically tor provides a distributed network of servers ("onion routers"). Users bounce their TCP streams — web traffic, ftp, ssh, etc — around the routers, and recipients, observers, and even the routers themselves have difficulty tracking the source of the stream.


THE CONFIGURATION FILE FORMAT

By default, an option on the command line overrides an option found in the configuration file, and an option in a configuration file overrides one in the defaults file.
This rule is simple for options that take a single value, but it can become complicated for options that are allowed to occur more than once: if you specify four SOCKSPorts in your configuration file, and one more SOCKSPort on the command line, the option on the command line will replace all of the SOCKSPorts in the configuration file. If this isn’t what you want, prefix the option name with a plus sign, and it will be appended to the previous set of options instead.

Alternatively, you might want to remove every instance of an option in the configuration file, and not replace it at all: you might want to say on the command line that you want no SOCKSPorts at all. To do that, prefix the option name with a forward slash.


GENERAL OPTIONS

Log:

Log minSeverity[-maxSeverity] stderr|stdout|syslog
Log minSeverity[-maxSeverity] file FILENAME
Log [domain,…]minSeverity[-maxSeverity] … file FILENAME
Log [domain,…]minSeverity[-maxSeverity] … stderr|stdout|syslog
LogMessageDomains 0|1 (Default: 0)
severity : debug, info, notice, warn, and err.
domain : general, crypto, net, config, fs, protocol, mm, http, app, control, circ, rend, bug, dir, dirserv, or, edge, acct, hist, and handshake.
Tor有選擇性地輸出相關domain的不同severity的調試信息,並可選的加上對應子系統信息。

ProtocolWarnings 0|1 (Default: 0)
Tor在記錄日誌之時若設置了該選項,會將Warning報出,否則視爲Info。

LogTimeGranularity NUM (Default: 1 second)
Tor用於控制日誌文件的記錄時間粒度。

SafeLogging 0|1|relay (Default: 1)
Tor用於將日誌文件中的敏感信息屏蔽起來。

Proxy:

HTTPProxy host[:port]
HTTPProxyAuthenticator username:password
HTTPSProxy host[:port]
HTTPSProxyAuthenticator username:password
Socks4Proxy host[:port]
Socks5Proxy host[:port]
Socks5ProxyUsername username
Socks5ProxyPassword password
Tor目錄請求和連接建立的專用代理設置和認證方式,HTTP代理負責目錄請求,其他代理負責OR連接建立。

ClientTransportPlugin transport socks4|socks5 IP:PORT
ClientTransportPlugin transport exec path-to-binary [options]
If set, Tor Client使用傳輸代理來傳遞Tor Relay的信息。
第一種形式代理處於IP:PORT之上;第二種形式代理由執行path-to-binary啓動。

ServerTransportPlugin transport exec path-to-binary [options]
If set, Tor Relay使用傳輸代理來接收Tor Client的信息。


Bandwidth:

BandwidthRate N bytes|KB|MB|GB (Default: 5 MB)
BandwidthBurst N bytes|KB|MB|GB (Default: 10 MB)
Tor使用令牌桶機制來控制流入流出的一般速率和最大速率,token bucket。

MaxAdvertisedBandwidth N bytes|KB|MB|GB
If set, Tor Server對外公佈的帶寬上限。以此降低Server本身的CPU損耗。

RelayBandwidthRate N bytes|KB|MB|GB (Default: 0)
RelayBandwidthBurst N bytes|KB|MB|GB (Default: 0)
If not 0, Tor Relay使用令牌桶機制來進行流量控制,token bucket。

Control Port:

ControlPort PORT|auto (Default: 0)
ControlListenAddress IP[:PORT] (Default: 127.0.0.1)
ControlSocket Path (Unix and Unix-like systems only)
If set, Tor設定程序的控制IP及端口。

ControlSocketsGroupWritable 0|1 (Default: 0)
HashedControlPassword hashed_password
CookieAuthentication 0|1 (Default: 0)
CookieAuthFile Path
CookieAuthFileGroupReadable 0|1|Groupname (Default: 0)
If set, Tor進行控制端口的權限設定,包括組權限,密碼驗證及Cookie認證。

ControlPortWriteToFile Path
ControlPortFileGroupReadable 0|1 (Default: 0)
If set, Tor用於在自動選擇控制端口時將端口寫入文件,以便其他程序讀取,並進行控制。

Fecth Info:

FetchDirInfoEarly 0|1 (Default: 0)
FetchDirInfoExtraEarly 0|1 (Default: 0)
Tor比普通情況更早的獲取目錄信息。普通用戶不必改變該選項。

FetchHidServDescriptors 0|1 (Default: 1)
FetchServerDescriptors 0|1 (Default: 1)
FetchUselessDescriptors 0|1 (Default: 0)
Tor默認情況下獲取網絡相關描述符的設置。

Alternate:

AlternateDirAuthority [nickname] [flags] address:port fingerprint
AlternateHSAuthority [nickname] [flags] address:port fingerprint
AlternateBridgeAuthority [nickname] [flags] address:port fingerprint
If set, Tor使用這些選項值修改相應的默認值,包括目錄服務器,HS服務器,Bridge服務器。

Socket:

ConstrainedSockets 0|1 (Default: 0)
ConstrainedSockSize N bytes|KB
If set, Tor限制所有Socket所使用的Buffer大小爲一定的值。只在Buffer空間不足時使用。

Accelerate:

HardwareAccel 0|1 (Default: 0)
AccelName NAME
AccelDir DIR
Tor用到動態加速引擎等時用到的選項,一般不被設置。

Tunnel:

TunnelDirConns 0|1 (Default: 1)
PreferTunneledDirConns 0|1 (Default: 1)
If not 0, Tor會優先選擇支持Tunnel的目錄服務器,並通過其ORPort建立一步加密連接。

IOCP:

DisableIOCP 0|1 (Default: 1)
UserspaceIOCPBuffers 0|1 (Default: 0)
Tor用於告知Libevent不去使用Windows IOCP networking API。

Misce:

DirServer [nickname] [flags] address:port fingerprint
If set, Tor Server用於設定非標準目錄服務器,給定的flags是對選擇的目錄服務器的功能限定。一般該選項用於用戶設定自己的Tor網絡。這樣設定的用戶會和普通用戶區別開。

DisableNetwork 0|1 (Default: 0)
If set, Tor不監聽或接受任何除控制端口以外的端口信息,並且不創建任何連接。一般在Tor尚未被完全設置完成之前使用。

DataDirectory DIR (Default: /usr/local/var/lib/tor)
Tor用於存儲程序執行過程中生成的各種數據文件。
ConnLimit NUM (Default: 1000)
Tor要求系統提供的最少文件描述符數,即連接數。若系統無法提供,Tor則拒絕啓動。

DynamicDHGroups 0|1 (Default: 0)
If set, Tor使用自行定義的Diffie-Hellman羣,以便於繞開審查。

DisableAllSwap 0|1 (Default: 0)
If set, Tor不會允許Tor相關內存被頁被移出。

DisableDebuggerAttachment 0|1 (Default: 1)
Tor用於屏蔽外界調試器的調試。

KeepalivePeriod NUM (Default: 5 minutes)
Tor每隔5分鐘進行一次連接維護,保證有效連接的存在和無效連接的刪除。

OutboundBindAddress IP
Tor將主機的所有連接均從指定的IP發出。

PidFile FILE
Tor在程序運行時將程序進程ID記錄到文件FILE,在運行結束後刪除。

RunAsDaemon 0|1 (Default: 0)
If set, Tor作爲後臺程序在主機上運行。

User UID
Tor用於在程序啓動階段,設置用戶ID。

AvoidDiskWrites 0|1 (Default: 0)
Tor用於儘量減少對硬盤的讀寫,在存儲介質爲flash等時尤爲有用。

CircuitPriorityHalflife NUM1 (Default: not set)
Tor用於設置選擇路徑的算法,默認情況下爲默認算法。

_UseFilteringSSLBufferevents 0|1 (Default: 0)
Tor高級設置,用於調試和BUG尋找,一般不做改動。

CountPrivateBandwidth 0|1 (Default: 0)
Tor用於將自身的帶寬設置應用於本機的本地地址,例如127.0.0.1等。


CLIENT OPTIONS

The following options are useful only for clients (that is, if SocksPort, TransPort, DNSPort, or NATDPort is non-zero):

Node Selection:

ExcludeNodes node,node,…
ExcludeExitNodes node,node,…
ExitNodes node,node,…
EntryNodes node,node,…
StrictNodes 0|1 (Default: 0)
Tor Client在使用Tor網絡過程中的結點選擇參照表。

Bridge [transport] IP:ORPort [fingerprint]
Tor網絡中存在的非公開Relay結點,即Bridge結點。Tor Client根據本選項的設置,利用選定的Bridge結點作爲代理,代理其與Tor之間的通信。

AllowInvalidNodes entry|exit|middle|introduction|rendezvous|… (Default: middle,rendezvous)
Tor網絡中可能存在非有效的結點,此時目錄服務器會將其標記爲無效。Tor Client根據本選項的設定,限定無效結點在其選定的鏈路中能夠充當的身份。身份包括有:入口結點,出口結點,中間結點等。

ExcludeSingleHopRelays 0|1 (Default: 1)
Tor網絡中的某些結點允許AllowSingleHopExits,這是不安全的。Tor Client根據本選項的設定,限定其選定的鏈路中是否能包含有開啓AllowSingleHopExits 選項的Relay結點。一般情況下爲不包含,因爲這些結點對匿名性有一定的損害。

NodeFamily node,node,…
Tor Client會避免使用同一結點家族的結點建立一條鏈路。

EnforceDistinctSubnets 0|1 (Default: 1)
Tor Client會避免使用IP地址太過相近的兩個結點建立一條鏈路。

Bridge and EntryGuard:

UpdateBridgesFromAuthority 0|1 NUM (Default: 0)
UseBridges 0|1 (Default: 0)
Tor Client是否使用Bridge,是否在使用Bridge時索取其描述符。

UseEntryGuards 0|1 (Default: 1)
NumEntryGuards (Default: 3)
Tor Client是否使用EntryGuards機制(固定入口結點),該機制防止敵手成功監聽流量的概率。


Socks:

SOCKSPort [address:]port|auto [isolation flags] (Default: 9050)SOCKSListenAddress IP[:PORT] (Default: 127.0.0.1)
SocksPolicy policy,policy,…
SocksTimeout NUM (Default: 2 minutes)
Tor Client指示Socks連接的地址和端口號,同時制定接收策略和超時控制。

SafeSocks 0|1 (Default: 0)
TestSocks 0|1 (Default: 0)
WarnUnsafeSocks 0|1 (Default: 1)
Tor Clinet用於指示是否使用安全Socks (參數正確,不需要進行DNS地址解析),是否在日誌文件內部記錄安全或非安全的Socks連接,並在接收到非安全Socks提出警告。

Circuit Restriction:

LearnCircuitBuildTimeout 0|1 (Default: 1)
CircuitBuildTimeout NUM (Default: 60 seconds)
CircuitIdleTimeout NUM (Default: 1 hour)
CircuitStreamTimeout NUM (Default: 0)
Tor Client用於鏈路超時控制。超時包括:建立鏈路超時,鏈路空閒超時,數據流超時。

CloseHSClientCircuitsImmediatelyOnTimeout 0|1 (Default: 0)
CloseHSServiceRendCircuitsImmediatelyOnTimeout 0|1 (Default: 0)
Tor用於執行Hid Service相關的超時處理。

NewCircuitPeriod NUM (Default: 30 seconds)
Tor用於指示每隔NUM秒嘗試新建鏈路。

MaxCircuitDirtiness NUM (Default: 10 minutes)
Tor用於指示新建的連接與哪些較新的鏈路進行綁定。超過本選項時間的鏈路已經老化。

MaxClientCircuitsPending NUM (Default: 32)
Tor用於指示同一時刻最多可以掛起的鏈路數。掛起的鏈路指開始建而未完成的鏈路。

Exit Restriction:

TrackHostExits host,.domain,…
TrackHostExitsExpire NUM (30 minutes)
Tor Client在長時間連接一臺遠端主機時,有可能由於出口IP地址不斷變化的原因而被遠端主機log out,該選項使得Tor系統固定遠端的出口結點,從而防止IP地址的不斷變化。

AllowDotExit 0|1 (Default: 0)
Tor默認情況下拒絕點操作的出口地址選擇。
Address Restrictions:
FascistFirewall 0|1
FirewallPorts PORTS (Default: 80, 443)
Tor Client指示本地防火牆是否工作,及工作時允許的數據流出端口號。

ReachableAddresses ADDR[/MASK][:PORT]… (Default: 'accept *:*')
ReachableDirAddresses ADDR[/MASK][:PORT]…
ReachableORAddresses ADDR[/MASK][:PORT]…
Tor Client指示本地連接允許的IP:PORT範圍。本地連接包括對外的Dir及OR連接。Dir連接的內容是普通的HTTP請求,OR連接的內容則是TLS/SSL請求。

MapAddress address newaddress
Tor用於實現內部地址映射,即將某些地址映射爲另外一些地址。

VirtualAddrNetwork Address/bits
Tor用於地址映射時使用的虛擬地址範圍。

Trans , NATD and DNS:

TransPort [address:]port|auto [isolation flags] (Default: 0)
TransListenAddress IP[:PORT] (Default: 127.0.0.1)
NATDPort [address:]port|auto [isolation flags] (Default: 0)
NATDListenAddress IP[:PORT]
Tor Client提供的透明代理服務,NATD服務在透明代理服務無法使用時備選。

DNSPort [address:]port|auto [isolation flags] (Default: 0)
DNSListenAddress IP[:PORT]
Tor Client提供的DNS域名解析服務。

Path Bias:

PathBiasCircThreshold NUM
PathBiasNoticeRate NUM
PathBiasDisableRate NUM
PathBiasScaleThreshold NUM
PathBiasScaleFactor NUM
Tor Client使用這些選項來修改本地的默認路徑偏見檢測算法。

Miscel:

AutomapHostsOnResolve 0|1 (Default: 0)
AutomapHostsSuffixes SUFFIX,SUFFIX,… (Default: .exit,.onion).
Tor用於地址解析時的虛擬地址映射。
ClientDNSRejectInternalAddresses 0|1 (Default: 1)
ClientRejectInternalAddresses 0|1 (Default: 1)
Tor用於指示對內部地址的不信任。

WarnPlaintextPorts port,port,… (Default: 23,109,110,143)
RejectPlaintextPorts port,port,… (Default: None)
Tor警告或禁止到指定端口的匿名連接,以防止明文傳輸密碼的發生。

HidServAuth onion-address auth-cookie [service-name]
Tor Client用於通過Hid Server的服務使用認證。

ClientOnly 0|1 (Default: 0)
Tor用於指示自己只作爲Client進行工作。

LongLivedPorts PORTS (Default: 21, 22, 706, 1863, 5050, 5190, 5222, 5223, 6523, 6667, 6697, 8300)
Tor用於指示用於長時間交互連接的端口號。

TokenBucketRefillInterval NUM [msec|second] (Default: 100 msec)
Tor用於填充令牌桶的時間間隔。

AllowNonRFC953Hostnames 0|1 (Default: 0)
Tor默認情況下拒絕非標準的主機名:@,:等。

FastFirstHopPK 0|1 (Default: 1)
Tor默認情況下使用快速的第一跳公鑰方法建立鏈路第一跳。

DownloadExtraInfo 0|1 (Default: 0)
Tor Client下載額外的網絡或服務器信息。

FallbackNetworkstatusFile FILENAME (Default: None)
Tor Client備份的網絡狀態文件,包含網絡狀態及服務器信息等。

AllowSingleHopCircuits 0|1 (Default: 0)
Tor Client用於指示是否允許單跳的鏈路。

OptimisticData 0|1|auto (Default: auto)
Tor Client根據該選項選擇性地使用鏈路優化,即在鏈路還未完全建立完成時就發送請求。

Tor2webMode 0|1 (Default: 0)
If not 0, Tor Client以非匿名的方式連接到Hid Service。

UseMicrodescriptors 0|1|auto (Default: auto)
Tor Client根據該選項下載相關的網絡狀態及服務器的簡化描述符。


SERVER OPTIONS

The following options are useful only for servers (that is, if ORPort is non-zero):

ORPort [address:]PORT|auto [flags] (Default: 0)
ORListenAddress IP[:PORT]
Tor Server必須有的選項,用於指示OR監聽的地址及端口。

ExitPolicy policy,policy,…
ExitPolicyRejectPrivate 0|1 (Default: 1)
Tor Server用於指示服務器的出口策略以及是否接受本地連接的出口。

PortForwarding 0|1 (Default: 0)
PortForwardingHelper filename|pathname (Default: tor-fw-helper)
Tor Server 若使用Nat路由器則需要用到的選項。

AccountingMax N bytes|KB|MB|GB|TB
AccountingStart day|week|month [day] HH:MM (Default: "month 1 0:00")
Tor Server擁有自己的統計時間段和統計最大值。在一個統計時間段內,當服務器流入或流出的流量超過統計最大值時,系統進入休眠狀態hibernate。

ServerDNSResolvConfFile filename (Defaults to use the system DNS configuration)
ServerDNSAllowBrokenConfig 0|1 (Default: 1)
ServerDNSSearchDomains 0|1 (Default: 0)
ServerDNSDetectHijacking 0|1 (Default: 1)
ServerDNSTestAddresses address,address,… (Default: "www.google.com, www.mit.edu, www.yahoo.com, www.slashdot.org")
ServerDNSAllowNonRFC953Hostnames 0|1 (Default: 0)
ServerDNSRandomizeCase 0|1 (Default: 1)
Tor Server關於DNS操作的控制選項,包括配置文件,劫持檢測和測試地址等。

BridgeRecordUsageByCountry 0|1 (Default: 1)


GeoIPFile filename

Tor Server被配置成Bridge時利用該選項來進行Bridge使用記錄,以此來得知哪些國家屏蔽Tor網絡。國家和地址的映射通過GeoIP文件得知。

CellStatistics 0|1 (Default: 0)
DirReqStatistics 0|1 (Default: 1)
EntryStatistics 0|1 (Default: 0)
ExitPortStatistics 0|1 (Default: 0)
ConnDirectionStatistics 0|1 (Default: 0)
ExtraInfoStatistics 0|1 (Default: 1)
Tor Server用於記錄服務器工作過程中統計出的信息。信息將被寫回硬盤。

Server Info:

BridgeRelay 0|1
Tor Server用於指示自身是普通Relay還是Bridge,其區別爲是否公開發布。

Address address
Tor Server用於指定服務器地址或域名。

ContactInfo email_address
Tor Server聯繫郵箱信息。

MyFamily node,node,…
Tor Server用於指示自身屬於哪個服務器族,以便客戶不會同時選中他們作爲中繼。

Nickname name
Tor Server自身的暱稱。

NumCPUs num (Default: 1)
Tor Server聲稱的自身處理器數量。多處理器用於並行執行Onion解密等可並行的操作。

Miscel:

RefuseUnknownExits 0|1|auto (Default: auto)
Tor Server拒絕未知結點的出口請求。

PublishServerDescriptor 0|1|v1|v2|v3|bridge,…
Tor Server發佈自身的描述符給目錄服務器或其他權威服務器。

ShutdownWaitLength NUM (Default: 30 seconds)
Tor Server進程在接收到SIGINT信號時進行各種結束處理操作,NUM時間後才最終結束。

HeartbeatPeriod N minutes|hours|days|weeks (Default: 6 hours)
Tor Server每隔N時長在日誌內打印出信息,以表示自身還處於正常工作狀態。

AllowSingleHopExits 0|1 (Default: 0)
Tor Server是否允許自身作爲整條鏈路中的唯一結點,並且允許出口操作。

AssumeReachable 0|1 (Default: 0)
Tor Server用於指示自身是否進行self-reachability測試,默認爲進行。

MaxOnionsPending NUM (Default: 100)
Tor Server緩衝區中可存在的最多待解密的Onion。

ExtendAllowPrivateAddresses 0|1 (Default: 0)
DIRECTORY SERVER OPTIONS
The following options are useful only for directory servers (that is, if DirPort is non-zero):

General:

DirPort [address:]PORT|auto [flags] (Default: 0)
DirListenAddress IP[:PORT] (Default: 0.0.0.0)
Tor用於監聽目錄請求,指示自身是個目錄服務器。

DirPolicy policy,policy,…
Tor目錄服務器的服務策略。

Authoritative:

AuthoritativeDirectory 0|1
Tor Directory Server用於指示自身是否是個權威目錄服務器。與普通目錄服務器相比,權威目錄服務器並非緩存目錄信息,而是通過自身對網絡的觀察得出網絡結論,對網絡狀態進行簽名併發往客戶端。權威目錄服務器需要經過Tor機構認可,一般服務器非權威目錄服務器。

V1AuthoritativeDirectory 0|1
V2AuthoritativeDirectory 0|1
V3AuthoritativeDirectory 0|1
Tor Authoritative Directory Server用於指示自身使用的描述符版本,即格式。

HSAuthoritativeDir 0|1 (Default: 0)
HidServDirectoryV2 0|1 (Default: 1)
BridgeAuthoritativeDir 0|1 (Default: 0)
Tor Authoritative Directory Server用於指示自身是否對HS和Router描述符進行服務。

VersioningAuthoritativeDirectory 0|1
NamingAuthoritativeDirectory 0|1
Tor Authoritative Directory Server的高級配置,暫時掠過。

Miscel:

DirPortFrontPage FILENAME
Tor Directory Server用於指定Dir端口的主頁,可能意思是通過HTTP請求連接該端口所能得到的返回是該FrontPage。

MinUptimeHidServDirectoryV2 N seconds|minutes|hours|days|weeks (Default: 25 hours)
FetchV2Networkstatus 0|1 (Default: 0)
Tor目錄服務器用於指示HidServ服務器的被認可時間,以及是否獲取V2網絡狀態信息。


DIRECTORY AUTHORITY SERVER OPTIONS

RecommendedVersions STRING
RecommendedClientVersions STRING
RecommendedServerVersions STRING
Tor Authoritative Directory Server指示的整個Tor網絡的推薦版本。

AuthDirListBadDirs 0|1
AuthDirListBadExits 0|1
AuthDirBadDir AddressPattern…
AuthDirBadExit AddressPattern…
AuthDirInvalid AddressPattern…
AuthDirReject AddressPattern…
AuthDirBadDirCCs CC,…
AuthDirBadExitCCs CC,…
AuthDirInvalidCCs CC,…
AuthDirRejectCCs CC,…
Tor Authoritative Directory Server內部定義的網絡狀態調整規則,禁止某些地址的使用。

V3AuthVotingInterval N minutes|hours (Default: 1 hour)
V3AuthVoteDelay N minutes|hours (Default: 5 minutes)
V3AuthDistDelay N minutes|hours (Default: 5 minutes)
V3AuthNIntervalsValid NUM (Default: 3)
V3AuthUseLegacyKey 0|1 (Default: 0)
Tor Authoritative Directory Server投票或簽名時使用的選項。

AuthDirRejectUnlisted 0|1 (Default: 0)
Tor Authoritative Directory Server拒絕所有的服務描述符當其指紋未被明確列出。

ConsensusParams STRING
Tor Authoritative Directory Server在網絡狀態投票中會用到的參數。

DirAllowPrivateAddresses 0|1 (Default: 0)
Tor Authoritative Directory Server指示是否接受從私有地址來的路由描述符信息。

Unknown:

AuthDirMaxServersPerAddr NUM (Default: 2)
AuthDirMaxServersPerAuthAddr NUM (Default: 5)
AuthDirFastGuarantee N bytes|KB|MB|GB (Default: 100 KB)
AuthDirGuardBWGuarantee N bytes|KB|MB|GB (Default: 250 KB)
BridgePassword Password (Default: not set)
RephistTrackTime N seconds|minutes|hours|days|weeks (Default: 24 hours)
VoteOnHidServDirectoriesV2 0|1 (Default: 1)
HIDDEN SERVICE OPTIONS
HiddenServiceDir DIRECTORY
Hidden Server用於存儲隱藏服務數據的數據文件夾。

HiddenServicePort VIRTPORT [TARGET]
Hidden Server用於指示提供隱藏服務的虛擬端口。

HiddenServiceVersion version,version,… (Default: 2)
Hidden Server所能支持的服務描述符版本。

PublishHidServDescriptors 0|1 (Default: 1)
Hidden Server用於指示是否發佈其服務消息。

HiddenServiceAuthorizeClient auth-type client-name,client-name,…
Hidden Server指定被允許使用服務的客戶端名稱。

RendPostPeriod N seconds|minutes|hours|days|weeks (Default: 1 hour)
Hidden Server每隔N時間向目錄服務器上傳一次自身的服務描述符。


TESTING NETWORK OPTIONS

The following options are used for running a testing Tor network.

TestingTorNetwork 0|1 (Default: 0)

TestingV3AuthInitialVotingInterval N minutes|hours (Default: 30 minutes)
TestingV3AuthInitialVoteDelay N minutes|hours (Default: 5 minutes)
TestingV3AuthInitialDistDelay N minutes|hours (Default: 5 minutes)
TestingAuthDirTimeToLearnReachability N minutes|hours (Default: 30 minutes)

TestingEstimatedDescriptorPropagationTime N minutes|hours (Default: 10 minutes)


SIGNALS

Tor catches the following signals:


SIGTERM
Tor執行清理,硬盤同步,而後退出。
SIGINT
Tor clients與接收到SIGTERM信號做同樣的處理;
Tor servers做緩慢的關閉操作,在完全關閉前還會等待一定由選項配置的時間。
SIGHUP
Tor重載其相關配置,重新運行Tor,並重啓其輔助器進程。
SIGUSR1
記錄數據到日誌。
SIGUSR2
調整日誌記錄級別到debug。
SIGCHLD
接收子進程的退出消息。
SIGPIPE
接收並忽略該消息。
SIGXFSZ

接收並忽略該消息。


FILES

/usr/local/etc/tor/torrc
The configuration file, which contains "option value" pairs.

/usr/local/var/lib/tor/
The tor process stores keys and other data here.

DataDirectory/cached-consensus and/or cached-microdesc-consensus
The most recent consensus network status document we’ve downloaded.
DataDirectory/cached-descriptors and cached-descriptors.new
These files hold downloaded router statuses. The ".new" file is an append-only journal; when it gets too large, all entries are merged into a new cached-descriptors file.
DataDirectory/cached-microdescs and cached-microdescs.new
These files hold downloaded microdescriptors. The ".new" file is an append-only journal; when it gets too large, all entries are merged into a new cached-microdescs file.

DataDirectory/state
A set of persistent key-value mappings. These are documented in the file. These include:
The current entry guards and their status.
The current bandwidth accounting values (unused so far; see below).
When the file was last written
What version of Tor generated the state file
A short history of bandwidth usage, as produced in the router descriptors.

DataDirectory/control_auth_cookie
Used for cookie authentication with the controller. Only used when cookie authentication is enabled.

Server:

DataDirectory/keys/*
Only used by servers. Holds identity keys and onion keys.
DataDirectory/fingerprint
Only used by servers. Holds the fingerprint of the server’s identity key.

DataDirectory/approved-routers
Only for naming authoritative directory servers (see NamingAuthoritativeDirectory). This file lists nickname to identity bindings.

DataDirectory/router-stability
Only used by authoritative directory servers. Tracks measurements for router mean-time- between-failures so that authorities have a good idea of how to set their Stable flags.

Hidden Service:

HiddenServiceDirectory/hostname
The <base32-encoded-fingerprint>.onion domain name for this hidden service. If the hidden service is restricted to authorized clients only, this file also contains authorization data for all clients.
HiddenServiceDirectory/private_key
The private key for this hidden service.
HiddenServiceDirectory/client_keys
Authorization data for a hidden service that is only accessible by authorized clients.

Obsolete:

DataDirectory/cached-status/
The most recently downloaded network status document for each authority. Each file holds one such document; the filenames are the hexadecimal identity key fingerprints of the directory authorities. Mostly obsolete.

DataDirectory/cached-routers and cached-routers.new
Obsolete versions of cached-descriptors and cached-descriptors.new. When Tor can’t find the newer files, it looks here instead.

DataDirectory/bw_accounting
Used to track bandwidth accounting values (when the current period starts and ends; how much has been read and written so far this period). This file is obsolete, and the data is now stored in the 'state' file as well. Only used when bandwidth accounting is enabled.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章