feat: update .gitignore to include Docker Compose override files and enhance URL parsing in installer script

rabbitprincess committed Jun 2, 2026 at 22:39 UTC 5d34737d8bb03c305be0464078be215b00db0f8a
2 files changed +31 -1
.gitignore
+4
@@ -41,6 +41,10 @@ profile.cov
41
42 /target
43
44 +# Docker Compose Override
45 +/docker-compose.override.yml
46 +/docker-compose.override.yaml
47 +
48 # Added by goreleaser init:
49 dist/
50
cmd/portal-tunnel/installer/install.sh
+27 -1
@@ -40,8 +40,34 @@ is_local_https_url() {
40
41 URL_HOSTPORT="${1#https://}"
42 URL_HOSTPORT="${URL_HOSTPORT%%/*}"
43 + URL_HOSTPORT="${URL_HOSTPORT%%\?*}"
44 + URL_HOSTPORT="${URL_HOSTPORT%%#*}"
45 +
46 case "$URL_HOSTPORT" in
44 - localhost|localhost:*|127.0.0.1|127.0.0.1:*|\[::1\]|\[::1\]:*|*.localhost|*.localhost:*)
47 + \[::1\]:*)
48 + URL_HOST="[::1]"
49 + URL_PORT="${URL_HOSTPORT#\[::1\]:}"
50 + ;;
51 + \[::1\])
52 + URL_HOST="[::1]"
53 + URL_PORT=""
54 + ;;
55 + *:*)
56 + URL_HOST="${URL_HOSTPORT%%:*}"
57 + URL_PORT="${URL_HOSTPORT#*:}"
58 + ;;
59 + *)
60 + URL_HOST="$URL_HOSTPORT"
61 + URL_PORT=""
62 + ;;
63 + esac
64 +
65 + case "$URL_PORT" in
66 + *[!0-9]*) return 1 ;;
67 + esac
68 +
69 + case "$URL_HOST" in
70 + localhost|127.0.0.1|\[::1\]|*.localhost)
71 return 0
72 ;;
73 esac