Skip to content

Commit 6f6520c

Browse files
committed
Update README.md to include Vanguards Configuration section and add vanguards-max-security.conf for enhanced security settings. Modify existing vanguards.conf parameters for improved guard management and circuit security. This enhances documentation and provides users with clearer guidance on high-risk service configurations.
1 parent 65bbd03 commit 6f6520c

File tree

3 files changed

+113
-18
lines changed

3 files changed

+113
-18
lines changed

README.md

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
```
21
@@@@@
32
@@@@@@@@@@@@@@@@@
43
@@@@@@@@@@@@@@@ @@@@@
@@ -33,6 +32,7 @@
3332
- [Configuration](#configuration)
3433
- [Security Levels](#security-levels)
3534
- [Advanced Tor Configuration](#advanced-tor-configuration)
35+
- [Vanguards Configuration](#vanguards-configuration)
3636
- [Building from Source](#building-from-source)
3737
- [Installing Prerequisites](#installing-prerequisites)
3838
- [Building Standard Image](#building-standard-image)
@@ -360,6 +360,61 @@ WarnUnsafeSocks 1
360360

361361
> **Note**: When using a custom torrc file, make sure it includes the line `# PORTS` where the port configurations should be inserted. Port mappings are dynamically generated from the `TOR_SERVICE_PORTS` environment variable.
362362
363+
### Vanguards Configuration
364+
365+
OnionDock includes a pre-configured `vanguards.conf` with balanced security settings. For high-risk services like whistleblower sites or sites facing state-level adversaries, we provide a maximum security configuration in `vanguards-max-security.conf`.
366+
367+
**To use maximum security settings:**
368+
```bash
369+
# When using your own volume mounts
370+
cp tor/config/vanguards-max-security.conf tor/config/vanguards.conf
371+
```
372+
373+
**Key Configuration Parameters:**
374+
375+
- **[Global]**
376+
- `control_ip`: Tor control connection IP (default: 127.0.0.1)
377+
- `control_socket`: Path to Unix socket for Tor control (empty = use IP+port instead)
378+
- `control_pass`: Password for Tor control authentication (empty = cookie auth)
379+
- `enable_logguard`: Enables logging protection (true/false)
380+
- `close_circuits`: Automatically closes suspicious circuits
381+
- `enable_pathverify`: Verifies path selection to detect manipulation
382+
- `one_shot_vanguards`: Regenerates guards on restart
383+
- `loglevel`: Log verbosity level (NOTICE, INFO, DEBUG)
384+
385+
- **[Vanguards]**
386+
- `layer1_lifetime_days`: How often to rotate entry guards (lower = more secure)
387+
- `max_layer2_lifetime_hours`: Maximum time to keep middle-layer guards
388+
- `max_layer3_lifetime_hours`: Maximum time to keep exit-layer guards
389+
- `min_layer2_lifetime_hours`: Minimum time before replacing middle-layer guards
390+
- `min_layer3_lifetime_hours`: Minimum time before replacing exit-layer guards
391+
- `num_layer1_guards`: Number of entry guards (more = more secure)
392+
- `num_layer2_guards`: Number of middle-layer guards (more = more secure)
393+
- `num_layer3_guards`: Number of exit-layer guards (more = more secure)
394+
395+
- **[Bandguards]**
396+
- `circ_max_age_hours`: Maximum circuit lifetime (lower = more secure)
397+
- `circ_max_hsdesc_kilobytes`: Maximum descriptor download size before circuit closure
398+
- `circ_max_serv_intro_kilobytes`: Maximum intro point traffic before circuit closure
399+
- `circ_max_megabytes`: Bandwidth limits for circuits (lower = more secure)
400+
- `circ_max_disconnected_secs`: Closes circuits after this many seconds of disconnection
401+
- `conn_max_disconnected_secs`: Closes connections after this many seconds of disconnection
402+
403+
- **[Rendguard]**
404+
- `rend_use_max_use_to_bw_ratio`: Limits excessive use of rendezvous points
405+
- `rend_use_max_consensus_weight_churn`: Limits changes in consensus weight
406+
- `rend_use_close_circuits_on_overuse`: Closes circuits when rendezvous points are overused
407+
- `rend_use_global_start_count`: Minimum consensus count before enabling protections
408+
- `rend_use_relay_start_count`: Minimum relay consensus count before monitoring
409+
- `rend_use_scale_at_count`: Consensus count threshold for scaling protection
410+
411+
- **[Logguard]**
412+
- `log_protocol_warns`: Enables warning on protocol anomalies
413+
- `log_dump_limit`: Maximum number of log lines to dump on anomaly detection
414+
- `log_dump_level`: Verbosity of logs (NOTICE or DEBUG in max security)
415+
416+
> **Security Note**: High-risk services like whistleblower sites, dissident platforms, or sites facing state-level adversaries should use the max security configuration. This offers significantly stronger protection against sophisticated attackers at the cost of some performance.
417+
363418
## Building from Source
364419

