Skip to content

fers4t/merryGoRound

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

merryGoRound

GoDoc Test Status Test Coverage

merryGoRound is a simple HTTP Client with rotating IPs via SmartProxy or Tor.

Installation

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.

Usage

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)
	
}

About

Example of how to build a HTTP Client with rotating IPs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 97.5%
  • Shell 2.5%