Skip to content
/ wfi Public

A small and simple network troubleshooting tool.

License

Notifications You must be signed in to change notification settings

Kharec/wfi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WFI - wait for it

As a (Sys|Dev)Ops, I'm oftenly annoyed to run multilple nc -v or telnet commands when I'm troubleshooting a network issue.

Yes, watch command exists. But where's the fun in that.

I wrote this little piece of software that loops until a connection is succeeded.

Build

➜  make
➜  make install # push the binary to ~/bin folder

Usage

NAME:
   wait for it - try to join a host on a port until connection succeeded

USAGE:
   wfi <protocol> <host> <port>

COMMANDS:
   help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --help, -h  show help

Example

In a terminal window, I'm running :

➜  wfi tcp localhost 3306
(nothing happen...)

Then in another window, I'm running:

➜  docker run -d --name mariatest -p 3306:3306 --env MARIADB_ROOT_PASSWORD=my-secret-pw  mariadb:latest

To create the container needed for testing, you can also run :

➜  make test-dependency

Either way, in the first window we now have :

2024/03/03 12:05:25 connection succeeded
➜

License

MIT Licence (a copy is in this repository)

About

A small and simple network troubleshooting tool.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages