lobehub / lobe-chat

🤯 Lobe Chat - an open-source, modern-design AI chat framework. Supports Multi AI Providers( OpenAI / Claude 3 / Gemini / Ollama / Azure / DeepSeek), Knowledge Base (file upload / knowledge management / RAG ), Multi-Modals (Vision/TTS) and plugin system. One-click FREE deployment of your private ChatGPT/ Claude application.
https://chat-preview.lobehub.com
Other
44.75k stars 10.06k forks source link

[Request] About midjourney's proxy address #2552

Open osbi-code opened 6 months ago

osbi-code commented 6 months ago

🥰 需求描述

Through testing, I have discovered that the proxy address for midjourney must be a self-hosted HTTPS address, and this proxy must be openly accessible without being restricted by firewall IP policies for private access. This poses a significant challenge to security. My requirements are:

  1. Without using HTTPS, I only need to set up a proxy on the server's local address 127.0.0.1 and access it directly.
  2. Alternatively, it can be set directly in the Docker parameters, such as -e MIDJOURNEY_PROXY_URL=https://XXXXX. It does not need to be displayed on the web or externally, but this solution still poses a risk of the HTTPS proxy being accessed by others.

🧐 解决方案

To deploy the midjourney's proxy directly on the server's localhost 127.0.0.1, for example, on port 3382 (as in 127.0.0.1:3382). lobe-chat can interact with https://midjourney.chat-plugin.lobehub.com/ by accessing the midjourney's proxy through http://127.0.0.1:3382/.

📝 补充信息

No response

lobehubbot commented 6 months ago

👀 @zhoufann9188

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible. Please make sure you have given us as much context as possible.\ 非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

osbi-code commented 6 months ago

i read the github project midjourney-proxy again. i found the parameter :

<html>
<body>
<!--StartFragment-->
mj.api-secret | 否 | 接口密钥,为空不启用鉴权;调用接口时需要加请求头 mj-api-secret
-- | -- | --
<!--EndFragment-->
</body>
</html>

If so, I think using HTTPS for the proxy of midjourney may be more secure, but the following two conditions need to be met:

  1. lobe-chart can configure the midjourney proxy address and corresponding request header mj-api-secret in the Docker startup parameters.
  2. Is it possible to interact without forcing the use of port 443, but instead allowing any specified port?