iCepa / Tor.framework

Tor framework for the iCepa project
Other
249 stars 55 forks source link

How to specify custom torrc location? #89

Closed Fonta1n3 closed 10 months ago

Fonta1n3 commented 10 months ago

I'd like to specify a custom torrc location. Not sure how to accomplish this via the framework, I know you can run a cli arg -f <path to torrc> when running tor, is there anyway to accomplish this via the framework?

EDIT: fwiw I just saw you can now add a hidden service via the config options (config.hiddenServiceDirectory = <URL>) directly which solves my issue.

tladesignz commented 10 months ago

Since Tor is not started as an executable binary but in a thread, I don't think you can actually set a torrc file. I never tried, though.

However, you can set all flags, you can find in the documentation via Tor.framework using the TORConfiguration class.

Either, there's an explicit option for it available, or you can use the #options dictionary or the #arguments array.

See the #compile method to understand how you can achieve what you need.