From 064525fb7d21009bfcfe0e2879e77fda9e71c65e Mon Sep 17 00:00:00 2001 From: EvanYao826 Date: Sat, 23 May 2026 11:05:58 +0800 Subject: [PATCH 1/2] fix: support lowercase proxy environment variables as fallback The plugin_daemon config only read uppercase HTTP_PROXY, HTTPS_PROXY, and NO_PROXY via envconfig tags. When only lowercase http_proxy, https_proxy, and no_proxy are set (common in many environments), the proxy settings were silently ignored, causing plugin installation failures behind HTTP proxies. Add fallback in SetDefault() to check lowercase env vars when uppercase are not set, matching the behavior of other Dify containers (api, web). Fixes #18752 --- internal/types/app/default.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/internal/types/app/default.go b/internal/types/app/default.go index eedaaa0c3..cef3af4b0 100644 --- a/internal/types/app/default.go +++ b/internal/types/app/default.go @@ -1,11 +1,24 @@ package app import ( + "os" + "github.com/langgenius/dify-cloud-kit/oss" "golang.org/x/exp/constraints" ) func (config *Config) SetDefault() { + // Fallback to lowercase proxy env vars if uppercase are not set + if config.HttpProxy == "" { + config.HttpProxy = os.Getenv("http_proxy") + } + if config.HttpsProxy == "" { + config.HttpsProxy = os.Getenv("https_proxy") + } + if config.NoProxy == "" { + config.NoProxy = os.Getenv("no_proxy") + } + switch config.DBType { case DB_TYPE_OCEANBASE, DB_TYPE_SEEKDB: config.DBType = DB_TYPE_MYSQL From 4d4ebe5888299212b349e610fda1748df3185072 Mon Sep 17 00:00:00 2001 From: EvanYao826 Date: Sun, 24 May 2026 11:22:04 +0800 Subject: [PATCH 2/2] refactor: use setDefaultString helper for proxy env vars --- internal/types/app/default.go | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/internal/types/app/default.go b/internal/types/app/default.go index cef3af4b0..833714b71 100644 --- a/internal/types/app/default.go +++ b/internal/types/app/default.go @@ -9,15 +9,9 @@ import ( func (config *Config) SetDefault() { // Fallback to lowercase proxy env vars if uppercase are not set - if config.HttpProxy == "" { - config.HttpProxy = os.Getenv("http_proxy") - } - if config.HttpsProxy == "" { - config.HttpsProxy = os.Getenv("https_proxy") - } - if config.NoProxy == "" { - config.NoProxy = os.Getenv("no_proxy") - } + setDefaultString(&config.HttpProxy, os.Getenv("http_proxy")) + setDefaultString(&config.HttpsProxy, os.Getenv("https_proxy")) + setDefaultString(&config.NoProxy, os.Getenv("no_proxy")) switch config.DBType { case DB_TYPE_OCEANBASE, DB_TYPE_SEEKDB: