xips

package
v0.0.0-...-f7d7e86 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package pubip gets your public IP address from several services

Index

Constants

View Source
const MaxTries = 3

MaxTries is the maximum amount of tries to attempt to one service.

View Source
const Version = "1.0.0"

Version indicates the version of this package.

Variables

View Source
var APIURIs = []string{
	"http://manager-customer.qixin007.com",
	"https://manager-customer.qixin007.com",
}

APIURIs is the URIs of the services.

View Source
var Timeout = 2 * time.Second

Timeout sets the time limit of collecting results from different services.

Functions

func Client

func Client(c *http.Client)

func Get

func Get() ([]net.IP, []error)

func GetAllIps

func GetAllIps() ([]string, []error)

func GetIPBy

func GetIPBy(dest string) (net.IP, error)

func GetIPStrBy

func GetIPStrBy(dest string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL