Connect to tunnels from worker.
I see that it is possible to run a tunnel and then connect to hyperdrive through the tunnel on my worker. I wanted to know if its possible to access other tcp applications running through tunnels?
I have both a mysql server and a redis server running on my server and I want to be able to use cloudflare tunnels to access them from my worker. I can access mysql using hyperdrive but I don't see a way I can access redis.
Here is the link to the docs of connecting to hyperdrive from a worker over tunnels if that helps
https://developers.cloudflare.com/hyperdrive/configuration/connect-to-private-database/
Cloudflare Docs
Connect to a private database using Tunnel
Hyperdrive can securely connect to your private databases using Cloudflare Tunnel and Cloudflare Access.
5 Replies
Feedback
Feedback has been submitted! Thank you :)
Workers can make outbound TCP requests but there is no way to connect privately through a worker
I don't think you understand the question. I am aware that I can make TCP requests, I'm trying to connect to a TCP connection that is running on Cloudflare tunnels using an access id and secret. I can connect fine to a unprotected tunnel, but I don't really want to leave a tunnel open to the whole web.
I know and I don't think private TCP connections are possible outside of hyperdrive
sorry for the such late reply, so would it just be the same as opening a websocket connection and then sending what I would if I was connected to using tcp? literally the only thing im trying to do is connect to redis, and send a single command. but I don't want to open the port and rather have it all go through cloudflare tunnels