Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mike Perry
Tor
Commits
ded70363
Commit
ded70363
authored
Sep 10, 2012
by
Nick Mathewson
👁
Browse files
Rename DirServer to DirAuthority
parent
5c51b3f1
Changes
4
Hide whitespace changes
Inline
Side-by-side
changes/rename_dirserver
0 → 100644
View file @
ded70363
o Renamed options:
- The DirServer option is now DirAuthority, for consistency with current
naming patterns. You can still use the old DirServer form.
doc/tor.1.txt
View file @
ded70363
...
...
@@ -292,7 +292,7 @@ GENERAL OPTIONS
**DataDirectory** __DIR__::
Store working data in DIR (Default: @LOCALSTATEDIR@/lib/tor)
**Dir
Server
** [__nickname__] [**flags**] __address__:__port__ __fingerprint__::
**Dir
Authority
** [__nickname__] [**flags**] __address__:__port__ __fingerprint__::
Use a nonstandard authoritative directory server at the provided address
and port, with the specified key fingerprint. This option can be repeated
many times, for multiple authoritative directory servers. Flags are
...
...
@@ -309,8 +309,8 @@ GENERAL OPTIONS
flag "v3ident=**fp**" is given, the dirserver is a v3 directory authority
whose v3 long-term signing key has the fingerprint **fp**. +
+
If no **
d
ir
server
** line is given, Tor will use the default directory
server
s. NOTE: this option is intended for setting up a private Tor
If no **
D
ir
Authority
** line is given, Tor will use the default directory
authoritie
s. NOTE: this option is intended for setting up a private Tor
network with its own directory authorities. If you use it, you will be
distinguishable from other users, because you won't believe the same
authorities they do.
...
...
@@ -326,7 +326,7 @@ GENERAL OPTIONS
**AlternateHSAuthority** [__nickname__] [**flags**] __address__:__port__ __fingerprint__ +
**AlternateBridgeAuthority** [__nickname__] [**flags**] __address__:__port__ __ fingerprint__::
These options behave as Dir
Server
, but they replace fewer of the
These options behave as Dir
Authority
, but they replace fewer of the
default directory authorities. Using
AlternateDirAuthority replaces the default Tor directory authorities, but
leaves the default hidden service authorities and bridge authorities in
...
...
src/or/config.c
View file @
ded70363
...
...
@@ -81,6 +81,7 @@ static config_abbrev_t option_abbrevs_[] = {
{
"BandwidthRateBytes"
,
"BandwidthRate"
,
0
,
0
},
{
"BandwidthBurstBytes"
,
"BandwidthBurst"
,
0
,
0
},
{
"DirFetchPostPeriod"
,
"StatusFetchPeriod"
,
0
,
0
},
{
"DirServer"
,
"DirAuthority"
,
0
,
0
},
/* XXXX024 later, make this warn? */
{
"MaxConn"
,
"ConnLimit"
,
0
,
1
},
{
"ORBindAddress"
,
"ORListenAddress"
,
0
,
0
},
{
"DirBindAddress"
,
"DirListenAddress"
,
0
,
0
},
...
...
@@ -206,7 +207,7 @@ static config_var_t option_vars_[] = {
OBSOLETE
(
"DirRecordUsageRetainIPs"
),
OBSOLETE
(
"DirRecordUsageSaveInterval"
),
V
(
DirReqStatistics
,
BOOL
,
"1"
),
VAR
(
"Dir
Server"
,
LINELIST
,
Dir
Server
s
,
NULL
),
VAR
(
"Dir
Authority"
,
LINELIST
,
Dir
Authoritie
s
,
NULL
),
V
(
DisableAllSwap
,
BOOL
,
"0"
),
V
(
DisableDebuggerAttachment
,
BOOL
,
"1"
),
V
(
DisableIOCP
,
BOOL
,
"1"
),
...
...
@@ -802,24 +803,24 @@ validate_dir_authorities(or_options_t *options, or_options_t *old_options)
{
config_line_t
*
cl
;
if
(
options
->
Dir
Server
s
&&
if
(
options
->
Dir
Authoritie
s
&&
(
options
->
AlternateDirAuthority
||
options
->
AlternateBridgeAuthority
||
options
->
AlternateHSAuthority
))
{
log_warn
(
LD_CONFIG
,
"You cannot set both Dir
Servers
and Alternate*Authority."
);
"You cannot set both Dir
Authority
and Alternate*Authority."
);
return
-
1
;
}
/* do we want to complain to the user about being partitionable? */
if
((
options
->
Dir
Server
s
&&
if
((
options
->
Dir
Authoritie
s
&&
(
!
old_options
||
!
config_lines_eq
(
options
->
Dir
Server
s
,
old_options
->
Dir
Server
s
)))
||
!
config_lines_eq
(
options
->
Dir
Authoritie
s
,
old_options
->
Dir
Authoritie
s
)))
||
(
options
->
AlternateDirAuthority
&&
(
!
old_options
||
!
config_lines_eq
(
options
->
AlternateDirAuthority
,
old_options
->
AlternateDirAuthority
))))
{
log_warn
(
LD_CONFIG
,
"You have used Dir
Server
or AlternateDirAuthority to "
"You have used Dir
Authority
or AlternateDirAuthority to "
"specify alternate directory authorities in "
"your configuration. This is potentially dangerous: it can "
"make you look different from all other Tor users, and hurt "
...
...
@@ -830,7 +831,7 @@ validate_dir_authorities(or_options_t *options, or_options_t *old_options)
/* Now go through the four ways you can configure an alternate
* set of directory authorities, and make sure none are broken. */
for
(
cl
=
options
->
Dir
Server
s
;
cl
;
cl
=
cl
->
next
)
for
(
cl
=
options
->
Dir
Authoritie
s
;
cl
;
cl
=
cl
->
next
)
if
(
parse_dir_server_line
(
cl
->
value
,
NO_DIRINFO
,
1
)
<
0
)
return
-
1
;
for
(
cl
=
options
->
AlternateBridgeAuthority
;
cl
;
cl
=
cl
->
next
)
...
...
@@ -856,7 +857,7 @@ consider_adding_dir_authorities(const or_options_t *options,
int
need_to_update
=
!
smartlist_len
(
router_get_trusted_dir_servers
())
||
!
smartlist_len
(
router_get_fallback_dir_servers
())
||
!
old_options
||
!
config_lines_eq
(
options
->
Dir
Server
s
,
old_options
->
Dir
Server
s
)
||
!
config_lines_eq
(
options
->
Dir
Authoritie
s
,
old_options
->
Dir
Authoritie
s
)
||
!
config_lines_eq
(
options
->
AlternateBridgeAuthority
,
old_options
->
AlternateBridgeAuthority
)
||
!
config_lines_eq
(
options
->
AlternateDirAuthority
,
...
...
@@ -870,7 +871,7 @@ consider_adding_dir_authorities(const or_options_t *options,
/* Start from a clean slate. */
clear_dir_servers
();
if
(
!
options
->
Dir
Server
s
)
{
if
(
!
options
->
Dir
Authoritie
s
)
{
/* then we may want some of the defaults */
dirinfo_type_t
type
=
NO_DIRINFO
;
if
(
!
options
->
AlternateBridgeAuthority
)
...
...
@@ -883,7 +884,7 @@ consider_adding_dir_authorities(const or_options_t *options,
add_default_trusted_dir_authorities
(
type
);
}
for
(
cl
=
options
->
Dir
Server
s
;
cl
;
cl
=
cl
->
next
)
for
(
cl
=
options
->
Dir
Authoritie
s
;
cl
;
cl
=
cl
->
next
)
if
(
parse_dir_server_line
(
cl
->
value
,
NO_DIRINFO
,
0
)
<
0
)
return
-
1
;
for
(
cl
=
options
->
AlternateBridgeAuthority
;
cl
;
cl
=
cl
->
next
)
...
...
@@ -1925,18 +1926,18 @@ resolve_my_address(int warn_severity, const or_options_t *options,
addr_string
=
tor_dup_ip
(
addr
);
if
(
is_internal_IP
(
addr
,
0
))
{
/* make sure we're ok with publishing an internal IP */
if
(
!
options
->
Dir
Server
s
&&
!
options
->
AlternateDirAuthority
)
{
/* if they are using the default
dirserver
s, disallow internal IPs
if
(
!
options
->
Dir
Authoritie
s
&&
!
options
->
AlternateDirAuthority
)
{
/* if they are using the default
authoritie
s, disallow internal IPs
* always. */
log_fn
(
warn_severity
,
LD_CONFIG
,
"Address '%s' resolves to private IP address '%s'. "
"Tor servers that use the default Dir
Server
s must have public "
"Tor servers that use the default Dir
Authoritie
s must have public "
"IP addresses."
,
hostname
,
addr_string
);
tor_free
(
addr_string
);
return
-
1
;
}
if
(
!
explicit_ip
)
{
/* even if they've set their own
dirserver
s, require an explicit IP if
/* even if they've set their own
authoritie
s, require an explicit IP if
* they're using an internal address. */
log_fn
(
warn_severity
,
LD_CONFIG
,
"Address '%s' resolves to private "
"IP address '%s'. Please set the Address config option to be "
...
...
@@ -2963,7 +2964,7 @@ options_validate(or_options_t *old_options, or_options_t *options,
}
if
(
options
->
TestingTorNetwork
&&
!
(
options
->
Dir
Server
s
||
!
(
options
->
Dir
Authoritie
s
||
(
options
->
AlternateDirAuthority
&&
options
->
AlternateBridgeAuthority
)))
{
REJECT
(
"TestingTorNetwork may only be configured in combination with "
...
...
@@ -2971,7 +2972,7 @@ options_validate(or_options_t *old_options, or_options_t *options,
"and AlternateBridgeAuthority configured."
);
}
if
(
options
->
AllowSingleHopExits
&&
!
options
->
Dir
Server
s
)
{
if
(
options
->
AllowSingleHopExits
&&
!
options
->
Dir
Authoritie
s
)
{
COMPLAIN
(
"You have set AllowSingleHopExits; now your relay will allow "
"others to make one-hop exits. However, since by default most "
"clients avoid relays that set this option, most clients will "
...
...
src/or/or.h
View file @
ded70363
...
...
@@ -3424,7 +3424,7 @@ typedef struct {
/** List of configuration lines for replacement directory authorities.
* If you just want to replace one class of authority at a time,
* use the "Alternate*Authority" options below instead. */
config_line_t
*
Dir
Server
s
;
config_line_t
*
Dir
Authoritie
s
;
/** If set, use these main (currently v3) directory authorities and
* not the default ones. */
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment