Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

๐Ÿ› fix: support PROXY_URL in docker with proxychains-ng #3362

Merged
merged 18 commits into from
Aug 3, 2024

Conversation

hezhijie0327
Copy link
Contributor

@hezhijie0327 hezhijie0327 commented Jul 29, 2024

๐Ÿ’ป ๅ˜ๆ›ด็ฑปๅž‹ | Change Type

  • โœจ feat
  • ๐Ÿ› fix
  • โ™ป๏ธ refactor
  • ๐Ÿ’„ style
  • ๐Ÿ”จ chore
  • โšก๏ธ perf
  • ๐Ÿ‘ท build
  • ๐Ÿ“ docs

๐Ÿ”€ ๅ˜ๆ›ด่ฏดๆ˜Ž | Description of Change

  1. ไปฅ Xray ็š„ Socks5 ไธบไพ‹๏ผŒ้…็ฝฎ PROXY_URL="socks5://127.0.0.1:7891"
  2. ๅขžๅŠ  Alpine Package Mirror๏ผŒๅŠ ้€Ÿๆž„ๅปบ [TODO: ้•œๅƒๆบๅฝ“ๅ‰ไธบ USTC๏ผŒๆ˜ฏๅฆๆœ‰ๅฟ…่ฆๆ”นไธบๅ…ถไป–๏ผŸ]
  3. ้‡ๅ‘ฝๅ USE_NPM_CN_MIRROR ไธบ USE_CN_MIRROR

๐Ÿ“ ่กฅๅ……ไฟกๆฏ | Additional Information

image
image

replace: #2382

Copy link

vercel bot commented Jul 29, 2024

@hezhijie0327 is attempting to deploy a commit to the LobeHub Pro Team on Vercel.

A member of the Team first needs to authorize it.

@lobehubbot
Copy link
Member

๐Ÿ‘ @hezhijie0327

Thank you for raising your pull request and contributing to our Community
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
If you encounter any problems, please feel free to connect with us.
้žๅธธๆ„Ÿ่ฐขๆ‚จๆๅ‡บๆ‹‰ๅ–่ฏทๆฑ‚ๅนถไธบๆˆ‘ไปฌ็š„็คพๅŒบๅšๅ‡บ่ดก็Œฎ๏ผŒ่ฏท็กฎไฟๆ‚จๅทฒ็ป้ตๅพชไบ†ๆˆ‘ไปฌ็š„่ดก็ŒฎๆŒ‡ๅ—๏ผŒๆˆ‘ไปฌไผšๅฐฝๅฟซๅฎกๆŸฅๅฎƒใ€‚
ๅฆ‚ๆžœๆ‚จ้‡ๅˆฐไปปไฝ•้—ฎ้ข˜๏ผŒ่ฏท้šๆ—ถไธŽๆˆ‘ไปฌ่”็ณปใ€‚

@hezhijie0327 hezhijie0327 changed the base branch from build/docker-proxy to main July 29, 2024 07:29
Copy link

codecov bot commented Jul 29, 2024

Codecov Report

All modified and coverable lines are covered by tests โœ…

Project coverage is 94.21%. Comparing base (ea798e5) to head (c0ea0eb).
Report is 18 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3362      +/-   ##
==========================================
- Coverage   94.24%   94.21%   -0.03%     
==========================================
  Files         400      403       +3     
  Lines       25148    25657     +509     
  Branches     1839     1881      +42     
==========================================
+ Hits        23700    24174     +474     
- Misses       1448     1483      +35     
Flag Coverage ฮ”
app 94.21% <รธ> (-0.03%) โฌ‡๏ธ
server 70.69% <รธ> (+1.59%) โฌ†๏ธ

Flags with carried forward coverage won't be shown. Click here to find out more.

โ˜” View full report in Codecov by Sentry.
๐Ÿ“ข Have feedback on the report? Share it here.

@hezhijie0327
Copy link
Contributor Author

hezhijie0327 commented Jul 29, 2024

