cloudflare / cloudflare/cloudflared
💡Get the connection id of a particular running instance
- Dominant language
- Go
- Stars
- 15.6k
- Forks
- 1.4k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the feature you'd like**
A way to get the connection id of a particular instance that is running on a system after it has been run.
**Describe alternatives you've considered**
I am aware of how to get the list of connections for a particular tunnel by querying the API or using the info command. But, I can’t figure out which system a particular connection refers to.
One way could be to check the logs when a connection starts but since I am looking for an automatic way to figure this out, parsing log files seems to be a very brittle way. Moreover, using the origin IP is not possible when multiple instances are running in the same cluster as they will all give the same origin IP.
I also noticed that I could create tags while creating a tunnel but not while running them. Else, that would have been a sure shot way to identify the connections.
**Additional context**
I was considering submitting a PR for this but whatever way is considered, it needs to be stored by cloudflare so that it is accessible by other systems. This might mean a change in the cloudflare tunnel backend which might not be feasible by the maintainers. Is there any other way this can be done?
Related community discussion: https://community.cloudflare.com/t/get-the-connection-id-of-a-particular-running-instance/396113
Contributor guide
Assessment
This issue has not been assessed yet.