cloudflare / cloudflared

Cloudflare Tunnel client (formerly Argo Tunnel)

Home Page:https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/tunnel-guide

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🐛Insufficient warning about the `USERPROFILE` variable on Windows Service

gnh1201 opened this issue · comments

Describe the bug
According to the Cloudflare official documentation, it instructs placing the config.yml file at %USERPROFILE%\cloudflared\config.yml.

However, when the agent is installed as a Windows service, the path of the USERPROFILE variable changes. Upon inspection, it appears to be installed as a service under the Local System account.

In this case,

Even if the config.yml is not present in the location demanded by the Cloudflared agent, the agent does not issue a warning.

Even if users have properly configured the config.yml in the local user directory, they still receive error messages like "bad handshake."

Attempting to seek support in the community may be challenging because the error message visible is limited to "bad handshake," making questions and answers restricted in scope.

To Reproduce
Steps to reproduce the behavior:

  1. Write a config.yml
  2. Run cloudflared service install
  3. See error bad handshake when cloudflare access tcp ~

Expected behavior
It should function normally, just like when manually running "cloudflared tunnel run." Alternatively, when attempting "cloudflared service install," there should be a check to ensure the existence of the config.yml, and if it is not present, a warning should be issued.

Environment and versions

  • OS: Windows 11
  • Architecture: AMD64
  • Version: cloudflared version 2023.10.0 (built 2023-10-31-1231 UTC)