TODO:

  1. ๅŠ ๅ…ฅ nslookup localhost | grep 'Address:' | tail -n 1 | awk 'print $2' ๆ”ฏๆŒๅŸŸๅๆ ผๅผๆœๅŠกๅ™จ่งฃๆž
  2. A ๅŠ AAAA ่ฎฐๅฝ•๏ผŒ-q=A ๆˆ– -q=AAAA proxychains ไป…ๆ”ฏๆŒ v4 ๅœฐๅ€๏ผŒๅ›บๅฎš่งฃๆž A ๅœฐๅ€
  3. ๅฝ“่งฃๆž็ป“ๆžœไธบ็ฉบๆ—ถ๏ผŒ่ฟ”ๅ›ž่พ“ๅ…ฅๅ€ผ
dns_record=$(nslookup ${host%%:*} | grep 'Address:' | tail -n 1 | awk 'print $2')

"$protocol ${dns_record:-${host%%:*}} $port"

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. ๐Ÿ‘ฏ๐Ÿ‘ญ๐Ÿป๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘๐Ÿ‘ซ๐Ÿง‘๐Ÿฟโ€๐Ÿคโ€๐Ÿง‘๐Ÿป๐Ÿ‘ฉ๐Ÿพโ€๐Ÿคโ€๐Ÿ‘จ๐Ÿฟ๐Ÿ‘ฌ๐Ÿฟ


TODO:

  1. Add nslookup localhost | grep 'Address:' | tail -n 1 | awk 'print $2' to support domain name format server resolution
  2. A and AAAA records, -q=A or -q=AAAA
  3. When the parsing result is empty, return the input value

@hezhijie0327
Copy link
Contributor Author

@arvinxx ไปฃ็†ๅŠŸ่ƒฝ้ƒฝๅฎž็Žฐไบ†๏ผŒๅฏไปฅ่ฏ•่ฏ•

ๆž„ๅปบ:
docker build -t lobe-chat:local --build-arg USE_CN_MIRROR=true --no-cache .

ไปฃ็†๏ผš
docker run -it --rm -p 3210:3210 -e PROXY_URL="socks5://127.0.0.1:7891" lobe-chat:local

ไปฃ็†ๅธฆๅŸŸๅ๏ผš
docker run -it --rm -p 3210:3210 -e PROXY_URL="socks5://localhost:7891" lobe-chat:local

@arvinxx arvinxx changed the title โœจ feat: support PROXY_URL in docker with proxychains-ng โœจ feat: support PROXY_URL in docker with proxychains-ng Jul 30, 2024
@arvinxx
Copy link
Contributor

arvinxx commented Jul 30, 2024

@hezhijie0327 ๅฟ…้กป่ฆๅธฆ USE_CN_MIRROR ๆ‰่ƒฝๆ‰“ๅ‡บ PROXY_URL ็š„็‰ˆๆœฌๅ—๏ผŸ

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. ๐Ÿ‘ฏ๐Ÿ‘ญ๐Ÿป๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘๐Ÿ‘ซ๐Ÿง‘๐Ÿฟโ€๐Ÿคโ€๐Ÿง‘๐Ÿป๐Ÿ‘ฉ๐Ÿพโ€๐Ÿคโ€๐Ÿ‘จ๐Ÿฟ๐Ÿ‘ฌ๐Ÿฟ


@hezhijie0327 Is it necessary to bring USE_CN_MIRROR to print the PROXY_URL version?

@arvinxx
Copy link
Contributor

arvinxx commented Jul 30, 2024

ๅ“ฆ ็œ‹ไบ†ไธ‹๏ผŒ็›ดๆŽฅ้… PROXY_URL ๅฐฑ่กŒ

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. ๐Ÿ‘ฏ๐Ÿ‘ญ๐Ÿป๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘๐Ÿ‘ซ๐Ÿง‘๐Ÿฟโ€๐Ÿคโ€๐Ÿง‘๐Ÿป๐Ÿ‘ฉ๐Ÿพโ€๐Ÿคโ€๐Ÿ‘จ๐Ÿฟ๐Ÿ‘ฌ๐Ÿฟ


Oh, after taking a look, just configure PROXY_URL.

@hezhijie0327
Copy link
Contributor Author

ๅ—ฏ USE_CN_MIRROR ่ฟ™ไธชไป…ๅœจ้•œๅƒๆž„ๅปบไธญ็”จๅˆฐ๏ผŒไธป่ฆๆ˜ฏ Alpine ไนŸ้œ€่ฆ้•œๅƒๅนฒ่„†ๅฐฑ็ปŸไธ€ไธ€ไธชๅ˜้‡ไบ†

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. ๐Ÿ‘ฏ๐Ÿ‘ญ๐Ÿป๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘๐Ÿ‘ซ๐Ÿง‘๐Ÿฟโ€๐Ÿคโ€๐Ÿง‘๐Ÿป๐Ÿ‘ฉ๐Ÿพโ€๐Ÿคโ€๐Ÿ‘จ๐Ÿฟ๐Ÿ‘ฌ๐Ÿฟ


Well, USE_CN_MIRROR is only used in image construction. Mainly because Alpine also needs images, so just unify one variable.

@yexingok
Copy link

yexingok commented Aug 1, 2024

ๆ„Ÿ่ฐขไฝœ่€…๏ผŒ่ฏท้—ฎ่ฟ™ไธชๅŠŸ่ƒฝๅ•ฅๆ—ถๅ€™ๅ›žๅˆๅนถๅˆฐไธป็บฟ๏ผŸ
sock5ไปฃ็†ๆฐๅฅฝๆ˜ฏไธ€ไธช้œ€่ฆ็š„ๅŠŸ่ƒฝ

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. ๐Ÿ‘ฏ๐Ÿ‘ญ๐Ÿป๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘๐Ÿ‘ซ๐Ÿง‘๐Ÿฟโ€๐Ÿคโ€๐Ÿง‘๐Ÿป๐Ÿ‘ฉ๐Ÿพโ€๐Ÿคโ€๐Ÿ‘จ๐Ÿฟ๐Ÿ‘ฌ๐Ÿฟ


Thanks to the author, when will this feature be merged into the mainline?
sock5 proxy is exactly a needed feature

@arvinxx
Copy link
Contributor

arvinxx commented Aug 2, 2024

@hezhijie0327 ๆˆ‘ๆต‹ไธ‹ๆฅไผผไนŽไธ่กŒ๏ผŸๆˆ‘็”จ็š„ไปฃ็†ๆ˜ฏ ClashX

image

@hezhijie0327
Copy link
Contributor Author

hezhijie0327 commented Aug 2, 2024

@arvinxx ๆ˜ฏ Docker Desktop ๅ˜›?

ๅฆ‚ๆžœๆ˜ฏ็š„่ฏ๏ผŒๅปบ่ฎฎ็”จๅฝ“ๅ‰่ฎก็ฎ—ๆœบ็š„ๅฎž้™… IP ๅœฐๅ€๏ผˆ192.168.0.x๏ผ‰ๆˆ–ๅฎนๅ™จ็š„ Host IP๏ผŒๅนถๅผ€ๅฏๅฑ€ๅŸŸ็ฝ‘่ฎฟ้—ฎ๏ผˆๅฏ่ƒฝๆ˜ฏๅซ่ฟ™ไธชๅๅญ—๏ผŒ็ฑปไผผ่ฟ™็งๅŠŸ่ƒฝ๏ผŒ้œ€่ฆๅฐ†ๆœๅŠก็ป‘ๅฎšๅœจ 0.0.0.0/0 ไธŠ ๏ผ‰ ๅฎžๆต‹ไธ‹ๆฅๅช้œ€่ฆไฝฟ็”จ host.docker.internal ๅณๅฏ

