Commit Graph

33966 Commits

Author SHA1 Message Date
teor
73c0439d48 relay: Refactor tests, and add extra options tests
Part of 32213.
2019-11-05 10:49:56 +10:00
teor
51ca6dea08 relay: Simplify relay/transport_config
Minor simplification and refactoring.

Part of 32113.
2019-11-04 13:10:01 +10:00
teor
2dfd18018f relay: Disable server transport options when the module is disabled
This commit:
* disables the ExtORPort, ServerTransportPlugin,
  ServerTransportListenAddress, and ServerTransportOptions options,
when the relay module is disabled.

Part of 32213.
2019-11-04 13:10:01 +10:00
teor
4d9a5c77f8 relay: Simplify some relay_config code
Part of 32213.
2019-11-04 13:10:00 +10:00
teor
d3c8486724 relay: Disable relay config when the module is disabled
This commit:
* disables the ORPort, DirPort, DirCache, and BridgeRelay options,
* sets ClientOnly 1,
* disables relay_config.c and relay/transport_config.c,
* disables test_rebind.sh, and
* modifies the expected results for test_parseconf.sh,
when the relay module is disabled.

Part of 32213.
2019-11-04 13:10:00 +10:00
teor
85e50954d8 relay: Make a transport_config function private
Part of 32213.
2019-11-04 13:10:00 +10:00
teor
fd18d51270 dirauth: Refactor some code and tests
Minor simplification and refactoring.

Make the dirauth tests focus on testing the intention of the code,
rather than option processing order.

Part of 32213.
2019-11-04 13:10:00 +10:00
teor
d665458085 config: Delete get_list_of_ports_to_forward()
Tor has not supported automatic port forwarding for some time.
2019-10-31 12:34:20 +10:00
teor
8036954bf5 config: Move warn_nonlocal_ext_orports() to relay
Part of 32213.
2019-10-31 12:34:20 +10:00
teor
23faa03ffc relay/config: Remove direct references to dirauth options
All *AuthoritativeDir* options are now accessed via the authmode
functions in relay_config.c, relay/transport_config.c, and config.c.

Part of 32213.
2019-10-31 12:34:20 +10:00
teor
1d4d2deea1 config: Move dirauth stats actions into the module
This commit:
* moves dirauth stats and mtbf config actions into dirauth_config,
* adds thin wrappers to make the moved code compile.

The moved code is disabled when the dirauth module is disabled.

Part of 32213.
2019-10-31 12:34:20 +10:00
teor
fc5da4ad04 config: Move relay config actions into the relay module
This commit:
* moves relay config actions into relay_config,
* moves get_dirportfrontpage() into relay_config,
* adds thin wrappers to make the moved code compile.

No functional changes: the moved code is still enabled,
even if the relay module is disabled. (Some of the checks
are re-ordered, so the order of some warnings may change.)

Part of 32213.
2019-10-31 12:34:20 +10:00
teor
6d03c05665 config: Move server transport actions into the relay module
This commit:
* moves server transport config checks into transport_config.c,
* adds thin wrappers to make the moved code compile.

No functional changes: the moved code is still enabled,
even if the relay module is disabled. (Some of the checks
are re-ordered, so the order of some warnings may change.)

Part of 32213.
2019-10-31 12:34:20 +10:00
teor
0a511778eb config: Move bw & other configs into the dirauth module
This commit:
* moves bandwidth checks into dirauth_config, and
* moves some other minor checks into dirauth_config.

The moved code is disabled when the dirauth module is disabled.
(And some of the checks are re-ordered, so the order of some
warnings may change.)

