We could launch `tor` and try to connect through it to https://check.torproject.org/, and test if it works assuming the default port, 9050, is not in use by something else.

```ruby
require 'socksify/http'
uri = URI.parse('https://check.torproject.org/')
Net::HTTP.SOCKSProxy('127.0.0.1', 9050).start(uri.host, uri.port) do |http|
  http.get(uri.path)
end
```