langgenius/dify

The http proxy environment variable of Dify plugin_daemon only supports uppercase letters.

Open

#18752 opened on Apr 25, 2025

View on GitHub
 (5 comments) (2 reactions) (0 assignees)TypeScript (141,412 stars) (22,210 forks)batch import
good first issue🐞 bug

Description

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.3.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

In a self-hosted environment under an HTTP(S) proxy, set the following proxy environment variables in docker-compose.yaml .

services:
  plugin_daemon:
    environment;
      http(s)_proxy: http://proxy-host:port

The http(s)_proxy environment variables specified in lowercase are valid in sandbox and api containers, but not in plugin_daemon.

plugin_daemon supports resolving python dependencies under http(s) proxy. https://github.com/langgenius/dify-plugin-daemon/blob/main/internal/core/plugin_manager/launcher.go#L132-L143

	localPluginRuntime := local_runtime.NewLocalPluginRuntime(local_runtime.LocalPluginRuntimeConfig{
		PythonInterpreterPath:     p.pythonInterpreterPath,

		HttpProxy:                 p.HttpProxy,
		HttpsProxy:                p.HttpsProxy,
		NoProxy:                   p.NoProxy,

	})

However, the plugin_daemon configuration only reads the proxy environment variable in uppercase. https://github.com/langgenius/dify-plugin-daemon/blob/main/internal/types/app/config.go#L131-L132

	HttpProxy  string `envconfig:"HTTP_PROXY"`
	HttpsProxy string `envconfig:"HTTPS_PROXY"`

If the uppercase HTTP(S)_PROXY setting is empty and the lowercase http(s)_proxy is defined, I would like it to take precedence.

✔️ Expected Behavior

It will be possible to install plugins on the marketplace from behind the http(s) proxy.

❌ Actual Behavior

plugin_daemon gives the following error.

runtime error: invalid memory address or nil pointer dereference

Contributor guide