Part of 32213.
2019-10-31 12:34:20 +10:00
teor
d5ca56e254 config: Move accounting/bandwidth config into the relay module
This commit:
* moves accounting and bandwidth checks into relay_config,
* moves testing options checks into relay_config,
* moves some other minor checks into relay_config,
* exposes some code from src/app/config.c
  (we'll refactor it later in 29211), and
* adds thin wrappers to make the moved code compile.

No functional changes: the moved code is still enabled,
even if the relay module is disabled. (Some of the checks
are re-ordered, so the order of some warnings may change.)

Part of 32213.
2019-10-31 12:34:20 +10:00
teor
11f283f561 config: Move server transport config into the relay module
This commit:
* creates feature/relay/transport_config.[ch],
* moves server transport config checks into them,
* exposes some code from src/app/config.c
  (we'll refactor it later in 29211), and
* adds thin wrappers to make the moved code compile.

No functional changes: the moved code is still enabled,
even if the relay module is disabled. (Some of the checks
are re-ordered, so the order of some warnings may change.)

Part of 32213.
2019-10-31 12:34:20 +10:00
teor
093a127c82 config: Move relay config checks into the relay module
This commit:
* moves relay config checks into relay_config.[ch],
* exposes some code from src/app/config.c
  (we'll refactor it later in 29211), and
* adds thin wrappers to make the moved code compile.

No functional changes: the moved code is still enabled,
even if the relay module is disabled. (Some of the checks
are re-ordered, so the order of some warnings may change.)

Part of 32213.
2019-10-31 12:34:19 +10:00
teor
0722b4fdb9 config: Move relay port parsing into the relay module
This commit:
* creates feature/relay/relay_config.[ch],
* moves relay port parsing into them,
* exposes some code from src/app/config.c
  (we'll refactor it later in 29211), and
* adds thin wrappers to make the moved code compile.

No functional changes: the moved code is still enabled,
even if the relay module is disabled.

Part of 32213.
2019-10-31 12:34:19 +10:00
teor
f70633d72d dirauth: Remove some outdated config comments
Part of 32213.
2019-10-31 12:34:19 +10:00
teor
3881ac2c86 dirauth: Refactor some config checks
Minor cleanup and simplification.

Part of 32213.
2019-10-31 12:34:19 +10:00
teor
da49c4d78d dirauth: Disable dirauth config when the module is disabled
Part of 32213.
2019-10-31 12:34:19 +10:00
teor
5950566f1d config: Move dirauth config into the dirauth module
This commit:
* creates feature/dirauth/dirauth_config.[ch],
* moves the dirauth config code into them,
* copies some macros from src/app/config.c
  (we'll refactor them later in 29211), and
* adds thin wrappers to make the moved code compile.

No functional changes: the moved code is still enabled,
even if the dirauth module is disabled.

Part of 32213.
2019-10-31 12:34:19 +10:00
teor
40e75bc3e1
doc: Add defaults for some transport options 2019-10-31 11:27:26 +10:00
teor
a18e84ad01
config: Improve some function comments 2019-10-31 11:11:51 +10:00
teor
4666ca73a1
config: Give warn_about_relative_paths() const args
Also gives make_path_absolute() const args.

Obviously correct fixes to already reviewed code.
2019-10-31 10:53:26 +10:00
Nick Mathewson
a6ad26fd5f Merge remote-tracking branch 'tor-github/pr/1485' 2019-10-30 16:16:12 -04:00
David Goulet
cfc60e566c circ: Add an handle to circuit_t
Closes #32343

Signed-off-by: David Goulet <dgoulet@torproject.org>
2019-10-30 16:12:56 -04:00
Nick Mathewson
5a1dfca071 Fix 32167: comment in config.c 2019-10-30 16:05:48 -04:00
teor
183f9e490f
test: Fix a comment typo in src/test/test_hs_ntor.sh 2019-10-31 00:43:13 +10:00
teor
861b9366df
test: Fix a loop variable bug in test_parseconf.sh
Obviously correct fixes to already reviewed code.
No changes file required: not in any released version of tor.
2019-10-31 00:23:30 +10:00
David Goulet
f579541f13 Merge branch 'tor-github/pr/1468' 2019-10-30 08:53:51 -04:00
teor
dce1f63d44
fs: Clarify an ambiguous comment about string/pointer equality 2019-10-30 16:15:43 +10:00
Taylor Yu
1e8ddbe1ee Changes file for ticket 32277 2019-10-29 16:39:03 -05:00
Taylor Yu
5e4ae73051 Reformat some options in tor.1.txt
Reformat command line options in tor.1.txt to display as fixed-width
in the HTML version.  Based on a patch by Swati Thacker.  Part of
ticket 32277.
2019-10-29 16:39:03 -05:00
Taylor Yu
8660a32d18 Reword command-options in tor.1.txt
Reword the COMMAND-LINE OPTIONS section of tor.1.txt.  Based on a
patch by Swati Thacker.  Part of ticket 32277.
2019-10-29 16:39:03 -05:00
Taylor Yu
90ba8bae3f Reword DESCRIPTION in tor.1.txt
Reword the DESCRIPTION section of tor.1.txt.

Based on a patch by Swati Thacker.  Part of ticket 32277.
2019-10-29 16:39:03 -05:00
Taylor Yu
4c38fccb9b Move command-line conf option description earlier
In tor.1.txt, move the paragraphs at the end of the COMMAND-LINE
OPTIONS section earlier.  This text describes how the user can specify
configuration options on the command line.

Also clarify some wording and formatting.

Based on a patch by Swati Thacker.  Part of ticket 32277.
2019-10-29 16:39:03 -05:00
George Kadianakis
4413b98190 Merge branch 'tor-github/pr/1456' 2019-10-29 21:29:13 +08:00
teor
30705e8294
app/config: Fix a comment typo in config.c
The options validation is now a callback.

Bugfix on 31241; not in any released version of tor.
2019-10-29 12:40:20 +10:00
teor
b448f6044d
Merge branch 'maint-0.4.2' 2019-10-29 08:27:02 +10:00
teor
2395800d3e
Merge branch 'maint-0.4.1' into maint-0.4.2 2019-10-29 08:26:55 +10:00
teor
63aff4a43e
Merge branch 'maint-0.4.0' into maint-0.4.1 2019-10-29 08:26:48 +10:00
teor
54e2d0dc2d
Merge branch 'maint-0.3.5' into maint-0.4.0 2019-10-29 08:26:40 +10:00
teor
15d67842f9
Merge branch 'maint-0.2.9' into maint-0.3.5 2019-10-29 08:26:32 +10:00
teor
752c35ca96
Merge remote-tracking branch 'tor-github/pr/1460' into maint-0.2.9 2019-10-29 08:23:35 +10:00
teor
bf16efeb07
nodelist: fix a comment typo in routerset.h 2019-10-28 23:44:08 +10:00
David Goulet
b98631d280 Merge branch 'tor-github/pr/1476' 2019-10-28 08:47:57 -04:00
Nick Mathewson
25d66a3391 add missing docs in crypto_digest* 2019-10-28 08:27:42 -04:00
Nick Mathewson
4d2c8ca338 Merge branch 'config_macros_doc_cleanup' 2019-10-28 07:31:42 -04:00
teor
3479024cb1 scripts: Change to the top source directory as needed
Bugfix on 31919; not in any released version of tor.
2019-10-28 13:28:50 +10:00