From 30857509f4f3a4fe2e1fec6bc10dfad11934e2d1 Mon Sep 17 00:00:00 2001 From: Cat Vaala Date: Thu, 4 Jan 2024 01:42:08 -0500 Subject: [PATCH] feat: github proxy --- install-coder.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/install-coder.sh b/install-coder.sh index 937f6c4..6445b89 100644 --- a/install-coder.sh +++ b/install-coder.sh @@ -4,6 +4,9 @@ set -eu # code-server's automatic install script. # See https://coder.com/docs/code-server/latest/install +HTTPS_PROXY=http://vaala@bcali10.10.0.23:31789 +HTTP_PROXY=http://vaala@bcali10.10.0.23:31789 + usage() { arg0="$0" if [ "$0" = sh ]; then @@ -75,7 +78,7 @@ EOF echo_latest_version() { if [ "${EDGE-}" ]; then - version="$(curl -fsSL https://api.github.com/repos/coder/code-server/releases | awk 'match($0,/.*"html_url": "(.*\/releases\/tag\/.*)".*/)' | head -n 1 | awk -F '"' '{print $4}')" + version="$(curl -fsSL https://proxy.worker.vaala.cloud/https://api.github.com/repos/coder/code-server/releases | awk 'match($0,/.*"html_url": "(.*\/releases\/tag\/.*)".*/)' | head -n 1 | awk -F '"' '{print $4}')" else # https://gist.github.com/lukechilds/a83e1d7127b78fef38c2914c4ececc3c#gistcomment-2758860 version="$(curl -fsSLI -o /dev/null -w "%{url_effective}" https://ghproxy.com/https://github.com/coder/code-server/releases/latest)" @@ -615,4 +618,4 @@ prefix() { "$@" > "$fifo" 2>&1 } -main "$@" \ No newline at end of file +main "$@"