feat: github proxy
This commit is contained in:
parent
f593a9805a
commit
30857509f4
@ -4,6 +4,9 @@ set -eu
|
|||||||
# code-server's automatic install script.
|
# code-server's automatic install script.
|
||||||
# See https://coder.com/docs/code-server/latest/install
|
# 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() {
|
usage() {
|
||||||
arg0="$0"
|
arg0="$0"
|
||||||
if [ "$0" = sh ]; then
|
if [ "$0" = sh ]; then
|
||||||
@ -75,7 +78,7 @@ EOF
|
|||||||
|
|
||||||
echo_latest_version() {
|
echo_latest_version() {
|
||||||
if [ "${EDGE-}" ]; then
|
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
|
else
|
||||||
# https://gist.github.com/lukechilds/a83e1d7127b78fef38c2914c4ececc3c#gistcomment-2758860
|
# 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)"
|
version="$(curl -fsSLI -o /dev/null -w "%{url_effective}" https://ghproxy.com/https://github.com/coder/code-server/releases/latest)"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user