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

Passing Arguments to libtor #42

Open
Oct4Pie opened this issue Dec 23, 2021 · 2 comments
Open

Passing Arguments to libtor #42

Oct4Pie opened this issue Dec 23, 2021 · 2 comments

Comments

@Oct4Pie
Copy link

Oct4Pie commented Dec 23, 2021

I have found a way of passing a bridge to the tor client; however, I still need more customization. I did that by setting a .torrc file in /data/user/0/com.<app>/cache/sifir_sdk/tor. I see that tor starts with

libtor: Starting tor with args: [
12-23 14:24:20.129 30063 30341 D sifir-rs-sdk:     "tor",
12-23 14:24:20.129 30063 30341 D sifir-rs-sdk:     "DataDirectory",
12-23 14:24:20.129 30063 30341 D sifir-rs-sdk:     "/data/user/0/com.test10/cache/sifir_sdk/tor/data",
12-23 14:24:20.129 30063 30341 D sifir-rs-sdk:     "CacheDirectory",
12-23 14:24:20.129 30063 30341 D sifir-rs-sdk:     "/data/user/0/com.test10/cache/sifir_sdk/tor/cache",
12-23 14:24:20.129 30063 30341 D sifir-rs-sdk:     "SocksPort",
12-23 14:24:20.129 30063 30341 D sifir-rs-sdk:     "44209",
12-23 14:24:20.129 30063 30341 D sifir-rs-sdk:     "ControlPort",
12-23 14:24:20.129 30063 30341 D sifir-rs-sdk:     "auto",
12-23 14:24:20.129 30063 30341 D sifir-rs-sdk:     "CookieAuthentication",
12-23 14:24:20.129 30063 30341 D sifir-rs-sdk:     "1",
12-23 14:24:20.129 30063 30341 D sifir-rs-sdk:     "ControlPortWriteToFile",
12-23 14:24:20.129 30063 30341 D sifir-rs-sdk:     "/data/user/0/com.test10/cache/sifir_sdk/tor/ctl.info",
12-23 14:24:20.129 30063 30341 D sifir-rs-sdk:     "ControlPortFileGroupReadable",
12-23 14:24:20.129 30063 30341 D sifir-rs-sdk:     "1",
12-23 14:24:20.129 30063 30341 D sifir-rs-sdk:     "TruncateLogFile",
12-23 14:24:20.129 30063 30341 D sifir-rs-sdk:     "1",
12-23 14:24:20.129 30063 30341 D sifir-rs-sdk:     "Log",
12-23 14:24:20.129 30063 30341 D sifir-rs-sdk:     "info file /data/user/0/com.test10/cache/sifir_sdk/tor/logs/sifir_tor_log.info",
12-23 14:24:20.129 30063 30341 D sifir-rs-sdk:     "Log",
12-23 14:24:20.129 30063 30341 D sifir-rs-sdk:     "err file /data/user/0/com.test10/cache/sifir_sdk/tor/logs/sifir_tor_log.err",
12-23 14:24:20.129 30063 30341 D sifir-rs-sdk: ]

However, I do not know the API for passing custom arguments. Knowing how to do that would be really helpful.
Thanks for your attention.

@gabidi
Copy link
Contributor

gabidi commented Dec 24, 2021

Hey @Oct4Pie , that's actually a nice feature to have.
So would the ability to pass a .torrc file to the module be good enough ? Or do you need to pass specific arguments to libtor ?
Right now initialization arguments (TorServiceParam) are limited to what is needed to get it going, but can be augmented.

Let me know

@Oct4Pie
Copy link
Author

Oct4Pie commented Dec 24, 2021

Thanks for your response, @gabidi. I think both would be great. I think a .torrc file would be cleaner for setting multiple configurations. I only could get .torrc to work on android because iOS does not support environment variables.

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