Docker Desktop ๅœจ Windows ๅ’Œ macOS ไธŠ่ตฐ็š„ๆ˜ฏ่™šๆ‹Ÿๆœบๆ–นๆกˆ๏ผŒๅฆ‚ๆžœๆ˜ฏ localhost ็š„่ฏๆ˜ฏ่ตฐๅˆฐ lobe-chat ่‡ช่บซๅฎนๅ™จ็š„ localhost

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. ๐Ÿ‘ฏ๐Ÿ‘ญ๐Ÿป๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘๐Ÿ‘ซ๐Ÿง‘๐Ÿฟโ€๐Ÿคโ€๐Ÿง‘๐Ÿป๐Ÿ‘ฉ๐Ÿพโ€๐Ÿคโ€๐Ÿ‘จ๐Ÿฟ๐Ÿ‘ฌ๐Ÿฟ


@arvinxx Is it Docker Desktop?

If so, it is recommended to use the actual IP address of the current computer (192.168.0.x) or the Host IP of the container, and enable LAN access (it may be called this name. For similar functions, the service needs to be bound to 0.0.0.0 /0 on)

Docker Desktop uses a virtual machine solution on Windows and macOS. If it is localhost, it goes to localhost of the lobe-chat own container.

@hezhijie0327
Copy link
Contributor Author

hezhijie0327 commented Aug 2, 2024

ๅฐ่ฏ•็”จ host.docker.internal ๆ›ฟไปฃ localhost

docker run -it --rm -p 3210:3210 -e PROXY_URL="socks5://host.docker.internal:7890" lobe-chat:local

image
image

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. ๐Ÿ‘ฏ๐Ÿ‘ญ๐Ÿป๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘๐Ÿ‘ซ๐Ÿง‘๐Ÿฟโ€๐Ÿคโ€๐Ÿง‘๐Ÿป๐Ÿ‘ฉ๐Ÿพโ€๐Ÿคโ€๐Ÿ‘จ๐Ÿฟ๐Ÿ‘ฌ๐Ÿฟ


ๅฐ่ฏ•็”จ host.docker.internal ๆ›ฟไปฃ localhost

docker run -it --rm -p 3210:3210 -e PROXY_URL="socks5://host.docker.internal:7890" lobe-chat:local

image

@arvinxx
Copy link
Contributor

arvinxx commented Aug 3, 2024

ๆต‹ไธ‹ๆฅๆฒก้—ฎ้ข˜ไบ†๏ผŒhezhijie0327#43 ่กฅไบ†ไธ‹ๆ–‡ๆกฃ

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. ๐Ÿ‘ฏ๐Ÿ‘ญ๐Ÿป๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘๐Ÿ‘ซ๐Ÿง‘๐Ÿฟโ€๐Ÿคโ€๐Ÿง‘๐Ÿป๐Ÿ‘ฉ๐Ÿพโ€๐Ÿคโ€๐Ÿ‘จ๐Ÿฟ๐Ÿ‘ฌ๐Ÿฟ


There is no problem after testing, hezhijie0327#43 added the documentation

Related to lobehub#2004

Add documentation for `PROXY_URL` environment variable in both English and Chinese versions of the environment variables guide.

* **English Documentation**
  - Add `PROXY_URL` section to specify the proxy URL for connecting to external services.
  - Include example values and a callout for Docker Desktop users.

* **Chinese Documentation**
  - Add `PROXY_URL` section to specify the proxy URL for connecting to external services.
  - Include example values and a callout for Docker Desktop users.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/lobehub/lobe-chat/pull/3362?shareId=XXXX-XXXX-XXXX-XXXX).
@hezhijie0327
Copy link
Contributor Author

ๅฅฝ็š„๏ผŒmerge ไบ†

@lobehubbot
Copy link
Member

Bot detected the issue body's language is not English, translate it automatically. ๐Ÿ‘ฏ๐Ÿ‘ญ๐Ÿป๐Ÿง‘โ€๐Ÿคโ€๐Ÿง‘๐Ÿ‘ซ๐Ÿง‘๐Ÿฟโ€๐Ÿคโ€๐Ÿง‘๐Ÿป๐Ÿ‘ฉ๐Ÿพโ€๐Ÿคโ€๐Ÿ‘จ๐Ÿฟ๐Ÿ‘ฌ๐Ÿฟ


