Merge pull request #312 from linuxserver/universal-cloudflared-base64

disable base64 line wrapping to allow long password
This commit is contained in:
aptalca 2022-02-07 09:18:47 -05:00 committed by GitHub
commit 62797fce98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ Container images/mods are configured using parameters passed at runtime (such as
| `CF_ACCOUNT_ID` | Cloudflare account ID | |
| `CF_API_TOKEN` | Cloudflare API token | Must have the `Account.Cloudflare Tunnel:Edit` and `Zone.DNS:Edit` permissions. |
| `CF_TUNNEL_NAME` | Cloudflare tunnel name | |
| `CF_TUNNEL_PASSWORD` | Cloudflare tunnel password | 32 char minimum, 64 char maximum |
| `CF_TUNNEL_PASSWORD` | Cloudflare tunnel password | 32 char minimum |
| `CF_TUNNEL_CONFIG` | Cloudflare tunnel config, please refer to Cloudflare's [official tunnel docs](https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/configuration/configuration-file/ingress). | Do not add `tunnel`/`credentials-file` headers, these are handled automatically. |
| `FILE__<VARIABLE_NAME>`| Sources content of the file as value in case of multiline content | `FILE__CF_TUNNEL_CONFIG=/config/tunnelconfig.yml` |

View File

@ -79,7 +79,7 @@ if [[ ${#CF_ACCOUNT_ID} -gt 0 ]] && [[ ${#CF_API_TOKEN} -gt 0 ]] && [[ ${#CF_TUN
echo "**** Cloudflare tunnel parameters found, starting cloudflare tunnel setup... ****"
echo "**** Creating cloudflare tunnel (${CF_TUNNEL_NAME}) via API... ****"
CF_TUNNEL_SECRET="$(command echo ${CF_TUNNEL_PASSWORD} | base64)"
CF_TUNNEL_SECRET="$(command echo ${CF_TUNNEL_PASSWORD} | base64 -w 0)"
JSON_RESULT=$(curl -sX \
POST "https://api.cloudflare.com/client/v4/accounts/${CF_ACCOUNT_ID}/tunnels" \
-H "Authorization: Bearer ${CF_API_TOKEN}" \