Modflared
无需单独安装 cloudflared,即可自动连接到 Cloudflare 隧道。
此模组尚未完全测试!
使用方法
要使用此模组,你的操作系统必须是 Windows、Linux 或 MacOS。
其他资源
如需更详细的说明,你可以阅读 Adalie 的博客文章。
配置 Cloudflared
你需要在服务器上设置 cloudflare 才能使此功能正常工作。网上有许多关于如何设置的指南。
请确保在你的配置文件(可能位于 /etc/cloudflared/config.yml)中包含以下行:
- hostname: example.domain.net
service: tcp://localhost:25565
将 example.domain.net 替换为你想要使用的正确子域名。如果你运行多个实例(例如使用 docker),请将端口 25565 更改为你正在使用的任意端口。
重启 cloudflare 守护进程(sudo systemctl restart cloudflared)以应用更改。
添加正确的 DNS 记录:前往 Cloudflare 仪表板,进入你的网站和 DNS 记录页面,然后添加一个新的 CNAME DNS 记录,填写你的子域名,并将目标设置为 <tunnelID>.cfargotunnel.com,其中隧道 ID 可在 cloudflare config.yml 文件中找到。
示例 DNS 记录

对于玩家
如果你的服务器管理员已正确配置了服务器,你应该可以像往常一样连接到服务器。 无需额外配置。
如果服务器管理员未正确配置服务器,你需要将其服务器添加到 modflared 配置文件夹中的 forced_tunnels.json 文件里。
示例配置 (modflared/forced_tunnels.json)
["example.domain.net", "example2.domain.net"]
服务器管理员(设置 cloudflared)
按照上述“配置 Cloudflared”部分所述安装 Cloudflared。
告知 modflared 使用 cloudflared 连接到你的服务器
为你希望玩家连接的域名(例如 example.domain.net)创建一个 TXT DNS 记录,值可以是以下之一:
cloudflared-use-tunnel- 这将使 modflared 直接通过该域名连接隧道(例如example.domain.net)cloudflared-route=<route>- 这将使 modflared 通过<route>的域名下的隧道进行连接。 (例如,设置cloudflared-route=example2.domain.net将使 modflared 连接到example2.domain.net上的隧道,而不是example.domain.net)
Modflared
Automatically connects you to a Cloudflare tunnel without having to install cloudflared separately.
This mod has not yet been fully tested!
How to use
To be able to use the mod you have to be on the operating system Windows, Linux, or MacOS.
Other resources
For more detailed instructions, you can read Adalie's blog post.
Configuring Cloudflared
You need to set up cloudflare on your server for this to work. There's plenty of guides on how to do this elsewhere.
Make sure in your config file (possibly in /etc/cloudflared/config.yml) you have the lines:
- hostname: example.domain.net
service: tcp://localhost:25565
Replace example.domain.net with the correct subdomain you want to use. If you're running multiple instances (eg. with docker), change the port 25565 to whatever port you're using.
Restart the cloudflare daemon (sudo systemctl restart cloudflared) to apply the changes.
Add the correct DNS entry: go to Cloudflare dashboard, go to your website and DNS entries, then add a new CNAME DNS entry with your subdomain and set the target to <tunnelID>.cfargotunnel.com, with the tunnel ID found in the cloudflare config.yml file.
Example DNS Entries

For Players
If your server admin has properly configured their server you should be able to connect to the server as usual. No extra configuration is needed.
If your server admin has not properly configured their server, you will need to add their server to the forced_tunnels.json file in the modflared config folder.
Example configuration (modflared/forced_tunnels.json)
["example.domain.net", "example2.domain.net"]
Server Admins (Setting Up cloudflared)
Install Cloudflared as described in the “Configuring Cloudflared” part above.
Telling modflared to use connect to your server using cloudflared
For the hostname that you want your players to connect to (eg. example.domain.net), create a TXT dns record with either of the following values:
cloudflared-use-tunnel- This will make modflared connect to the tunnel on the hostname itself (eg.example.domain.net)cloudflared-route=<route>- This will make modflared connect to the tunnel under the hostname of<route>. (ex. settingcloudflared-route=example2.domain.netwill make modflared connect to the tunnel onexample2.domain.netinstead ofexample.domain.net)
下载 Modflared
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Modflared
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Modflared
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Modflared
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Modflared
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Modflared
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Modflared
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Modflared
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Modflared
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Modflared
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
添加区块认领和玩家组队功能,并与 Xaero's Minimap 和 World Map 集成
模组
添加全屏世界地图,显示你在世界中已探索的区域。与 Xaero's Minimap 搭配使用效果极佳。
评论 0
登录后参与评分
还没有评论,来抢沙发吧