-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from entelecheia/entelecheia/issue77
- Loading branch information
Showing
6 changed files
with
210 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# cloudflared tunnel login | ||
# cloudflared tunnel create <tunnel_name> | ||
# cloudflared tunnel route dns add <tunnel_name> <your_domain> | ||
# cloudflared tunnel run <tunnel_name> | ||
# | ||
tunnel: {{ .cloudflared.tunnel_uuid }} | ||
credentials-file: {{ .cloudflared.credentials_file }} | ||
warp-routing: | ||
enabled: true | ||
|
||
ingress: | ||
- hostname: {{ .cloudflared.tunnel_hostname }} | ||
service: http://localhost:8888 | ||
- service: http_status:404 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
|
||
shopt -s nocaseglob | ||
|
||
OUT_FILE=${1:-${HOME}/.local/bin/cloudflared} | ||
|
||
# Type | ||
NATIVE_OS=$(uname | tr '[:upper:]' '[:lower:]') | ||
if [[ $NATIVE_OS == *"linux"* ]]; then | ||
OS=linux | ||
elif [[ $NATIVE_OS == *"darwin"* ]]; then | ||
OS=darwin | ||
else | ||
echo "Could not determine OS automatically, please check the release page manually: https://github.com/cloudflare/cloudflared/releases" | ||
exit 1 | ||
fi | ||
echo "You are running on ${OS}" | ||
|
||
NATIVE_ARCH=$(uname -m | tr '[:upper:]' '[:lower:]') | ||
if [[ $NATIVE_ARCH == *"x86_64"* ]]; then | ||
ARCH=amd64 | ||
elif [[ $NATIVE_ARCH == *"arm64"* || $NATIVE_ARCH == *"aarch64"* ]]; then | ||
ARCH=arm64 | ||
elif [[ $NATIVE_ARCH == *"x86"* ]]; then | ||
ARCH=386 | ||
elif [[ $NATIVE_ARCH == *"armv7"* ]]; then | ||
ARCH=arm | ||
else | ||
echo "Could not determine Architecure automatically, please check the release page manually: https://github.com/cloudflare/cloudflared/releases" | ||
exit 1 | ||
fi | ||
echo "The architecture is ${ARCH}" | ||
|
||
if [[ $OS == "linux" ]]; then | ||
wget wget -q https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-${OS}-${ARCH} -O "${OUT_FILE}" | ||
chmod +x "${OUT_FILE}" | ||
|
||
echo "Successfully installed cloudflared to ${OUT_FILE}" | ||
elif [[ $OS == "darwin" ]]; then | ||
brew install cloudflare/cloudflare/cloudflared | ||
fi | ||
|
||
echo "After installing cloudflared, you will need to login to your Cloudflare account by running the following command: cloudflared tunnel login" | ||
echo "For more details, please visit: https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/install-and-setup/tunnel-guide/local/" |