[Tools] Using Cloudflared to expose your local server to public

For example, when you use Dify to create a workflow and need to send a HTTP request to your local request for testing...

Due to the request is send from Dify server, which not able to access your localhost on your machine.

We can use Cloudflared to create a tunnel to expose our local server to public network.

 

1. Install:

brew install cloudflared

2. Expose:

cloudflared tunnel --url http://localhost:7001

3. Generating public address:

https://xxxxx.trycloudflare.com

4. Add to Dify URL:

https://xxxxx.trycloudflare.com/your_api_version/api_path

posted @ 2026-01-25 15:00  Zhentiw  阅读(0)  评论(0)    收藏  举报