Last active
March 6, 2022 07:16
-
-
Save imthaghost/68a84a720c88e3eb21d9ed3e3046fcf4 to your computer and use it in GitHub Desktop.
MerryGoRound main
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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