mirror of
https://github.com/kossakovsky/n8n-install.git
synced 2026-03-07 22:33:11 +00:00
feat(gost): require upstream proxy for geo-bypass
gost now always requires an external upstream proxy to function. wizard prompts for upstream proxy url when gost is selected. if no upstream provided, gost is removed from selection.
This commit is contained in:
@@ -203,6 +203,35 @@ if [ $ollama_selected -eq 1 ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# If Gost was selected, prompt for upstream proxy URL
|
||||
gost_selected=0
|
||||
for p in "${selected_profiles[@]}"; do
|
||||
[ "$p" = "gost" ] && gost_selected=1 && break
|
||||
done
|
||||
|
||||
if [ $gost_selected -eq 1 ]; then
|
||||
# Get existing value from .env if available
|
||||
EXISTING_UPSTREAM=$(read_env_var "GOST_UPSTREAM_PROXY")
|
||||
|
||||
GOST_UPSTREAM_INPUT=$(wt_input "Gost Upstream Proxy" \
|
||||
"Enter your external proxy URL for geo-bypass.\n\nExamples:\n socks5://user:pass@proxy.com:1080\n http://user:pass@proxy.com:8080\n\nThis proxy should be located outside restricted regions." \
|
||||
"$EXISTING_UPSTREAM") || true
|
||||
|
||||
if [ -n "$GOST_UPSTREAM_INPUT" ]; then
|
||||
# Save to .env file
|
||||
write_env_var "GOST_UPSTREAM_PROXY" "$GOST_UPSTREAM_INPUT"
|
||||
log_info "Gost upstream proxy configured: $GOST_UPSTREAM_INPUT"
|
||||
else
|
||||
# Remove gost from selected profiles if no upstream provided
|
||||
tmp=()
|
||||
for p in "${selected_profiles[@]}"; do
|
||||
[ "$p" != "gost" ] && tmp+=("$p")
|
||||
done
|
||||
selected_profiles=("${tmp[@]}")
|
||||
log_warning "Gost requires an upstream proxy. Gost has been removed from selection."
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ${#selected_profiles[@]} -eq 0 ]; then
|
||||
log_info "No optional services selected."
|
||||
COMPOSE_PROFILES_VALUE=""
|
||||
|
||||
@@ -92,7 +92,7 @@ if is_profile_active "open-webui"; then
|
||||
echo -e " ${GREEN}*${NC} ${WHITE}Open WebUI${NC}: Register your account"
|
||||
fi
|
||||
if is_profile_active "gost"; then
|
||||
echo -e " ${GREEN}*${NC} ${WHITE}Gost Proxy${NC}: Active - AI services route outbound traffic through proxy"
|
||||
echo -e " ${GREEN}*${NC} ${WHITE}Gost Proxy${NC}: Routing AI traffic through external proxy"
|
||||
fi
|
||||
echo ""
|
||||
echo -e " ${WHITE}4.${NC} Run ${CYAN}make doctor${NC} if you experience any issues"
|
||||
|
||||
@@ -431,8 +431,9 @@ if is_profile_active "gost"; then
|
||||
\"password\": \"$(json_escape "$GOST_PASSWORD")\"
|
||||
},
|
||||
\"extra\": {
|
||||
\"note\": \"Internal HTTP proxy for AI services\",
|
||||
\"note\": \"Routes AI traffic through external proxy for geo-bypass\",
|
||||
\"proxy_url\": \"$(json_escape "$GOST_PROXY_URL")\",
|
||||
\"upstream_proxy\": \"$(json_escape "$GOST_UPSTREAM_PROXY")\",
|
||||
\"internal_api\": \"http://gost:8080\"
|
||||
}
|
||||
}")
|
||||
|
||||
Reference in New Issue
Block a user