Closed stevenroose closed 5 years ago
You will need to call into a C function from rust
https://github.com/Blockstream/gdk/blob/796d75d7f203c0469a5519c6b9001f5d7666656d/src/ga_tor.cpp#L509
To call into C you could do something like this https://gist.github.com/RCasatta/9b5a01db5e8520b77e553b1b9879b895
that's just to start tor - then you need to read a cookie and talk to its socket to find out socks5 and state. There may be a rust library/bindings there
Note: this requires to optionally accept a datadir paramenter in gdk_init
Functions to map:
tor_main_configuration_new tor_main_configuration_set_command_line tor_run_main tor_main_configuration_free
No longer necessary