Skip to main content

Mudcat

Introduction

This is an HTTP/TCP/UDP port sharing service provided to Mudfish Networks. It aims to provide a service with a similar purpose to https://ngrok.io.

Using this service, you can easily share services in the internal network to the external. We currently support the following protocols:

  • HTTP

  • TCP

  • UDP

It is easy to install and use by using one command.

Download

You can download the program from https://www.mudcat.io/ link.

Mudcat program is one executable file. You can easily download and run it on your system.

Mudcat options

If you run the mudcat program, you can see the screen as below. Basically The usage of mudcat varies slightly based on the command.

$ ./mudcat 
Usage: mudcat [-vV] <command> [<args>]

Options:
-v # Increase the verbose level.
-V, --version # Show the version.

Commands:
http # Create a HTTP tunnel.
node # Show the mudcat nodes.
tcp # Create a TCP tunnel.
udp # Create a UDP tunnel.

Currently the supported commands are as follows:

  • http

    It can be used when you want to forward the HTTP port.

  • node

    Shows the information of mudcat nodes to be used for forwarding.

  • tcp

    It can be used when you want to forward a TCP port.

  • UDP

    It can be used when you want to forward UDP ports.

Basically, when running ./mudcat <command> -h, you can check more help information provided.

mudcat http command

This command can be used to provide HTTP forwarding service. Commonly it can be used when you simply want to expose a service you are creating internally to the external world.

$ ./mudcat http -h
Usage: mudcat http [options]
--domain <domain> # Specify the domain name to access.
--local-addr <ip> # Specify the local IP to connect. Default
# value is 127.0.0.1
--local-port <port> # Specify the local port. Default value is 80.
--node-cc <cc> # Specify the country code to hint the
# selection of mudcat nodes.
--node-id <nid> # Specify the unique ID of mudcat node.

The supported sub-options include:

  • --domain <domain>

    If this option is specified, the user can directly specify the domain instead of an arbitrary domain address (usually a numeric address).

    For example, when specifying --domain abc, the assigned domain address becomes abc.mudcat.io.

  • --local-addr <ip>

    This option specifies the local address (IPv4) you want HTTP forwarded to. Defaults to 127.0.0.1.

    However, the value does not necessarily point to an internal network address. If you want to point to another remote public IP, you can designate that IP.

  • --local-port <port>

    Specifies the local port you want HTTP forwarded to. Default is 80.

  • --node-cc <cc>

    You can specify the country code of the mudcat node you want to use. For example, if you set the country code as 'JP', the mudcat node in Japan will be automatically assigned.

  • --node-id <nid>

    You can specify the unique ID of the mudcat node you want to use. The unique ID of each relay server can be obtained using mudcat node command.

mudcat node command

This command is used to get mudcat node information.

$ ./mudcat node -h
Usage: mudcat node [--json-raw]
--json-raw # Prints the raw JSON output.

If you use the ./mudcat node command, you can see a list of currently running mudcat nodes. The supported sub-options include:

  • --json-raw

    Outputs the relay server list in JSON format.

mudcat tcp command

This command can be used to provide TCP forwarding service.

$ ./mudcat tcp -h
Usage: mudcat tcp [options]
--conn-uuid <uuid> # Set the connection UUID to reuse.
--domain <domain> # Specify the domain name to access.
--local-addr <ip> # Specify the local IP to connect. Default
# value is 127.0.0.1
--local-port <port> # Specify the local port. If not specified,
# --remote-port value will be used.
--node-cc <cc> # Specify the country code to hint the
# selection of mudcat nodes.
--node-id <nid> # Specify the unique ID of mudcat node.
--remote-port <port> # Specify the remote port.

The supported sub-options include:

  • --conn-uuid <uuid>

    This option can be used when you want to reuse a previously used remote port.

    If you disconnect after using the normally assigned remote port, the remote port will become unusable until the resource is released.

    However, if you know the previous Connection UUID, you can immediately reuse that remote port.

  • --domain <domain>

    If this option is specified, the user can directly specify the domain instead of an arbitrary domain address (usually a numeric address).

    For example, when specifying --domain abc, the assigned domain address becomes abc.mudcat.io.

  • --local-addr <ip>

    This option specifies the local address (IPv4) you wish to TCP forward to. Defaults to 127.0.0.1.

    However, the value does not necessarily point to an internal network address. If you want to point to another remote public IP, you can designate that IP.

  • --local-port <port>

    Specifies the local port you want TCP forwarded to. If this option is not specified, the value of --remote-port <port> is used for port information.

  • --node-cc <cc>

    You can specify the country code of the mudcat relay server you want to use. For example, if you set the country code as 'JP', the mudcat node in Japan will be automatically assigned.

  • --node-id <nid>

    You can specify the unique ID of the mudcat node you want to use. The unique ID of each relay server can be obtained using mudcat node command.

  • --remote-port <port>

    Specifies the TCP port for listening in the mudcat relay server.

mudcat udp command

This command can be used to provide UDP forwarding service.

$ ./mudcat udp -h
Usage: mudcat udp [options]
--conn-uuid <uuid> # Set the connection UUID to reuse.
--domain <domain> # Specify the domain name to access.
--local-addr <ip> # Specify the local IP to connect. Default
# value is 127.0.0.1
--local-port <port> # Specify the local port. If not specified,
# --remote-port value will be used.
--node-cc <cc> # Specify the country code to hint the
# selection of mudcat nodes.
--node-id <nid> # Specify the unique ID of mudcat node.
--remote-port <port> # Specify the remote port.

The supported sub-options include:

  • --conn-uuid <uuid>

    This option can be used when you want to reuse a previously used remote port.

    If you disconnect after using the normally assigned remote port, the remote port will become unusable until the resource is released.

    However, if you know the previous Connection UUID, you can immediately reuse that remote port.

  • --domain <domain>

    If this option is specified, the user can directly specify the domain instead of an arbitrary domain address (usually a numeric address).

    For example, when specifying --domain abc, the assigned domain address becomes abc.mudcat.io.

  • --local-addr <ip>

    This option specifies the local address (IPv4) you wish to UDP forward to. Defaults to 127.0.0.1.

    However, the value does not necessarily point to an internal network address. If you want to point to another remote public IP, you can designate that IP.

  • --local-port <port>

    Specifies the local port you want UDP forwarded to. If this option is not specified, the value of --remote-port <port> is used for port information.

  • --node-cc <cc>

    You can specify the country code of the mudcat relay server you want to use. For example, if you set the country code as 'JP', the mudcat node in Japan will be automatically assigned.

  • --node-id <nid>

    You can specify the unique ID of the mudcat node you want to use. The unique ID of each relay server can be obtained using mudcat node command.

  • --remote-port <port>

    Specifies the UDP port for listening in the mudcat relay server.