startTor static method

Future<int?> startTor()

This is a blocking call that will try to start the Tor OP, connect it to the network and get it to be fully bootstrapped. Sometimes the bootstrap process just hangs for no apparent reason so the method will wait for a minute for bootstrap to finish. Returns the socks port on the IPv4 localhost address that the Tor OP is listening on.

Implementation

static Future<int?> startTor() async {
  final int? port = await _channel.invokeMethod('startTor');
  return port;
}