A cli tool to communicate and transfer files beetwen computers inside a network.
Note: This is still under heavy development but it's usable and has the core features implemented. However commands and functionality may change with new versions.
Available on: Linux, Windows.
Current version: 0.6.1
- Transfering files
- Sharing files
- Monitoring transfers
Nightfox is a very basic communication and file transfer tool for computers connected inside a network (but not limited to) over IPv4 (at the moment).
This is not your typical chat program, there is no central server in the middle so to fully understand why things are as they are you may need some basic networking skills. Here you connect to IPs directly, there is no login or user creation involved.
The idea behind Nightfox is to be able to communicate and share/transfer data between two or more computers regardless of how low on performance the computer is. It is built over Berkeley sockets and Winsock2, also on linux it needs to change terminal IO through the use of termios. On Windows it uses a few IO system functions which are very standard there. No other dependecies exist at this time.
It uses UDP as it's networking protocol so you need to keep this in mind when using it. File transfers have a mechanism to re-request a package but text-based communication is not guaranteed (but there may be a feature about this in the future) because an UDP package itself is not guaranteed by default.
You can use the network's basic feature like broadcast or multicast to communicate in a group and also share files with multiple peers, and that's a main feature here, hence the usage of the UDP protocol.
Nothing is stopping you from connecting to some IP over the internet, but you will have to do proper port forwarding to get past NAT if you or the peer are behind one of course. Also note that there may be some limitations to receiveing UDP packages from over the internet on some networks (VPN's or mobile). These limitations are not valid when communicating inside your network.
For Linux download the proper tar.gz file and run tar -xvzf nightfox.tar.gz, cd into the folder and execute the binary like ./nightfox.
You may need to run chmod u+x nightfox so you'll be able to execute the binary.
For Windows download the proper zip file for your system, use something like Winzip or equivalent to extract, open a cli to the extracted path and execute nightfox.exe.
Connecting to a peer is done with the /connect <ip> command. Example: /connect 192.168.1.44.
Change the port to which you connect to, using /setport <port>. Example: /setport 4333.
The word connect here doesn't really mean connect as in TCP connections but mearly signaling that you communicate directly to the peticular IP.
You can connect to the broadcast IP of the network (255.255.255.255) or one of the multicast IPs (22.214.171.124) to communicate with others listening on the same 'channel' (broadcast or multicast IP) in a group manner and you can also share files (just files and not folders for now!) from your computer.
Disconnecting is done using the /disconnect command.
If you just want to have the program open a socket and listen to packages sent directly to you, you can use /connect 127.0.0.1 which connects to your loopback address. Note: when attempting to send normal messages you will be sending them to yourself!
Change your name using the /setname <name> command. Example: /setname GreenByte
After you connected to some ip you can just type and send messages straightforward.
Send privat messages to ther IPs even while being connected to broadcast, multicast or any other IPs using /msg <mode dst> <msg> command. Example: /msg -ip 192.168.50.22 some text.
Discover peers that are listening on broadcast or multicast using the /whois [<mode>] command. Example: /whois or /whois -p.
After executing the peer discovery command (and only after!) you can send private messages to peers present in the returned list by specifing the name instead of the IP but this is still under heavy debate. Example: /msg -name GreenByte some text
Transfer a file using the /sendfile <ip> <file> command. Example: /sendfile 192.168.1.22 path_to/file.ext .
There is no limit to the transfer size as packages received are directly written to disk.
While the underlying protocol is UDP there are some mechanisms to ensure transfer completion.
The file needs to be accepted by the receiving peer which is done using the /taccept <transfer ID> command folowed by the transfer id. Example: /taccept 057574R1644EhVhiI4i75E5twaf7TAUu.
The transfer can also be denied using the /tdeny <transfer ID> command. Example: /tdeny 057574R1644EhVhiI4i75E5twaf7TAUu.
Removing a transfer from the upload or download list can be done regardless of it's state using the /rmup <transfer ID> or /rmdown <transfer ID> command. Example:
Listing your downloads, uploads or both is done using /lsdown, /lsup or /lsall commands respectively.
Innformation is listed in a sketchy manner in these cases.
Getting all the information about a specific transfer is done using /tinfo <transfer ID>. Example: /tinfo 057574R1644EhVhiI4i75E5twaf7TAUu
/setname <name>: set username (max 14 characters).
/setport <port>: set port number (between 1 and 65355).
/connect <ip>: connect client to the designated ip and port number.
/disconnect: disconnect client from the designated port and ip number
-p (default): get the peers connected on port with you
-s: get the peers that are sharing on port with you
/msg <mode dst> <msg>
-ip <ip> <msg>: send a private message to peer identified by ip
-name <name> <msg>: send a private message to peer identified by name
/sendfile <ip> <file>: send a file to a peer identified by ip
/downdir <path>: set the download directory
/share <file>: share a file with peers
/unshare <file>: remove a file from share list
/shared [<ip>]: lists shared files by peer, if no argument used lists your shared files
/getfile <ip> <sharefile ID>: downloads a file identified by ID, that is shared by peer identified by ip
/lsup: lists all uploads
/lsdown: lists all downloads
/lsall: lists all downloads and uploads
/rmup <transfer ID>: removes upload identified by transfer ID
/rmdown <transfer ID>: removes download identified by transfer ID
/tinfo <transfer ID>: lists all information about a transfer identifed by transfer ID
/taccept <transfer ID>: accepts a transfer from download list identifed by transfer ID
/tdeny <transfer ID>: denies a transfer from download list identifed by transfer ID
/exit: exit client completely