跳到主要内容

泥猫 (mudcat)

简介​

这是为Mudfish Networks提供的HTTP/TCP/UDP端口共享服务。我们的目标是提供与https://ngrok.io类似目的的服务。

使用此服务,您可以轻松地将内部网络上的服务共享给外部。我们目前支持以下协议:

  • HTTP

  • TCP

  • UDP

使用命令1可以轻松安装和使用它。

下载​

您可以从 https://www.mudcat.io/ 下载该程序。

由于mudcat程序由可执行文件1组成,用户可以轻松下载并运行它。

mudcat 执行选项​

当您运行mudcat程序时,您可以看到下面的屏幕。基本上,mudcat 的用法根据命令的不同略有不同。

$ ./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.

目前支持的命令如下。

  • http

    当您想要转发 HTTP 端口时可以使用此功能。

  • node

    显示用于转发的 mudcat 中继服务器的信息。

  • tcp

    当您想要转发 TCP 端口时可以使用此功能。

  • UDP

    当您想要转发 UDP 端口时可以使用此功能。

基本上,当您运行./mudcat <command> -h时,您可以额外查看该命令提供的帮助信息。

mudcat http 命令​

当您想提供HTTP转发服务时,可以使用该命令。当您只想将通常在内部创建的服务公开给外部时,可以使用此命令。

$ ./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.

支持的子选项包括:

  • --domain <domain>

    如果指定此选项,则可以指定 domain 而不是任意域地址(通常是数字地址)。例如,当指定 --domain abc 时,分配的域地址变为 abc.mudcat.io。

  • --local-addr <ip>

    此选项指定要将 HTTP 转发到的本地地址 (IPv4)。默认值为 127.0.0.1。

    但是,该值不一定指向内部网络地址。如果要指向另一个远程Public IP,可以指定IP。

  • --local-port <port>

    HTTP 指定要转发到的本地端口。默认为 80。

  • --node-cc <cc>

    您可以指定要使用的 mudcat 中继服务器的国家代码。例如,如果您将国家/地区代码指定为 JP,则将自动分配日本的 mudcat 中继服务器。

  • --node-id <nid>

    您可以指定要使用的 mudcat 中继服务器的 unique ID。各中继服务器的unique ID可以通过mudcat node命令获取。

mudcat node 命令​

该命令用于检索 mudcat 中继服务器信息。

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

使用 ./mudcat node 命令时,您可以看到当前正在运行的 mudcat 中继服务器的列表。支持的子选项包括:

  • --json-raw

    中继服务器列表以 JSON 格式输出。

mudcat tcp 命令​

当您想提供TCP转发服务时,可以使用该命令。

$ ./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.

支持的子选项包括:

  • --conn-uuid <uuid>

    当您想要重复使用以前使用过的 remote port 时,可以使用此选项。

    通常情况下,如果使用分配的 remote port 后断开连接,则对应的 remote port 将无法使用,直到其资源被释放。

    但是,如果您知道之前的 Connection UUID,则可以立即重复使用该 remote port。

  • --domain <domain>

    如果指定此选项,则可以指定 domain 而不是任意域地址(通常是数字地址)。例如,当指定 --domain abc 时,分配的域地址变为 abc.mudcat.io。

  • --local-addr <ip>

    此选项指定要将 TCP 转发到的本地地址 (IPv4)。默认值为 127.0.0.1。

    但是,该值不一定指向内部网络地址。如果要指向另一个远程Public IP,可以指定IP。

  • --local-port <port>

    TCP 指定要转发到的本地端口。如果未指定该选项,则使用 --remote-port <port> 的值作为端口信息。

  • --node-cc <cc>

    您可以指定要使用的 mudcat 中继服务器的国家代码。例如,如果您将国家/地区代码指定为 JP,则将自动分配日本的 mudcat 中继服务器。

  • --node-id <nid>

    您可以指定要使用的 mudcat 中继服务器的 unique ID。各中继服务器的unique ID可以通过mudcat node命令获取。

  • --remote-port <port>

    在mudcat中继服务器中,指定TCP port播放listening。

mudcat udp 命令​

当您想提供UDP转发服务时,可以使用该命令。

$ ./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.

支持的子选项包括:

  • --conn-uuid <uuid>

    当您想要重复使用以前使用过的 remote port 时,可以使用此选项。

    通常情况下,如果使用分配的 remote port 后断开连接,则对应的 remote port 将无法使用,直到其资源被释放。

    但是,如果您知道之前的 Connection UUID,则可以立即重复使用该 remote port。

  • --domain <domain>

    如果指定此选项,则可以指定 domain 而不是任意域地址(通常是数字地址)。例如,当指定 --domain abc 时,分配的域地址变为 abc.mudcat.io。

  • --local-addr <ip>

    此选项指定要将 UDP 转发到的本地地址 (IPv4)。默认值为 127.0.0.1。

    但是,该值不一定指向内部网络地址。如果要指向另一个远程Public IP,可以指定IP。

  • --local-port <port>

    UDP 指定要转发到的本地端口。如果未指定该选项,则使用 --remote-port <port> 的值作为端口信息。

  • --node-cc <cc>

    您可以指定要使用的 mudcat 中继服务器的国家代码。例如,如果您将国家/地区代码指定为 JP,则将自动分配日本的 mudcat 中继服务器。

  • --node-id <nid>

    您可以指定要使用的 mudcat 中继服务器的 unique ID。各中继服务器的unique ID可以通过mudcat node命令获取。

  • --remote-port <port>

    在mudcat中继服务器中,指定UDP port播放listening。

发行说明​

0.0.3 (2023-01-21)​

  • 添加了以下新选项:

    • --domain
    • --node-id

0.0.2 (2023-01-20)​

  • 修复了在 Windows 上无法正常工作的问题。

0.0.1 (2023-01-18)​

  • 这是第一个版本。他们表示将实现一个基本的实现,但预计仍然会有许多改进和错误。我们会一点一点地表现出进步。