Skip to content

[#1] Make image more configurable

rotor requested to merge rotor/docker-obfs4-bridge:additionalProperties into master

In addition to basic variables OR_PORT, PT_PORT and EMAIL, it is now possible to enable additional variables support for extra configuration tweaks. Having OBSFS4_ENABLE_ADDITIONAL_VARIABLES set to 1, all the variables prefixed with OBSFS4V_ (with their values) are passed to torrc (with prefix removed). That make it possible to configure virtually everything using environment variables.

For example:

OBSFS4V_AccountingStart=day 0:00
OBSFS4V_AccountingMax=10 GBytes
OBSFS4V_RelayBandwidthRate=200 KBytes
OBSFS4V_RelayBandwidthBurst=1000 KBytes

will generate:

AccountingStart day 0:00
AccountingMax 10 GBytes
RelayBandwidthRate 200 KBytes
RelayBandwidthBurst 1000 KBytes

at the end of /etc/tor/torrc. The variables or put after the basic variables and or displayed (with the corresponding values) during the container start. For the majority of cases, displaying set values at startup is very useful, however, for some sensitive values it might lead to a potential security concern. We might wait for the first request of that kind and enhance the script to define another property to disable value printing (at the cost of more complex and less readable scripting).


  1. I am not good at naming. Feel free to propose some better prefix and/or variable names.
  2. The docker bridge setup guide has to be updated - I can do that once we are ready with merging that MR.
  3. It would be probably good to wait with the next image publishing until some IPv4/6 related issues in 0.4.5.x (such as tpo/core/tor#40302) which might affect running in a containerized environment are effectively fixed.

Fixes #1 (closed).

Edited by rotor

Merge request reports