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

[求助]next-web曾经在添加proxy_url之后就不会监听0.0.0.0,只会监听127.0.0.1这个问题是如何解决的呢? #4567

Closed
3 tasks
xiazhibin opened this issue Apr 25, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@xiazhibin
Copy link

Bug Description

Dockerfile里面如果有proxy_url这个环境变化,就会 export HOSTNAME="127.0.0.1";

Steps to Reproduce

wu

Expected Behavior

wu

Screenshots

No response

Deployment Method

  • Docker
  • Vercel
  • Server

Desktop OS

No response

Desktop Browser

No response

Desktop Browser Version

No response

Smartphone Device

No response

Smartphone OS

No response

Smartphone Browser

No response

Smartphone Browser Version

No response

Additional Logs

No response

@xiazhibin xiazhibin added the bug Something isn't working label Apr 25, 2024
@nextchat-manager
Copy link

Please follow the issue template to update title and description of your issue.

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Title: [Help] Next-web once added proxy_url and it would no longer listen to 0.0.0.0, but would only listen to 127.0.0.1. How to solve this problem?

@Kosette
Copy link

Kosette commented Apr 25, 2024

让docker container使用代理有点tricky,如果你使用了项目里的PROYX_URL=环境变量,可以尝试同时设置network_mode="host"

或者参考Docker docs中的run-containers-with-a-proxy-configuration设置。

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


It is a bit tricky to let the docker container use the proxy. If you use the PROYX_URL= environment variable in the project, you can try setting network_mode="host" at the same time.

Or refer to the run-containers-with-a-proxy-configuration settings in Docker docs.

@xiazhibin
Copy link
Author

让docker container使用代理有点tricky,如果你使用了项目里的PROYX_URL=环境变量,可以尝试同时设置network_mode="host"

或者参考Docker docs中的run-containers-with-a-proxy-configuration设置。

好的,我试一试。真的好奇怪,我看Dockerfile不是已经写死了hostname,用PROXY_URL的时候应该不再监听0.0.0.0才对,但是next-web是监听0.0.0.0

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


It is a bit tricky to let the docker container use the proxy. If you use the PROYX_URL= environment variable in the project, you can try setting network_mode="host" at the same time.

Or refer to the run-containers-with-a-proxy-configuration settings in Docker docs.

OK, I'll give it a try. It’s really strange. I don’t think the hostname has been hardcoded in the Dockerfile. When using PROXY_URL, it should no longer monitor 0.0.0.0, but next-web monitors 0.0.0.0.

@fred-bf fred-bf closed this as completed Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants