1.1.1 • Published 9 years ago

ip2 v1.1.1

Weekly downloads
31
License
MIT
Repository
github
Last release
9 years ago

Build Status NPM Version NPM Downloads

ip2

Get ip info & manage the hosts files.

Installation

$ npm i -g ip2
# or
$ sudo npm i -g ip2

Example

$ ip2 -h        # print help
$ ip2 -lis      # ip & system info
$ ip2 qq.com    # get dns information
$ ip2 8.8.8.8   # get ip geo location

$ ip2 ls        # list hosts
$ ip2 cat       # print hosts content
$ sudo ip2 add google.txt  # add hosts file to system
$ sudo ip2 use google      # use the hosts file

$ ip2 24           # 255.255.255.0
$ ip2 127.0.0.1    # ipv4 to long
$ ip2 2130706433   # long to ipv4
$ ip2 '! 255.255.255.0'  # 0.0.0.255
$ ip2 '192.168.1.134 or 0.0.0.255'  # 192.168.1.255
$ ip2 '192.168.1.134 mask 255.255.255.0'  # 192.168.1.0
$ ip2 '192.168.1.134 subnet 255.255.255.192'  # subnet information
$ ip2 192.168.1.134/26  # CIDR subnet, same as previous

NOTICE: The sudo is must be used when you operating the hosts file.

Usage

Usage: ip2 [options] [command]

  Commands:

    ls [dir]       list hosts
    cat [hosts]    print hosts contents
    add <file>     add custom hosts to system
    use <hosts>    change system hosts to custom hosts
    rm <hosts>     delete one custom hosts file
    reload         reload used hosts
    reset          reset hosts
    init           init hosts
    *              ip utilities
    help           help & example

  Options:

    -h, --help      output usage information
    -V, --version   output the version number
    -v, --version   get version number
    -f, --force     overwrite file
    -l, --local     get local ip
    -s, --system    get system info
    -i, --internet  get internet ip info
    -c, --chinese   output geo ip in chinese

See MANUAL for details.

Hosts file

Release History

See the CHANGELOG.

License

Copyright (c) 2015 Mark Zhan.

This project is available under the MIT license. See LICENSE for details.

1.1.1

9 years ago

1.1.0

9 years ago

1.0.9

9 years ago

1.0.8

9 years ago

1.0.7

9 years ago

1.0.6

9 years ago

1.0.5

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1-a

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago

0.3.7

9 years ago

0.3.6

9 years ago

0.3.5

9 years ago

0.3.3

9 years ago

0.3.2

9 years ago

0.3.1

9 years ago

0.3.0

9 years ago

0.2.12

9 years ago

0.2.11

9 years ago

0.2.10

9 years ago

0.2.9

9 years ago

0.2.8

9 years ago

0.2.7

9 years ago

0.2.6

9 years ago

0.2.5

9 years ago

0.1.5

9 years ago

0.1.1

9 years ago

0.1.0

9 years ago