geo

package module
v0.0.0-...-0bd8da5 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: GPL-3.0 Imports: 0 Imported by: 0

README

GEO

An easy way to manage all your Geo resources.

Support GeoIP/GeoSite code lookup and converting among all popular GeoIP/GeoSite databases.

Install

Requirements:

  • Go 1.20+
go install -v github.com/devsolux/maxmind-geo/cmd/geo@master

Usage

Type geo help for more details.

Look up codes from existing Geo databases

The default directory to find Geo databases is ~/.geo. You can specify it through -D argument.

IP
geo look 223.5.5.5
geo look 2001:250::
Site
geo look example.com
geo look --no-resolve example.com

Supported databases for look command:

  • MaxMind MMDB
  • V2Ray dat GeoIP/GeoSite
  • sing-geosite
  • sing-geoip MMDB
  • Meta-geoip MMDB
Convert
IP
geo convert ip -i <input_type> -o <output_type> -f [output_filename] input_filename
geo convert ip -i v2ray -o meta ./geoip.dat

Available types:

Supported conversion pairs: (Column=From, Row=To)

MaxMind V2Ray-geoip sing-geoip Meta-geoip
MaxMind -
V2Ray -
sing-geoip -
Meta-geoip -

Conversion to MaxMind is not available for legal reasons.
Conversion to V2Ray is on the TODO list.

Site
geo convert site -i <input_type> -o <output_type> -f [output_filename] -c [country code] input_filename
geo convert site -i v2ray -o sing ./geosite.dat

Documentation

Index

Constants

View Source
const (
	Version = "0.1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
cmd
geo
encoding
Package geoip implements functions for parsing and processing GeoIP resource files.
Package geoip implements functions for parsing and processing GeoIP resource files.
Package geosite implements functions for parsing and processing GeoSite resource files.
Package geosite implements functions for parsing and processing GeoSite resource files.

Jump to

Keyboard shortcuts

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