365420
If you prefer to build the OnionDock images locally rather than using the pre-built Docker Hub images, follow these instructions.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
[Global]
2+
control_ip = 127.0.0.1
3+
control_socket =
4+
control_pass =
5+
enable_logguard = True
6+
close_circuits = True
7+
enable_pathverify = True
8+
one_shot_vanguards = False
9+
loglevel = DEBUG
10+
11+
[Vanguards]
12+
layer1_lifetime_days = 5
13+
max_layer2_lifetime_hours = 120
14+
max_layer3_lifetime_hours = 12
15+
min_layer2_lifetime_hours = 24
16+
min_layer3_lifetime_hours = 4
17+
num_layer1_guards = 5
18+
num_layer2_guards = 10
19+
num_layer3_guards = 20
20+
21+
[Bandguards]
22+
circ_max_age_hours = 3
23+
circ_max_hsdesc_kilobytes = 5
24+
circ_max_serv_intro_kilobytes = 4
25+
circ_max_megabytes = 50
26+
circ_max_disconnected_secs = 5
27+
conn_max_disconnected_secs = 4
28+
29+
[Rendguard]
30+
rend_use_max_use_to_bw_ratio = 2.0
31+
rend_use_max_consensus_weight_churn = 0.8
32+
rend_use_close_circuits_on_overuse = True
33+
rend_use_global_start_count = 250
34+
rend_use_relay_start_count = 25
35+
rend_use_scale_at_count = 5000
36+
37+
[Logguard]
38+
log_protocol_warns = True
39+
log_dump_limit = 100
40+
log_dump_level = "DEBUG"

tor/config/vanguards.conf

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,30 @@ one_shot_vanguards = False
99
loglevel = NOTICE
1010

1111
[Vanguards]
12-
layer1_lifetime_days = 30
13-
max_layer2_lifetime_hours = 720
14-
max_layer3_lifetime_hours = 72
12+
layer1_lifetime_days = 12
13+
max_layer2_lifetime_hours = 240
14+
max_layer3_lifetime_hours = 24
1515
min_layer2_lifetime_hours = 96
1616
min_layer3_lifetime_hours = 12
17-
num_layer1_guards = 2
18-
num_layer2_guards = 4
19-
num_layer3_guards = 8
17+
num_layer1_guards = 4
18+
num_layer2_guards = 8
19+
num_layer3_guards = 16
2020

2121
[Bandguards]
22-
circ_max_age_hours = 24
23-
circ_max_hsdesc_kilobytes = 30
24-
circ_max_serv_intro_kilobytes = 20
25-
circ_max_megabytes = 300
26-
circ_max_disconnected_secs = 30
27-
conn_max_disconnected_secs = 20
22+
circ_max_age_hours = 8
23+
circ_max_hsdesc_kilobytes = 15
24+
circ_max_serv_intro_kilobytes = 10
25+
circ_max_megabytes = 100
26+
circ_max_disconnected_secs = 10
27+
conn_max_disconnected_secs = 10
2828

2929
[Rendguard]
30-
rend_use_max_use_to_bw_ratio = 7.0
31-
rend_use_max_consensus_weight_churn = 1.5
30+
rend_use_max_use_to_bw_ratio = 3.0
31+
rend_use_max_consensus_weight_churn = 1.0
3232
rend_use_close_circuits_on_overuse = True
33-
rend_use_global_start_count = 1200
34-
rend_use_relay_start_count = 150
35-
rend_use_scale_at_count = 25000
33+
rend_use_global_start_count = 1000
34+
rend_use_relay_start_count = 100
35+
rend_use_scale_at_count = 20000
3636

3737
[Logguard]
3838
log_protocol_warns = True

0 commit comments

Comments
 (0)