Hi,
I’m trying to use arti_client API to connect to my Onion hidden service but I can’t create a TorClientConfig object with allow_onion_addrs set to TRUE. If I try to build a TorClientConfig with the following code:
let config = TorClientConfig::builder().address_filter().allow_onion_addrs(true).build();
I get ClientAddrConfig instead of a TorClientConfig.
Is this the right behaviour? How can I create a TorClientConfig with allow_onion_addrs set to TRUE?
Best regards,
Sérgio Carvalho
nickm
2
Hi!
The address_filter()
function returns a &mut
reference to a sub-builder of type ClientAddrConfigBuilder
. (That sub-builder is a member of the TorClientConfigBuilder
.)
I think what you want to do here is more like:
let mut cfg_builder = TorClientConfig::builder();
cfg_builder.address_filter().allow_onion_addrs(true);
let config = cfg_builder.build();
Hope this helps!
1 Like