A lightweight and simplistic Tor library for golang

go get

import ""


t := tor.TorConnection{"", 9050, 9051} // tor host, SOCKS5 port, Control Port
tor_con, err := t.Connect("", 80)

// Now you can use tor_con as a normal net.Dial socket!
/* do stuff.... */

t.Refresh("your tor password") 

  Replace with your control port password
  t.Refresh() will return (bool, error)
  If bool = false, the fresh failed and the error will be not be nil
  ok, err = t.Refresh("your tor password")

// Now you have a new IP!

tor_con, err = t.Connect("", 53) // It can also work with IPs!


View Github