All Projects → GlenDC → go-external-ip

GlenDC / go-external-ip

Licence: MIT license
a Golang library to get your external ip from multiple services

Programming Languages

go
31211 projects - #10 most used programming language
Roff
2310 projects

Projects that are alternatives of or similar to go-external-ip

IPpy
🚀 Ping IP addresses and domains in parallel to find the accessible and inaccessible ones.
Stars: ✭ 54 (-1.82%)
Mutual labels:  ipv6, ipv4, ip
private-ip
Check if IP address is private.
Stars: ✭ 26 (-52.73%)
Mutual labels:  ipv6, ipv4, ip
captcp
A open source program for TCP analysis of PCAP files
Stars: ✭ 110 (+100%)
Mutual labels:  ipv6, ipv4, ip
bacnet-stack
BACnet Protocol Stack library provides a BACnet application layer, network layer and media access (MAC) layer communications services.
Stars: ✭ 199 (+261.82%)
Mutual labels:  ipv6, ipv4, ip
Aggregator
A stand-alone class implementation of the IPv4+IPv6 IP+CIDR aggregator from CIDRAM.
Stars: ✭ 19 (-65.45%)
Mutual labels:  ipv6, ipv4, ip
Ship
A simple, handy network addressing multitool with plenty of features
Stars: ✭ 81 (+47.27%)
Mutual labels:  ipv6, ipv4, ip
Php Ip Tools
Useful tools for IP manipulations
Stars: ✭ 152 (+176.36%)
Mutual labels:  ipv6, ipv4, ip
Geolocate-IP-Browser-Extension
A browser extension, which shows you the origin of your IP address.
Stars: ✭ 21 (-61.82%)
Mutual labels:  ipv6, ipv4, ip
ip
Immutable value object for IPv4 and IPv6 addresses, including helper methods and Doctrine support.
Stars: ✭ 212 (+285.45%)
Mutual labels:  ipv6, ipv4, ip
Ip
🌏根据IpV4、IpV6地址获取定位信息的PHP🐘组件 PHP components that obtain location information based on IpV4, IpV6 addresses
Stars: ✭ 23 (-58.18%)
Mutual labels:  ipv6, ipv4, ip
Iptools
PHP Library for manipulating network addresses (IPv4 and IPv6)
Stars: ✭ 163 (+196.36%)
Mutual labels:  ipv6, ipv4, ip
Exabgp
The BGP swiss army knife of networking
Stars: ✭ 1,713 (+3014.55%)
Mutual labels:  ipv6, ipv4
Aliddns
aliyun ddns for golang【阿里云DDNS服务,用来将自己的动态IP同步到自己的域名解析服务器,安装方便,配置简单,默认支持Linux和MacOS以后台服务方式持续运行】
Stars: ✭ 136 (+147.27%)
Mutual labels:  ipv6, ipv4
Pytricia
A library for fast IP address lookup in Python.
Stars: ✭ 140 (+154.55%)
Mutual labels:  ipv6, ipv4
Ip Num
A TypeScript/JavaScript library for working with ASN, IPv4, and IPv6 numbers. It provides representations of these internet protocol numbers with the ability to perform various IP related operations like parsing, validating etc. on them
Stars: ✭ 113 (+105.45%)
Mutual labels:  ipv6, ipv4
Nftlb
nftables load balancer
Stars: ✭ 147 (+167.27%)
Mutual labels:  ipv6, ipv4
Netpwn
Tool made to automate tasks of pentesting.
Stars: ✭ 152 (+176.36%)
Mutual labels:  ipv6, ipv4
Cidrchk
CLI tool for CIDR range operations (check, generate)
Stars: ✭ 103 (+87.27%)
Mutual labels:  ipv6, ipv4
Firewall
ASP.NET Core middleware for IP address filtering.
Stars: ✭ 159 (+189.09%)
Mutual labels:  ipv6, ipv4
Ddns
🚩 自动更新域名解析到本机IP(支持dnspod,阿里DNS,CloudFlare,华为云,DNSCOM...)
Stars: ✭ 2,582 (+4594.55%)
Mutual labels:  ipv6, ipv4

Go External IP Go Workflow Status GoDoc Go Report Cardlicense

A Golang library to get your external ip from multiple services.

TODO

Docs

https://godoc.org/github.com/GlenDC/go-external-ip

Usage

Using the library can as simple as the following (runnable) example:

package main

import (
    "fmt"
    externalip "github.com/glendc/go-external-ip"
)

func main() {
    // Create the default consensus,
    // using the default configuration and no logger.
    consensus := externalip.DefaultConsensus(nil, nil)

    // By default Ipv4 or Ipv6 is returned,
    // use the function below to limit yourself to IPv4,
    // or pass in `6` instead to limit yourself to IPv6.
    // consensus.UseIPProtocol(4)

    // Get your IP,
    // which is never <nil> when err is <nil>.
    ip, err := consensus.ExternalIP()
    if err == nil {
        fmt.Println(ip.String()) // print IPv4/IPv6 in string format
    }
}

Please read the documentation for more information.

exip

This library also comes with a standalone command line application, which can be used to get your external IP, directly from your terminal.

install

$ go install github.com/glendc/go-external-ip/cmd/exip

usage

$ exip -h
Retrieve your external IP.

Usage:
    exip [flags]

Flags:
  -h help
        show this usage message
  -p uint
        IP Protocol to be used (0, 4, or 6)
  -t duration
        consensus's voting timeout (default 5s)
  -v    log errors to STDERR, when defined
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].