test/parseconf: Add conf_examples for PTs

Tests relay/transport_config.c.

Part of 32213.
This commit is contained in:
teor 2019-10-31 17:21:10 +10:00
parent 233b96d83a
commit 6d52b5ce91
27 changed files with 89 additions and 0 deletions

View File

@ -0,0 +1 @@
This tor was built with relay mode disabled.

View File

View File

@ -0,0 +1,7 @@
# Relay PT tests
# Options from relay/transport_config.c
# Empty linelist values are ignored with a warning
ExtORPort
ServerTransportPlugin
ServerTransportListenAddr
ServerTransportOptions

View File

@ -0,0 +1 @@
This tor was built with relay mode disabled.

View File

View File

@ -0,0 +1,11 @@
# Relay PT tests
# Options from relay/transport_config.c
# Bad options are also ignored
ExtORPort illegal_hostname_chars$()^*%(%#%)#(%*
ServerTransportPlugin bad
ServerTransportPlugin bad2 exec
ServerTransportPlugin bad3 exec /
ServerTransportListenAddr bad
ServerTransportListenAddr bad2 illegal_hostname_chars$()^*%(%#%)#(%*
ServerTransportOptions bad
ServerTransportOptions bad2 not_kv

View File

@ -0,0 +1 @@
This tor was built with relay mode disabled.

View File

@ -0,0 +1 @@
ServerTransportPlugin bad3 exec /

View File

@ -0,0 +1,4 @@
# Relay PT tests
# Options from relay/transport_config.c
# Plugin, but no ExtORPort
ServerTransportPlugin bad3 exec /

View File

@ -0,0 +1 @@
This tor was built with relay mode disabled.

View File

@ -0,0 +1,3 @@
ExtORPortCookieAuthFile /
ExtORPort 1
ServerTransportPlugin bad3 exec /

View File

@ -0,0 +1,6 @@
# Relay PT tests
# Options from relay/transport_config.c
# Try a bad cookie auth file
ExtORPort 1
ExtORPortCookieAuthFile /
ServerTransportPlugin bad3 exec /

View File

@ -0,0 +1 @@
This tor was built with relay mode disabled.

View File

@ -0,0 +1,4 @@
ExtORPort 1
Nickname Unnamed
ORPort 2
ServerTransportPlugin bad3 exec /

View File

@ -0,0 +1,6 @@
# Relay PT tests
# Options from relay/transport_config.c
# Try a valid minimal config
ORPort 2
ExtORPort 1
ServerTransportPlugin bad3 exec /

View File

@ -0,0 +1 @@
This tor was built with relay mode disabled.

View File

@ -0,0 +1,6 @@
ExtORPortCookieAuthFile /
ExtORPortCookieAuthFileGroupReadable 1
ExtORPort 1
ServerTransportListenAddr bad3 127.0.0.1:2
ServerTransportOptions bad3 a=b
ServerTransportPlugin bad3 exec /

View File

@ -0,0 +1,9 @@
# Relay PT tests
# Options from relay/transport_config.c
# Try a config with all the options
ExtORPort 1
ExtORPortCookieAuthFile /
ExtORPortCookieAuthFileGroupReadable 1
ServerTransportPlugin bad3 exec /
ServerTransportListenAddr bad3 127.0.0.1:2
ServerTransportOptions bad3 a=b

View File

@ -0,0 +1 @@
This tor was built with relay mode disabled.

View File

@ -0,0 +1,4 @@
ExtORPort 2.2.2.2:1
Nickname Unnamed
ORPort 2
ServerTransportPlugin bad3 exec /

View File

@ -0,0 +1,6 @@
# Relay PT tests
# Options from relay/transport_config.c
# Try a valid config with a risky ExtORPort address
ORPort 2
ExtORPort 2.2.2.2:1
ServerTransportPlugin bad3 exec /

View File

@ -0,0 +1 @@
ExtORPort does not support unix sockets

View File

@ -0,0 +1 @@
This tor was built with relay mode disabled.

View File

@ -0,0 +1,5 @@
# Relay PT tests
# Options from relay/transport_config.c
# Try an invalid config with a unix socket for ExtORPort
ExtORPort unix:/
ServerTransportPlugin bad3 exec /

View File

@ -0,0 +1 @@
This tor was built with relay mode disabled.

View File

View File

@ -0,0 +1,7 @@
# Relay PT tests
# Options from relay/transport_config.c
# Try a valid minimal config, with a bad ServerTransportListenAddr
ORPort 2
ExtORPort 1
ServerTransportPlugin bad3 exec /
ServerTransportListenAddr bad3 [aaaa::bbbb:ccccc]