3

Is there a way to specify a bridge while starting Tor, from command line? I'm working on a script that runs multiple instances of Tor and I find it easier to add the bridge (all the instances are going to use the same bridge) on the command that runs the instance itself, instead of editing the torrc file after.

Thank you all in advance

1

You can write the information into some files, say bridge.1, bridge.2 etc. Inside the file are lines with bridges like

Bridge 127.0.0.1:4567 0123456789ABCDEF

Besides this bridge files you should also have a torrc file all other settings. Now you can start the Tor software with a line like

tor --defaults-torrc torrc -f bridge.1

The first option takes your default torrc as argument and is always the same. The second option contains the file with bridge information. You can vary this file depending which bridges you want to use.

  • 1
    Hm? Yes, you can pass bridges via the commandline, just like any other Tor config option. Just do: /path/to/tor usebridges 1 bridge "127.0.0.1:4567 0123456789ABCDEF". (You'll need to use quotes so the shell doesn't mangle it.) – Roger Dingledine Apr 17 '16 at 6:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.