Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup ORPort to be IPv4Only #16

Open
fabge opened this issue Oct 17, 2021 · 1 comment
Open

Setup ORPort to be IPv4Only #16

fabge opened this issue Oct 17, 2021 · 1 comment

Comments

@fabge
Copy link

fabge commented Oct 17, 2021

I would like to set the ORPort with the IPv4Only flag like so:
- OPPort = 9001 IPv4Only
Unfortunately currently the environment variable ORPort is split by whitespace, which then creates two separate ORPort entries in the torrc file.

What would be the best way to achieve this? I currently have two ideas:

  • number the ports in the environment variables like ORPort1 = xyz, ORPort2 = abc and parse them in order.
  • expose the torrc file in a file mount and allow manual editing without overwriting it on Container creation
@fabge fabge changed the title Der ORPort to be IPv4Only Setup ORPort to be IPv4Only Oct 17, 2021
@iluvatyr
Copy link

You could mount the torrc file as readonly in a directory of your choice and then edit it yourself with any editor. Then the container wont be able to overwrite it again and you can just add the IPv4Only flag manually. But after you do this, the container wont be able to change the torrc file anymore, even if you start it with other options in the environmentvariables, so you would have to write it manually into the torrc file always.

docker run -d -p 9001:9001 -p 9030:9030 -e "OR_PORT=9001" -e "DIR_PORT=9030" -e "NICKNAME=username" -e "BANDWIDTH_RATE=1024 KBytes" -e "BANDWIDTH_BURST=2048 KBytes" -e "MAX_MEM=512 MB" -e "HOST_UID=$UID" -v /mountpoint/tor-data:/home/tor/data:Z -v /mountpoint/tor-data/torrc:/home/tor/torrc:ro --name tor-middle-relay brunneis/tor-relay-arm:x86-64 middle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants