[PR #562] fix/issue 18752 proxy env fallback new #583

Open
opened 2026-02-16 01:16:23 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langgenius/dify-plugin-daemon/pull/562
Author: @fghpdf
Created: 1/9/2026
Status: 🔄 Open

Base: mainHead: fix/issue-18752-proxy-env-fallback-new


📝 Commits (3)

  • 4705636 fix: support lowercase proxy environment variables fallback
  • b1dc71b refactor: use existing setDefaultString for proxy env fallback
  • 9dfa896 fix: use os.LookupEnv to distinguish unset vs empty proxy variables

📊 Changes

1 file changed (+13 additions, -0 deletions)

View changed files

📝 internal/types/app/default.go (+13 -0)

📄 Description

Description

This PR adds support for lowercase proxy environment variables as a fallback when uppercase versions are not set.

Changes

  • Added fallback logic in SetDefault() method to check lowercase http_proxy, https_proxy, and no_proxy when uppercase versions (HTTP_PROXY, HTTPS_PROXY, NO_PROXY) are empty
  • Added new helper function setDefaultStringFromEnv() to read from environment variables

Fixes

Fixes langgenius/dify#18752

Testing

  • Code compiles successfully
  • Follows the same pattern as other configuration defaults in the codebase

Behavior

  • If HTTP_PROXY is set, it will be used (backward compatible)
  • If HTTP_PROXY is empty but http_proxy is set, http_proxy will be used
  • Same logic applies to HTTPS_PROXY/https_proxy and NO_PROXY/no_proxy

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langgenius/dify-plugin-daemon/pull/562 **Author:** [@fghpdf](https://github.com/fghpdf) **Created:** 1/9/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/issue-18752-proxy-env-fallback-new` --- ### 📝 Commits (3) - [`4705636`](https://github.com/langgenius/dify-plugin-daemon/commit/4705636584c4d15e426cd4f33ca79ae76bd7c0fc) fix: support lowercase proxy environment variables fallback - [`b1dc71b`](https://github.com/langgenius/dify-plugin-daemon/commit/b1dc71bb31a738e3c84fe1eb84c8f9d86eed8910) refactor: use existing setDefaultString for proxy env fallback - [`9dfa896`](https://github.com/langgenius/dify-plugin-daemon/commit/9dfa8967e4d46062172334a04b17b098f72ffadf) fix: use os.LookupEnv to distinguish unset vs empty proxy variables ### 📊 Changes **1 file changed** (+13 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `internal/types/app/default.go` (+13 -0) </details> ### 📄 Description ## Description This PR adds support for lowercase proxy environment variables as a fallback when uppercase versions are not set. ## Changes - Added fallback logic in `SetDefault()` method to check lowercase `http_proxy`, `https_proxy`, and `no_proxy` when uppercase versions (`HTTP_PROXY`, `HTTPS_PROXY`, `NO_PROXY`) are empty - Added new helper function `setDefaultStringFromEnv()` to read from environment variables ## Fixes Fixes langgenius/dify#18752 ## Testing - Code compiles successfully - Follows the same pattern as other configuration defaults in the codebase ## Behavior - If `HTTP_PROXY` is set, it will be used (backward compatible) - If `HTTP_PROXY` is empty but `http_proxy` is set, `http_proxy` will be used - Same logic applies to `HTTPS_PROXY`/`https_proxy` and `NO_PROXY`/`no_proxy` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 01:16:23 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-plugin-daemon#583