OK, merge

@arvinxx arvinxx changed the title โœจ feat: support PROXY_URL in docker with proxychains-ng ๐Ÿ› fix: support PROXY_URL in docker with proxychains-ng Aug 3, 2024
@arvinxx arvinxx merged commit 920de7c into lobehub:main Aug 3, 2024
4 of 7 checks passed
@lobehubbot
Copy link
Member

โค๏ธ Great PR @hezhijie0327 โค๏ธ

The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world.
้กน็›ฎ็š„ๆˆ้•ฟ็ฆปไธๅผ€็”จๆˆทๅ้ฆˆๅ’Œ่ดก็Œฎ๏ผŒๆ„Ÿ่ฐขๆ‚จ็š„่ดก็Œฎ! ๅฆ‚ๆžœๆ‚จๅฏน LobeHub ๅผ€ๅ‘่€…็คพๅŒบๆ„Ÿๅ…ด่ถฃ๏ผŒ่ฏทๅŠ ๅ…ฅๆˆ‘ไปฌ็š„ discord๏ผŒ็„ถๅŽ็งไฟก @arvinxx ๆˆ– @canisminor1990ใ€‚ไป–ไปฌไผš้‚€่ฏทๆ‚จๅŠ ๅ…ฅๆˆ‘ไปฌ็š„็งๅฏ†ๅผ€ๅ‘่€…้ข‘้“ใ€‚ๆˆ‘ไปฌๅฐ†ไผš่ฎจ่ฎบๅ…ณไบŽ Lobe Chat ็š„ๅผ€ๅ‘๏ผŒๅˆ†ไบซๅ’Œ่ฎจ่ฎบๅ…จ็ƒ่Œƒๅ›ดๅ†…็š„ AI ๆถˆๆฏใ€‚

github-actions bot pushed a commit that referenced this pull request Aug 3, 2024
### [Version&nbsp;1.8.2](v1.8.1...v1.8.2)
<sup>Released on **2024-08-03**</sup>

#### ๐Ÿ› Bug Fixes

- **misc**: Add `PROXY_URL` in docker with proxychains-ng.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's fixed

