cloudflare / cloudflare/cloudflared
💡--pidfile support for "cloudflared access"
- Dominant language
- Go
- Stars
- 15.6k
- Forks
- 1.4k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the feature you'd like**
Hello! Here to suggest adding --pidfile to `cloudflared access`.
Currently working version:
```yaml
version: '3'
tasks:
env:
cmds:
- cloudflared access tcp --hostname https://api.example.com --url 127.0.0.1:12345 &
- defer: kill -15 $(pgrep -fl cloudflared | grep '127.0.0.1:12345' | cut -d' ' -f1)
- HTTPS_PROXY=socks5://127.0.0.1:12345 "${SHELL}" # kubectl now works with the API
```
Oh boy if this would be possible:
```yaml
version: '3'
tasks:
env:
cmds:
- cloudflared access tcp --pidfile .cloudflared.pid --hostname https://api.example.com --url 127.0.0.1:12345 &
- defer: pkill -F .cloudflared.pid
- HTTPS_PROXY=socks5://127.0.0.1:12345 "${SHELL}" # kubectl now works with the API
```
I have found myself using the socks tunnels for quite many things now (Hashicorp Vault access for CI, kube API etc). This would make supporting scripts so much cleaner.
Thanks.
Contributor guide
Assessment
This issue has not been assessed yet.