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
9ebf86bb
Commit
9ebf86bb
authored
Dec 21, 2007
by
Roger Dingledine
Browse files
new config option FetchDirInfoEarly for tup/ioerror and the tordnsel
svn:r12896
parent
f0e7c4f0
Changes
9
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
9ebf86bb
Changes in version 0.2.0.13-alpha - 2007-12-
??
Changes in version 0.2.0.13-alpha - 2007-12-
21
o New directory authorities:
- Set up lefkada (run by Geoff Goodell) as the fourth v3 directory
authority.
...
...
@@ -18,8 +18,6 @@ Changes in version 0.2.0.13-alpha - 2007-12-??
- Stop thinking that 0.1.2.x directory servers can handle "begin_dir"
requests. Should ease bugs 406 and 419 where 0.1.2.x relays are
crashing or mis-answering these requests.
- Stop being so aggressive about fetching v2 dir info if your
DirPort is on but your ORPort is off.
- Relays were publishing their server descriptor to v1 and v2
directory authorities, but they didn't try publishing to v3-only
authorities. Fix this; and also stop publishing to v1 authorities.
...
...
@@ -47,6 +45,10 @@ Changes in version 0.2.0.13-alpha - 2007-12-??
bridges they know. They provide router status summaries to the
controller on "getinfo ns/purpose/bridge", and also dump summaries
to a file periodically.
- Stop fetching directory info so aggressively if your DirPort is
on but your ORPort is off; stop fetching v2 dir info entirely.
You can override these choices with the new FetchDirInfoEarly
config option.
o Minor bugfixes:
- The fix in 0.2.0.12-alpha cleared the "hsdir" flag in v3 network
...
...
contrib/exitlist
View file @
9ebf86bb
...
...
@@ -17,7 +17,8 @@
cat ~/.tor/cached-descriptors* | python exitlist 18.244.0.188:80
You should look at the "FetchUselessDescriptors" config option in the
man page.
man page. For 0.2.0.13-alpha and later, also look at the
"FetchDirInfoEarly" config option.
Note that this script won't give you a perfect list of IP addresses
that might connect to you using Tor, since some Tor servers might exit
...
...
doc/tor.1.in
View file @
9ebf86bb
...
...
@@ -211,6 +211,13 @@ you use it, you will be distinguishable from other users, because you won't
believe the same authorities they do.
.LP
.TP
\fBFetchDirInfoEarly \fR\fB0\fR|\fB1\fR\fP
If set to 1, Tor will always fetch directory information like other
directory caches, even if you don't meet the normal criteria for
fetching early. Normal users should leave it off.
(Default: 0)
.LP
.TP
\fBFetchHidServDescriptors \fR\fB0\fR|\fB1\fR\fP
If set to 0, Tor will never fetch any hidden service descriptors from
the rendezvous directories. This option is only useful if you're using
...
...
src/or/config.c
View file @
9ebf86bb
...
...
@@ -190,6 +190,7 @@ static config_var_t _option_vars[] = {
V
(
FascistFirewall
,
BOOL
,
"0"
),
V
(
FirewallPorts
,
CSV
,
""
),
V
(
FastFirstHopPK
,
BOOL
,
"1"
),
V
(
FetchDirInfoEarly
,
BOOL
,
"0"
),
V
(
FetchServerDescriptors
,
BOOL
,
"1"
),
V
(
FetchHidServDescriptors
,
BOOL
,
"1"
),
V
(
FetchUselessDescriptors
,
BOOL
,
"0"
),
...
...
@@ -1240,10 +1241,10 @@ options_act(or_options_t *old_options)
if
(
old_options
)
{
if
(
authdir_mode_v3
(
options
)
&&
!
authdir_mode_v3
(
old_options
))
dirvote_recalculate_timing
(
options
,
time
(
NULL
));
if
(
!
bool_eq
(
directory_fetches_dir_info_
like_mirror
(
options
),
directory_fetches_dir_info_
like_mirror
(
old_options
))
||
!
bool_eq
(
directory_fetches_dir_info_l
ike_bridge_us
er
(
options
),
directory_fetches_dir_info_l
ike_bridge_us
er
(
old_options
)))
{
if
(
!
bool_eq
(
directory_fetches_dir_info_
early
(
options
),
directory_fetches_dir_info_
early
(
old_options
))
||
!
bool_eq
(
directory_fetches_dir_info_l
at
er
(
options
),
directory_fetches_dir_info_l
at
er
(
old_options
)))
{
/* Make sure update_router_have_min_dir_info gets called. */
router_dir_info_changed
();
/* We might need to download a new consensus status later or sooner than
...
...
src/or/dirserv.c
View file @
9ebf86bb
...
...
@@ -1114,7 +1114,8 @@ dirserv_dump_directory_to_string(char **dir_out,
int
directory_fetches_from_authorities
(
or_options_t
*
options
)
{
/* XXX if options->FetchDirInfoEagerly, return 1 */
if
(
options
->
FetchDirInfoEarly
)
return
1
;
if
(
options
->
DirPort
==
0
)
return
0
;
if
(
options
->
BridgeRelay
==
1
)
...
...
@@ -1130,7 +1131,7 @@ directory_fetches_from_authorities(or_options_t *options)
* on the "mirror" schedule rather than the "client" schedule.
*/
int
directory_fetches_dir_info_
like_mirror
(
or_options_t
*
options
)
directory_fetches_dir_info_
early
(
or_options_t
*
options
)
{
return
directory_fetches_from_authorities
(
options
);
}
...
...
@@ -1142,7 +1143,7 @@ directory_fetches_dir_info_like_mirror(or_options_t *options)
* client as a directory guard.
*/
int
directory_fetches_dir_info_l
ike_bridge_us
er
(
or_options_t
*
options
)
directory_fetches_dir_info_l
at
er
(
or_options_t
*
options
)
{
return
options
->
UseBridges
!=
0
;
}
...
...
src/or/main.c
View file @
9ebf86bb
...
...
@@ -954,7 +954,7 @@ run_scheduled_events(time_t now)
* (if we've passed our internal checks). */
if
(
time_to_fetch_directory
<
now
)
{
/* Only caches actually need to fetch directories now. */
if
(
directory_fetches_dir_info_
like_mirror
(
options
)
&&
if
(
directory_fetches_dir_info_
early
(
options
)
&&
!
authdir_mode_v1
(
options
))
{
if
(
any_trusted_dir_is_v1_authority
()
&&
!
should_delay_dir_fetches
(
options
))
...
...
@@ -967,7 +967,7 @@ run_scheduled_events(time_t now)
}
/* Caches need to fetch running_routers; directory clients don't. */
if
(
directory_fetches_dir_info_
like_mirror
(
options
)
&&
if
(
directory_fetches_dir_info_
early
(
options
)
&&
time_to_fetch_running_routers
<
now
)
{
if
(
!
authdir_mode_v1
(
options
)
&&
!
should_delay_dir_fetches
(
options
))
{
directory_get_from_dirserver
(
DIR_PURPOSE_FETCH_RUNNING_LIST
,
...
...
src/or/networkstatus.c
View file @
9ebf86bb
...
...
@@ -1063,7 +1063,7 @@ update_consensus_networkstatus_fetch_time(time_t now)
long
dl_interval
;
long
interval
=
c
->
fresh_until
-
c
->
valid_after
;
time_t
start
;
if
(
directory_fetches_dir_info_
like_mirror
(
options
))
{
if
(
directory_fetches_dir_info_
early
(
options
))
{
/* We want to cache the next one at some point after this one
* is no longer fresh... */
start
=
c
->
fresh_until
+
CONSENSUS_MIN_SECONDS_BEFORE_CACHING
;
...
...
@@ -1078,7 +1078,7 @@ update_consensus_networkstatus_fetch_time(time_t now)
/* If we're a bridge user, make use of the numbers we just computed
* to choose the rest of the interval *after* them. */
if
(
directory_fetches_dir_info_l
ike_bridge_us
er
(
options
))
{
if
(
directory_fetches_dir_info_l
at
er
(
options
))
{
/* Give all the *clients* enough time to download the consensus. */
start
=
start
+
dl_interval
+
CONSENSUS_MIN_SECONDS_BEFORE_CACHING
;
/* But try to get it before ours actually expires. */
...
...
@@ -1133,7 +1133,7 @@ update_networkstatus_downloads(time_t now)
or_options_t
*
options
=
get_options
();
if
(
should_delay_dir_fetches
(
options
))
return
;
if
(
directory_fetches_dir_info_
like_mirror
(
options
))
if
(
directory_fetches_dir_info_
early
(
options
))
update_v2_networkstatus_cache_downloads
(
now
);
update_consensus_networkstatus_downloads
(
now
);
update_certificate_downloads
(
now
);
...
...
src/or/or.h
View file @
9ebf86bb
...
...
@@ -2268,6 +2268,9 @@ typedef struct {
int
RephistTrackTime
;
/**< How many seconds do we keep rephist info? */
int
FastFirstHopPK
;
/**< If Tor believes it is safe, should we save a third
* of our PK time by sending CREATE_FAST cells? */
/** Should we always fetch our dir info on the mirror schedule (which
* means directly from the authorities) no matter our other config? */
int
FetchDirInfoEarly
;
addr_policy_t
*
reachable_addr_policy
;
/**< Parsed from ReachableAddresses */
...
...
@@ -3066,8 +3069,8 @@ int dirserv_dump_directory_to_string(char **dir_out,
crypto_pk_env_t
*
private_key
);
int
directory_fetches_from_authorities
(
or_options_t
*
options
);
int
directory_fetches_dir_info_
like_mirror
(
or_options_t
*
options
);
int
directory_fetches_dir_info_l
ike_bridge_us
er
(
or_options_t
*
options
);
int
directory_fetches_dir_info_
early
(
or_options_t
*
options
);
int
directory_fetches_dir_info_l
at
er
(
or_options_t
*
options
);
int
directory_caches_v2_dir_info
(
or_options_t
*
options
);
#define directory_caches_v1_dir_info(o) directory_caches_v2_dir_info(o)
int
directory_caches_dir_info
(
or_options_t
*
options
);
...
...
src/or/routerlist.c
View file @
9ebf86bb
...
...
@@ -3575,7 +3575,7 @@ launch_router_descriptor_downloads(smartlist_t *downloadable, time_t now)
or_options_t
*
options
=
get_options
();
n_downloadable
=
smartlist_len
(
downloadable
);
if
(
!
directory_fetches_dir_info_
like_mirror
(
options
))
{
if
(
!
directory_fetches_dir_info_
early
(
options
))
{
if
(
n_downloadable
>=
MAX_DL_TO_DELAY
)
{
log_debug
(
LD_DIR
,
"There are enough downloadable routerdescs to launch requests."
);
...
...
@@ -3642,7 +3642,7 @@ update_router_descriptor_cache_downloads_v2(time_t now)
or_options_t
*
options
=
get_options
();
const
smartlist_t
*
networkstatus_v2_list
=
networkstatus_get_v2_list
();
if
(
!
directory_fetches_dir_info_
like_mirror
(
options
))
{
if
(
!
directory_fetches_dir_info_
early
(
options
))
{
log_warn
(
LD_BUG
,
"Called update_router_descriptor_cache_downloads_v2() "
"on a non-dir-mirror?"
);
}
...
...
@@ -3877,7 +3877,7 @@ update_router_descriptor_downloads(time_t now)
or_options_t
*
options
=
get_options
();
if
(
should_delay_dir_fetches
(
options
))
return
;
if
(
directory_fetches_dir_info_
like_mirror
(
options
))
{
if
(
directory_fetches_dir_info_
early
(
options
))
{
update_router_descriptor_cache_downloads_v2
(
now
);
}
update_consensus_router_descriptor_downloads
(
now
);
...
...
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