https://github.com/parmaster/tools
Tools too small for standalone repos
https://github.com/parmaster/tools
Last synced: about 1 year ago
JSON representation
Tools too small for standalone repos
- Host: GitHub
- URL: https://github.com/parmaster/tools
- Owner: parMaster
- Created: 2023-10-25T18:43:40.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-21T21:33:31.000Z (almost 2 years ago)
- Last Synced: 2025-01-30T02:14:13.710Z (about 1 year ago)
- Language: Go
- Homepage:
- Size: 2.43 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Building, installing
Build the binaries:
>make build
Build the binaries and installs them to $GOPATH/bin:
>make install
Uninstall the binaries:
>make uninstall
# Tools
## myip
Prints the external IP address of the router. Note, that it can take up to 128 seconds to return a result.
Can be used in a pipe:
>myip | xargs ping
or
>ping ${myip}
In my network, WhatIsMyIp shows wrong IP address, this tool shows the correct one.
## portmap
Maps an external port to an internal port on the router using NAT-PMP.
> portmap -i 8080 -e 8080
The result is the external IP address and port that is mapped to the internal port:
> 1.1.1.1:8080
```
Usage:
portmap [OPTIONS]
Application Options:
-p, --proto= protocol to use (tcp, udp) (default: tcp) [$PROTO]
-i, --internal= internal port to map [$INTERNAL]
-e, --external= external port to map [$EXTERNAL]
-l, --lifetime= lifetime of the mapping in seconds (default: 3600) [$LIFETIME]
-v, --verbose verbose output (default: false) [$VERBOSE]
Help Options:
-h, --help Show this help message
```