Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • docker-obfs4-bridge docker-obfs4-bridge
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 5
    • Issues 5
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • The Tor Project
  • Anti-censorship
  • docker-obfs4-bridgedocker-obfs4-bridge
  • Merge requests
  • !2

[#1] Make image more configurable

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged rotor requested to merge rotor/docker-obfs4-bridge:additionalProperties into master Feb 20, 2021
  • Overview 8
  • Commits 1
  • Pipelines 0
  • Changes 3

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:

OBSFS4_ENABLE_ADDITIONAL_VARIABLES=1
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).

TODO:

  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 Feb 20, 2021 by rotor
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: additionalProperties