如何通过Cloudflare Agrotunnel隧道或为多个端口服务?

发布于 2025-02-08 12:33:58 字数 294 浏览 2 评论 0原文

我在端口8081& 8082下面

http://localhost:8081   --> app1
http://localhost:8082   --> app2

我想要app1app2在单个Cloudflare免费临时域上运行。

我已经搜索过此搜索,发现可以使用配置文件完成,请从A到Z向我解释

或解决我的问题,因为我在这个领域是新的。

I had two different webapps running on port 8081 & 8082 below

http://localhost:8081   --> app1
http://localhost:8082   --> app2

I want app1 and app2 to run on single Cloudflare free temporary domain.

I had searched this and i found it can be done using a config file, please explain me from A to Z

Please explain or fix my issue, cause I'm new in this arena.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

半衾梦 2025-02-15 12:33:58

我知道回答很晚,但我希望其他人会发现这有帮助。

考虑到您在Linux计算机上(或任何此事的任何平台),请转到 https://one.dash。 cloudflare.com ,然后在Access->隧道。
在那里创建一个新的隧道并选择正确的平台时,请在目标服务器上运行给定命令。这将启动CloudFlare服务,该服务为Cloudflare创建隧道。

接下来,在公共主机名下,[考虑到您已将域添加到CloudFlare]]输入子域并选择您的域。您也可以输入该子域的路径。

对于服务类型,您可以从下拉列表中选择[http in Cases],并提供** localhost:8081 **在您的情况下。

提交表格,然后尝试查看它的作用。

I know it's quite late to answer but I hope someone else will find this helpful.

Considering you are on a Linux machine(or any platform for that matter), go to https://one.dash.cloudflare.com and then under Access-> Tunnels.
There create a new tunnel and on selecting the right platform, run the given command on the target server. This will start a Cloudflare service that creates a tunnel to Cloudflare.

Next, under public hostname, [considering you have added your domain to cloudflare] enter a subdomain and select your domain. You can also enter the path for that subdomain.

For service type, you can select from the dropdown[http in your case] and provide with ** localhost:8081** in your case for the URL.

Submit the form and Try it out to see it it Worked.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文