Why limiting bandwidth on your Tor relay can stop you from browsing
If you run a relay and a client in the same Tor process, and have some bandwidth limits, once your relay hits its limit and goes into hibernation, your client connections stop too.
When you run a Tor relay and a Tor client in the same process, the parameters set in AccountingMax and BandwidthRate apply to both relay and client functions. Thus you may find that you are unable to browse as soon as your Tor goes into hibernation, signaled by this entry in the log:
Bandwidth soft limit reached; commencing hibernation.
No new connections will be accepted
The solution is to run two Tor processes - one relay and one client, each with its own config. One way to do this (if you are starting from a working relay setup) is as follows:
- A relé Tor torrc file-ban egyszerűen állítsa a SocksPort-ot 0-ra.
- Create a new client torrc file from the torrc.sample and ensure it uses a different log file from the relay. One naming convention may be torrc.client and torrc.relay.
- Módosítsa a Tor kliens programot és relé indító scriptet úgy, hogy tartalmazza a következőt:
-f /path/to/correct/torrc. - In Linux/BSD/macOS, changing the startup scripts to
Tor.clientandTor.relaymay make separation of configs easier.