merryGoRound is a simple HTTP Client with rotating IPs via SmartProxy or Tor.
merryGoRound is compatible with modern Go releases in module mode, with Go installed:
go get github.com/imthaghost/merrygoround/
will resolve and add the package to the current development module, along with its dependencies.
package main
import (
"io/ioutil"
"log"
"time"
"log"
ht "github.com/imthaghost/merryGoRound/pkg/http"
)
func main() {
// Configure a tor client
tor := ht.Tor{
MaxTimeout: 20 * time.Second,
MaxIdleConnections: 10,
}
// new instance of tor client
torClient := tor.New()
// check your IP with AWS
res, _ := torClient.Get("https://checkip.amazonaws.com")
body, _ := ioutil.ReadAll(res.Body)
ip := string(body)
log.Printf("IP: %s", ip)
}