Skip to content

Instantly share code, notes, and snippets.

@imthaghost
Last active March 6, 2022 07:16
Show Gist options
  • Save imthaghost/68a84a720c88e3eb21d9ed3e3046fcf4 to your computer and use it in GitHub Desktop.
Save imthaghost/68a84a720c88e3eb21d9ed3e3046fcf4 to your computer and use it in GitHub Desktop.
MerryGoRound main
func main() {
// configuration for tor client
tor := ht.Tor {
MaxTimeout: 20 * time.Second,
MaxIdleConnections: 10,
}
// new instance of tor client
torClient := tor.New()
// check current requesting IP
torIP1, err := getIP(torClient)
if err != nil {
fmt.Println(err)
}
// give the tor Client a new IP
tor.NewIP()
torIP2, err := getIP(torClient)
if err != nil {
fmt.Println(err)
}
// check
if torIP1 != torIP2 {
fmt.Println("Success")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment