CLI Usage
If there are errors in the document or suggestions, please leave a message on the Mudfish Forums (https://forums.mudfish.net).
We don't know how many Mudfish users will actually use this menu, but if you do, you are probably an advanced computer user. :-) Nice to meet you.
Please read the following sections carefully as there may be more technical terms used.
Introduction to CLI
Before the Mudfish Launcher was first created, the CLI (Command Line Interface) was the only debugging tool available. However, since most Mudfish settings are now done through the UI, the CLI is rarely used.
However, if you want to analyze Mudfish issues and configure the most hardcore settings, or view internal states that can never be known through the UI, the CLI is currently the only method provided.
Accessing the CLI
To access the CLI, you first need to know the CLI listening IP and port. To find this information:
-
You must log in to Mudfish first.
-
Go to the 'Status -> Process' menu. There will be a section called 'Log Info'. This log info contains messages output by
mudfish.exefrom the time the program first started until now. -
Look at the top of the logs for a line that says
[INFO] Listening the mangement console.... This is the CLI IP/PORT information. The IP is always set to the local network127.0.0.1, and the port is OS auto-assigned.
Now you can connect to the corresponding IP/PORT using the telnet command in the command prompt. For example, if it says 127.0.0.1:35323, you can connect as follows:
C:\> telnet 127.0.0.1 35323
-----------------------------
MUDFISH CLI v2.0.8
-----------------------------
Type 'help' for command list.
Type 'quit' to close CLI session.
CLI Commands
A small mistake with the current CLI commands can cause the Mudfish program to crash with an assert fail. Because the developer wrote this feature to be veeeeery developer-friendly...
The Mudfish Core program is written based on the FreeBSD TCP/IP stack and network framework. (Since I am most familiar with FreeBSD.... cough....) So all the commands provided in the CLI are almost identical to the commands provided in FreeBSD. Of course, the usage is also similar.
Once you have accessed the CLI, try running the help command. You can see a list of currently supported commands.
help
arp Address resolution display and control
connect Test a connection to the remote
help Show this help message
ifconfig Configure network interface parameters
netstat Show network status
ping send ICMP ECHO_REQUEST packets to network hosts
route Manually manipulate the routing tables
quit Exit CLI interface
sysctl Get or set kernel state
If you need a complete explanation for each command, you can search and find it at this link. Except for the connect command, they should work exactly the same as in FreeBSD 8.0 RELEASE.
connect Command
connect
usage: connect ip port
connect 68.180.206.184 80
connection was good (RTT 0.156 secs)
This command attempts a TCP connect(2) connection through the Mudfish virtual interfaces (re(4) or msk(4)). The intention is for debugging to see if a connection through Mudfish is possible to the target IP and PORT.
If the connection fails, an error or Timeout message will be printed, and if successful, the expected RTT value will be output together.