* **misc**: Add `PROXY_URL` in docker with proxychains-ng, closes [#3362](#3362) ([920de7c](920de7c))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
@lobehubbot
Copy link
Member

๐ŸŽ‰ This PR is included in version 1.8.2 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€

@hezhijie0327 hezhijie0327 deleted the proxy branch August 3, 2024 11:49
github-actions bot pushed a commit to bentwnghk/lobe-chat that referenced this pull request Aug 3, 2024
### [Version&nbsp;1.51.1](v1.51.0...v1.51.1)
<sup>Released on **2024-08-03**</sup>

#### ๐Ÿ› Bug Fixes

- **misc**: Add `PROXY_URL` in docker with proxychains-ng.

#### ๐Ÿ’„ Styles

- **misc**: Fix `aya`, `mathstral` model tag icon & update ollama model info.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's fixed

* **misc**: Add `PROXY_URL` in docker with proxychains-ng, closes [lobehub#3362](https://github.com/bentwnghk/lobe-chat/issues/3362) ([920de7c](920de7c))

#### Styles

* **misc**: Fix `aya`, `mathstral` model tag icon & update ollama model info, closes [lobehub#3382](https://github.com/bentwnghk/lobe-chat/issues/3382) ([ced95a8](ced95a8))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
qinyuhang pushed a commit to qinyuhang/lobe-chat that referenced this pull request Aug 5, 2024
* โœจ: feat: support PROXY_URL in docker with proxychains-ng

* ๐Ÿ”จ chore: let proxychains config more readable

* ๐Ÿ”จ chore: add package update

* โšก๏ธ perf: add CN mirror for Alpine

* ๐Ÿ”จ chore: add more comments

* ๐Ÿ”จ chore: change USE_NPM_CN_MIRROR to USE_CN_MIRROR

* ๐Ÿ› fix: fix cn mirror for alpine during building

* ๐Ÿ› fix: fix permission issue

* ๐Ÿ› fix: fix app path error

* โœจ feat: support proxy server with domain

* ๐Ÿ”จ chore: add more comments & cleanup code

* ๐Ÿ”จ chore: add more comments

* โšก๏ธ perf: resolve only when host is domain

* ๐Ÿ”จ chore: move IP_REGEX to head

* ๐Ÿ”จ chore: replace `! -z` to `-n`

* ๐Ÿ”จ chore: update comments

* โœจ feat: add `DEFAULT_AGENT_CONFIG` and `SYSTEM_AGENT` to env, allow set default model

* Add documentation for `PROXY_URL` environment variable

Add documentation for `PROXY_URL` environment variable in both English and Chinese versions of the environment variables guide.

* **English Documentation**
  - Add `PROXY_URL` section to specify the proxy URL for connecting to external services.
  - Include example values and a callout for Docker Desktop users.

* **Chinese Documentation**
  - Add `PROXY_URL` section to specify the proxy URL for connecting to external services.
  - Include example values and a callout for Docker Desktop users.

---------

Co-authored-by: Arvin Xu <[email protected]>
qinyuhang pushed a commit to qinyuhang/lobe-chat that referenced this pull request Aug 5, 2024
### [Version&nbsp;1.8.2](lobehub/lobe-chat@v1.8.1...v1.8.2)
<sup>Released on **2024-08-03**</sup>

#### ๐Ÿ› Bug Fixes

- **misc**: Add `PROXY_URL` in docker with proxychains-ng.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's fixed

* **misc**: Add `PROXY_URL` in docker with proxychains-ng, closes [lobehub#3362](lobehub#3362) ([920de7c](lobehub@920de7c))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
davidreis97 pushed a commit to davidreis97/lobe-chat that referenced this pull request Aug 7, 2024
* โœจ: feat: support PROXY_URL in docker with proxychains-ng

* ๐Ÿ”จ chore: let proxychains config more readable

* ๐Ÿ”จ chore: add package update

* โšก๏ธ perf: add CN mirror for Alpine

* ๐Ÿ”จ chore: add more comments

* ๐Ÿ”จ chore: change USE_NPM_CN_MIRROR to USE_CN_MIRROR

* ๐Ÿ› fix: fix cn mirror for alpine during building

* ๐Ÿ› fix: fix permission issue

* ๐Ÿ› fix: fix app path error

* โœจ feat: support proxy server with domain

* ๐Ÿ”จ chore: add more comments & cleanup code

* ๐Ÿ”จ chore: add more comments

* โšก๏ธ perf: resolve only when host is domain

* ๐Ÿ”จ chore: move IP_REGEX to head

* ๐Ÿ”จ chore: replace `! -z` to `-n`

* ๐Ÿ”จ chore: update comments

* โœจ feat: add `DEFAULT_AGENT_CONFIG` and `SYSTEM_AGENT` to env, allow set default model

* Add documentation for `PROXY_URL` environment variable

Add documentation for `PROXY_URL` environment variable in both English and Chinese versions of the environment variables guide.

* **English Documentation**
  - Add `PROXY_URL` section to specify the proxy URL for connecting to external services.
  - Include example values and a callout for Docker Desktop users.

* **Chinese Documentation**
  - Add `PROXY_URL` section to specify the proxy URL for connecting to external services.
  - Include example values and a callout for Docker Desktop users.

---------

Co-authored-by: Arvin Xu <[email protected]>
davidreis97 pushed a commit to davidreis97/lobe-chat that referenced this pull request Aug 7, 2024
### [Version&nbsp;1.8.2](lobehub/lobe-chat@v1.8.1...v1.8.2)
<sup>Released on **2024-08-03**</sup>

#### ๐Ÿ› Bug Fixes

- **misc**: Add `PROXY_URL` in docker with proxychains-ng.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's fixed

* **misc**: Add `PROXY_URL` in docker with proxychains-ng, closes [lobehub#3362](lobehub#3362) ([920de7c](lobehub@920de7c))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment