弃用通知
本项目已不再积极维护。
由于开发团队精力有限,我们很遗憾地不得不暂停本项目的进展,感谢您的理解。
我们推荐使用 e4mc 作为替代方案,它提供了类似的功能集。
感谢您的支持 :)
此致, Alujjdnd/Flooflez

Ngrok LAN
需要帮助!
我们正在尝试将此模组移植到 QuiltMC,非常感谢已经做出贡献的朋友们!不过,我们希望很快能有专为 Quilt 设计的配置库可用,因为我们的模组需要编辑配置文件,我们希望为用户尽可能简化这一过程。
简介
Ngrok LAN 是一个 Fabric 模组,允许你通过点击新的“开放公共服务器”按钮,与全球的朋友分享你的单人世界!该模组使用 Ngrok(一项免费服务)来简化服务器的创建,作为将你的连接“隧道”到互联网的主要服务,并在你点击“开放公共服务器”后生成一个链接供你的朋友加入。
更多关于 Ngrok-LAN 的工作原理,请查看 什么是 Ngrok。
安装/快速开始
依赖项
该模组需要以下模组:
安装 Fabric Loader 和 Ngrok-LAN
- 前往 FabricMC 网站 并下载最新的安装程序
- 运行 JAR 文件,会弹出一个窗口。选择正确的 Minecraft 版本和加载器(该模组目前需要 Minecraft v1.18.2 和 loader v0.13.3),然后点击“Install”。
- 启动器的菜单中将创建一个新的游戏版本和配置文件,你现在可以使用它来启动 Fabric。
- 将模组 JAR 文件(可在 Releases 下找到)放入你的“mods”文件夹中,同时放入 ClothConfig API 和 ModMenu 的 JAR 文件。(Fabric API JAR 文件应已在上一节所述的 mods 文件夹中)
- 运行第 3 步中新安装的配置文件,Ngrok LAN 应该就能加载了
配置 Ngrok-LAN
| 字段 | 描述 |
|---|---|
| "Enabled?" | 这将启用/禁用模组,你可以配置是否与世界共享给 Ngrok |
| "Ngrok Auth Token" | 这是输入你的 Ngrok 身份验证令牌的字段,请参阅 获取你的认证令牌 |
| "Region" | 在这里你可以选择要使用的 Ngrok 数据中心区域,请使用离你最近的区域以最小化延迟 |
| "Require Authentication" | 勾选此框将以在线模式启动服务器。如果取消勾选,服务器将以离线模式启动。这主要用于其他玩家使用盗版 Minecraft 账户的情况。 |
| "Spawn Protection Radius" | 防止非 OP 玩家在出生点周围 X 个方块内破坏或放置方块 |
Ngrok 区域
| 代码 | 区域 |
|---|---|
| US | 美国 |
| EU | 欧洲 |
| AP | 亚洲/太平洋 |
| AU | 澳大利亚 |
| SA | 南美洲 |
| JP | 日本 |
| IN | 印度 |
启动 Ngrok LAN
- 确保 Ngrok LAN 已启用,身份验证令牌有效,并且选择了正确的区域
- 打开一个新的单人世界,然后点击“Open to LAN”
- 配置游戏模式以及是否允许作弊
- 按下“Open Public Server”
- 聊天栏中应出现“Ngrok service initiated successfully”的消息,并伴有黄色高亮的链接
- 如果没有,请检查下面的 常见问题
- 链接会自动复制到剪贴板,现在可以分享给你的朋友
- 其他人只需将此作为服务器 IP 放入他们的多人游戏列表中,即可加入世界
获取你的 Ngrok 身份验证令牌
- 前往 ,注册一个新的免费账户
- 在仪表板上,左侧菜单栏中,点击 Getting Started > Your Auth Token
- 复制身份验证令牌,并将其放入 Ngrok LAN 中 (不要将此令牌分享给其他人)
命令
| 命令 | 描述 |
|---|---|
/op <用户名> |
赋予指定玩家服务器管理员权限。 |
/deop <用户名> |
移除指定玩家的服务器管理员权限。 |
| /whitelist add <用户名> | 将玩家配置文件添加到白名单中。该玩家无需在线。 |
/whitelist on |
启用服务器的白名单功能。 |
|---|---|
/whitelist off |
禁用服务器的白名单功能。 |
/whitelist remove |
从白名单中移除玩家资料。该玩家无需在线。 |
/whitelist list |
显示白名单中的所有玩家资料。 |
| /whitelist reload <username> | 从磁盘重新加载 whitelist.json 中的玩家配置文件列表(当 whitelist.json 在 Minecraft 外部被修改时使用)。 |
常见问题
| 错误信息 | 解决方法 |
|---|---|
| 尝试以一种被其访问权限禁止的方式访问套接字。 | 在“服务”程序中重启“主机网络服务”。 |
| 您指定的 authtoken 看起来不像一个有效的 ngrok 隧道 (ERR_NGROK_105) | 检查您的 auth token 是否有效,并且已正确输入到模组配置中。 |
| 您的账户限制为 <NUMBER> 个同时运行的 ngrok 代理会话... | 请检查是否正在使用此认证令牌运行其他隧道,如果仍然遇到此错误,请尝试更改区域。 |
- 如需查看更多错误、错误代码及其解决方法,请参阅 Ngrok 文档
其他问题
请在 Issues 中提交新议题。
Ngrok 是什么?
Ngrok 是一项免费服务,可将你在本地运行的应用程序暴露给互联网,而无需进行端口转发。 通常,在设置 Minecraft 服务器时,你需要启动服务器,并通过路由器“转发”你的端口。端口转发会将你的服务器“发布”到互联网上,这样任何拥有你 IP 地址的人都可以加入。你可以将其理解为路由器将来自你的服务器(属于你本地网络)的网络数据包“转发”给你的朋友(属于更广泛的互联网)。
然而,使用 Ngrok 时,我们不需要转发端口。所有互联网流量都通过一个应用程序(在本例中为 Ngrok-LAN),然后经过其数据中心路由。Ngrok 会提供一个链接作为回报,我们可以将该链接提供给朋友,让他们连接到我们的服务器。这不需要你在端进行任何其他配置——只要你有网络连接和一个 Ngrok 账户,你就可以将单人世界托管给你的全球好友。
Ngrok 账户要求
模组仅需要一个免费的 Ngrok 账户。Ngrok 的免费套餐允许你同时保持 1 个免费在线隧道,这意味着,使用一个免费的 Ngrok 账户,你一次只能托管 1 个 Ngrok-LAN 服务器。付费套餐允许你使用自定义域名和更多的并发在线隧道,但此模组目前尚不支持自定义域名。
更多定价信息,请参阅 Ngrok 官网。
已知不兼容项
请参阅 Incompatibilities 以获取不兼容模组的列表。
目前,仅 Proximity Voice Chat 模组存在不兼容问题。这一问题不太可能得到修复。
TODO
- 移植到 QuiltMC(欢迎联系并帮助我们!)
- 1.17.1 版本构建
- 1.19 版本构建
许可证
本模组在 MIT 许可下提供。
DEPRECATION NOTICE
This project is no longer actively maintained.
Due to a lack of bandwidth in the development team, we've unfortunately had to halt progress on this project, we appreciate your understanding.
We recommend alternatives such as e4mc for a similar featureset.
Thanks you for your support :)
Kind regards, Alujjdnd/Flooflez

Ngrok LAN
Help Needed!
We are trying to port this mod to QuiltMC, many thanks to those who have contributed already! However, we are hope that a Quilt specific config library will become available to use soon, since our mod requires editing a config file we want the process to be as easy as possible for our users.
Introduction
Ngrok LAN is a Fabric mod that enables you to share your singleplayer world with your friends across the globe, all via clicking on the new "Open Public Server" button! This mod uses Ngrok, a free service to ease the creation of servers, as the main service to "tunnel" your connection to the internet, and will generate a link for your friends to connect to after you click on "Open Public Server".
For more on how Ngrok-LAN works, check out What is Ngrok.
Installation/Quick Start
Dependencies
The mod requires the following mods:
Install Fabric Loader and Ngrok-LAN
- Go to the FabricMC website and download the latest installer
- Run the JAR, a window will pop up. Choose the correct version of Minecraft and loader (this mod currently requires Minecraft v1.18.2 and loader v0.13.3), and click on "Install".
- A new game version and profile will be created in the launcher's menu, which you can now use to launch Fabric.
- Put the mod JAR (available under Releases) into your "mods" folder, along with the ClothConfig API and ModMenu JARs. (The Fabric API JAR should already be in your mods folder from the previous section)
- Run the newly installed profile from step 3, and Ngrok LAN should load
Configuring Ngrok-LAN
| Field | Description |
|---|---|
| "Enabled?" | This will enable/disable the mod, so you can configure whether the world is shared with Ngrok |
| "Ngrok Auth Token" | This is the field to input your Ngrok auth token, see getting your auth token |
| "Region" | This is where you can select the region of the Ngrok datacenter that you wish to use, use ones that are closest to you to minimise latency |
| "Require Authentication" | Ticking this box will start the server in online mode. If this box is unchecked, the server will be started in offline mode. This is mainly for when the other players are using cracked Minecraft accounts. |
| "Spawn Protection Radius" | Prevents non-opped players from breaking and placing blocks within X blocks of spawn |
Ngrok Regions
| Code | Region |
|---|---|
| US | United States |
| EU | Europe |
| AP | Asia/Pacific |
| AU | Australia |
| SA | South America |
| JP | Japan |
| IN | India |
Starting Ngrok LAN
- Make sure that Ngrok LAN is enabled, the auth token is valid, and the correct region is selected
- Open a new singleplayer world, and click on Open to LAN
- Configure the game mode and whether to allow cheats
- Press on "Open Public Server"
- The message "Ngrok service initiated successfully" should appear in chat, with a link highlighted in yellow
- If not, check common issues below
- The link is automatically copied to your clipboard, and can now be shared with your friends
- Other people just need to put this as a server IP into their multiplayer list, and join the world
Getting your Ngrok Auth Token
- Go to , and sign up for a new free account
- On the dashboard, on your left-hand side menu, click on Getting Started > Your Auth Token
- Copy the auth token, and put this into Ngrok LAN (don't share this token with other people)
Commands
| Command | Description |
|---|---|
/op <username> |
Gives the specified player server operator status. |
/deop <username> |
Removes server operator status from specified player. |
/whitelist add <username> |
Adds the player profile(s) to the whitelist. The player does not need to be online. |
/whitelist on |
Enables the server's use of a whitelist. |
/whitelist off |
Disables the server's use of a whitelist. |
/whitelist remove |
Removes the player profile(s) from the whitelist. The player does not need to be online. |
/whitelist list |
Displays all player profiles in the whitelist. |
/whitelist reload <username> |
Reloads the list of player profiles in whitelist.json from disk (used when whitelist.json has been modified outside of Minecraft). |
Common Issues
| Error Message | Resolution |
|---|---|
| An attempt was made to access a socket in a way forbidden by its access permissions. | Restart "Host Network Service" under the "Services" program |
| The authtoken you specified does not look like a proper ngrok tunnel (ERR_NGROK_105) | Check that your auth token is valid, and is correctly inputted into the mod config |
| Your account is limited to <NUMBER> simultaneous ngrok agent session... | Check that you are not running any other tunnels with this auth token, try change to regions if you are still getting this error |
- For more errors, error codes and their resolution, check the Ngrok docs
Other Issues
Please open a new issue in Issues
What is Ngrok?
Ngrok is a free service that exposes your applications running locally to the internet, without port forwarding. Usually, when setting up a Minecraft server, you would have to open the server, and "forward" your port through your router. Port forwarding "publishes" your server to the internet, so anyone with you IP can join. Think of this as your router "forwarding" the network packets from your server (part of your local network) to your friends (part of the wider internet).
Using Ngrok, however, we don't need to forward the port. All the internet traffic is routed through an application ( Ngrok-LAN in this case), then their datacentres. Ngrok provides us with a link in return, that we can give to our friends to connect to our server. This doesn't require any other configuration on your side - as long as you have internet, and an Ngrok account, you can host your singleplayer world to your friends across the globe.
Ngrok Account Requirements
The mod only requires a free Ngrok account. The free tier for Ngrok allows you to have 1 free online tunnel simultaenously, which means that, with one Ngrok free account, you can only host 1 Ngrok-LAN server at the same time. The paid tiers allows you to have custom domains and more simultaenous online tunnels, but custom domains are not yet supported in this mod.
More pricing info please refer to Ngrok's website
Known Incompatibilities
Please refer to Incompatibilities to find a list of incompatible mods.
Currently, only Proximity Voice Chat mods are incompatible. This is unlikely to be fixed.
TODO
- Port to QuiltMC (Please reach out and help us!)
- 1.17.1 Build
- 1.19 Build
License
This mod is available under the MIT license.
下载 Ngrok LAN
下载 Ngrok LAN
下载 Ngrok LAN
下载 Ngrok LAN
下载 Ngrok LAN
下载 Ngrok LAN
下载 Ngrok LAN
下载 Ngrok LAN
下载 Ngrok LAN
下载 Ngrok LAN
- 移植至 1.20.2
- 更新包装器版本
- 修复了所有服务器上均显示“关闭服务器”按钮的 bug
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
AE2:一款流行的自动化与存储模组
模组
那是什么?一个 Waila/Hwyla 的分支。
评论 0
登录后参与评分
还没有评论,来抢沙发吧