ChatGPTNextWeb / ChatGPT-Next-Web

A cross-platform ChatGPT/Gemini UI (Web / PWA / Linux / Win / MacOS). 一键拥有你自己的跨平台 ChatGPT/Gemini 应用。
https://app.nextchat.dev/
MIT License
72.45k stars 57.57k forks source link

[Bug] v2.12.14版本添加代理后无法访问 #4887

Closed Icestab closed 3 days ago

Icestab commented 5 days ago

Bug Description

同样的配置在2.12.2中使用PROXY_URL是可以正常使用的,更新2.12.3后就无法访问页面,2.12.4仍然存在这个问题

Steps to Reproduce

我查看的2.12.4提到了修复这个问题,但是我下载代码后docker build仍然不行,一但加入PROXY_URL就无法访问页面,我查看了2.12.2-2.12.4的dockerfile中的不同 尝试使用 proxychains -f $conf node server.js; build,不知道为什么还是不行,这个dockerfile build 2.12.2版本是可是正常使用的。

Expected Behavior

2.12.4可以使用PROXY_URL运行

Screenshots

No response

Deployment Method

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

Issues-translate-bot commented 5 days ago

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


Title: [Bug] v2.12.14 version cannot be accessed after adding a proxy

hugoyue commented 4 days ago

4771 这个问题一直没有真正解决,请参考Docker镜像无法使用PROXY_URL字段的解决办法

Issues-translate-bot commented 4 days ago

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


4771 This problem has not been truly solved. Please refer to Solution to the problem that Docker images cannot use the PROXY_URL field

Icestab commented 4 days ago

4771 这个问题一直没有真正解决,请参考Docker镜像无法使用PROXY_URL字段的解决办法

但是在之前版本都是可以正常使用的,这是我疑惑的地方,最近两个版本才不行了,我已经试过这个去掉引号,有引号,去掉0.0.0.0,三个版本的dockerfile来build最新版都不行

Issues-translate-bot commented 4 days ago

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


4771 This problem has not been truly solved, please refer to Solution to the problem that Docker images cannot use the PROXY_URL field

But it can be used normally in previous versions. This is what I am confused about. It is not working in the last two versions. I have tried this to remove the quotation marks, with quotation marks, and remove 0.0.0.0. Three versions of the dockerfile to build the latest Neither version will work

Issues-translate-bot commented 4 days ago

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


I've tried this with the quotes removed and with the quotes

Refer to this https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/issues/4747#issuecomment-2129103228 to rebuild the image

Issues-translate-bot commented 4 days ago

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


4771 This problem has not been really solved. Please refer to Solution to the problem that Docker images cannot use the PROXY_URL field

But it can be used normally in the previous versions. This is what I am confused about. It is not working in the last two versions. I have tried this to remove the quotes, with the quotes, remove 0.0.0.0, and build three versions of the dockerfile. Not even the latest version works

Sorry, I got it wrong. You should refer to this solution to rebuild the image

hugoyue commented 4 days ago

4771 这个问题一直没有真正解决,请参考Docker镜像无法使用PROXY_URL字段的解决办法

但是在之前版本都是可以正常使用的,这是我疑惑的地方,最近两个版本才不行了,我已经试过这个去掉引号,有引号,去掉0.0.0.0,三个版本的dockerfile来build最新版都不行

Dockerfile 最后一部分替换成

CMD if [ -n "$PROXY_URL" ]; then \
   export HOSTNAME="0.0.0.0"; \
   protocol=$(echo $PROXY_URL | cut -d: -f1); \
   host=$(echo $PROXY_URL | cut -d/ -f3 | cut -d: -f1); \
   port=$(echo $PROXY_URL | cut -d: -f3); \
   conf=/etc/proxychains.conf; \
   echo "strict_chain" > $conf; \
   echo "proxy_dns" >> $conf; \
   echo "remote_dns_subnet 224" >> $conf; \
   echo "tcp_read_time_out 15000" >> $conf; \
   echo "tcp_connect_time_out 8000" >> $conf; \
   echo "localnet 127.0.0.0/255.0.0.0" >> $conf; \
   echo "localnet ::1/128" >> $conf; \
   echo "[ProxyList]" >> $conf; \
   echo "$protocol $host $port" >> $conf; \
   cat /etc/proxychains.conf; \
   proxychains -f $conf node server.js; \
   else \
   node server.js; \
   fi
Issues-translate-bot commented 4 days ago

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


4771 This problem has not been really solved. Please refer to Solution to the problem that Docker images cannot use the PROXY_URL field

But it can be used normally in the previous versions. This is what I am confused about. It is not working in the last two versions. I have tried this to remove the quotes, with the quotes, remove 0.0.0.0, and build three versions of the dockerfile. Not even the latest version works

Replace the last part of the Dockerfile with

CMD if [ -n "$PROXY_URL" ]; then \
   export HOSTNAME="0.0.0.0"; \
   protocol=$(echo $PROXY_URL | cut -d: -f1); \
   host=$(echo $PROXY_URL | cut -d/ -f3 | cut -d: -f1); \
   port=$(echo $PROXY_URL | cut -d: -f3); \
   conf=/etc/proxychains.conf; \
   echo "strict_chain" > $conf; \
   echo "proxy_dns" >> $conf; \
   echo "remote_dns_subnet 224" >> $conf; \
   echo "tcp_read_time_out 15000" >> $conf; \
   echo "tcp_connect_time_out 8000" >> $conf; \
   echo "localnet 127.0.0.0/255.0.0.0" >> $conf; \
   echo "localnet ::1/128" >> $conf; \
   echo "[ProxyList]" >> $conf; \
   echo "$protocol $host $port" >> $conf; \
   cat /etc/proxychains.conf; \
   proxychains -f $conf node server.js; \
   else \
   node server.js; \
   fi
Icestab commented 3 days ago

4771 这个问题一直没有真正解决,请参考Docker镜像无法使用PROXY_URL字段的解决办法

但是在之前版本都是可以正常使用的,这是我疑惑的地方,最近两个版本才不行了,我已经试过这个去掉引号,有引号,去掉0.0.0.0,三个版本的dockerfile来build最新版都不行

Dockerfile 最后一部分替换成

CMD if [ -n "$PROXY_URL" ]; then \
   export HOSTNAME="0.0.0.0"; \
   protocol=$(echo $PROXY_URL | cut -d: -f1); \
   host=$(echo $PROXY_URL | cut -d/ -f3 | cut -d: -f1); \
   port=$(echo $PROXY_URL | cut -d: -f3); \
   conf=/etc/proxychains.conf; \
   echo "strict_chain" > $conf; \
   echo "proxy_dns" >> $conf; \
   echo "remote_dns_subnet 224" >> $conf; \
   echo "tcp_read_time_out 15000" >> $conf; \
   echo "tcp_connect_time_out 8000" >> $conf; \
   echo "localnet 127.0.0.0/255.0.0.0" >> $conf; \
   echo "localnet ::1/128" >> $conf; \
   echo "[ProxyList]" >> $conf; \
   echo "$protocol $host $port" >> $conf; \
   cat /etc/proxychains.conf; \
   proxychains -f $conf node server.js; \
   else \
   node server.js; \
   fi

你是对的,使用你提供的dockerfile成功编译了可以使用代理的镜像,我编译的amd64和arm64两个版本,有需要的可以拉取[docker pull icestab/chatgpt-next-web:v2.12.4]

Issues-translate-bot commented 3 days ago

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


4771 This problem has not been really solved, please refer to Solution to the problem that Docker images cannot use the PROXY_URL field

But it can be used normally in the previous versions. This is what I am confused about. It is not working in the last two versions. I have tried this to remove the quotation marks, with the quotation marks, and remove 0.0.0.0. Three versions of the dockerfile. Build the latest version doesn’t work

Replace the last part of Dockerfile with

CMD if [ -n "$PROXY_URL" ]; then \
export HOSTNAME="0.0.0.0"; \
protocol=$(echo $PROXY_URL | cut -d: -f1); \
host=$(echo $PROXY_URL | cut -d/ -f3 | cut -d: -f1); \
port=$(echo $PROXY_URL | cut -d: -f3); \
conf=/etc/proxychains.conf; \
echo "strict_chain" > $conf; \
echo "proxy_dns" >> $conf; \
echo "remote_dns_subnet 224" >> $conf; \
echo "tcp_read_time_out 15000" >> $conf; \
echo "tcp_connect_time_out 8000" >> $conf; \
echo "localnet 127.0.0.0/255.0.0.0" >> $conf; \
echo "localnet ::1/128" >> $conf; \
echo "[ProxyList]" >> $conf; \
echo "$protocol $host $port" >> $conf; \
cat /etc/proxychains.conf; \
proxychains -f $conf node server.js; \
else \
node server.js; \
fi

You are right. I successfully compiled an image that can use the proxy using the dockerfile you provided. I compiled two versions of amd64 and arm64. You can pull them if necessary [docker pull icestab/chatgpt-next-web:v2.12.4]

757957414 commented 1 day ago

看到问题关闭我以为已经修复了,但试了一下发现并没有

Issues-translate-bot commented 1 day ago

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


When I saw the issue closed I thought it had been fixed, but when I tried it I found it wasn't.

Icestab commented 1 day ago

看到问题关闭我以为已经修复了,但试了一下发现并没有

我本地代理已经可以正常使用了,不知道你为什么不行,你是自己自己编译的吗,可以试下我编译的镜像,我这边已经用了好几天了

Issues-translate-bot commented 1 day ago

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


When I saw the issue closed, I thought it had been fixed, but when I tried it, I found it wasn’t.

My local proxy can be used normally. I don’t know why you can’t. Did you compile it yourself? You can try the image I compiled. I have been using it for several days.

757957414 commented 1 day ago

看到问题关闭我以为已经修复了,但试了一下发现并没有

我本地代理已经可以正常使用了,不知道你为什么不行,你是自己自己编译的吗,可以试下我编译的镜像,我这边已经用了好几天了

我是从docker hub中拉取的镜像,程序能正常启动,遇到也是配置了代理之后就无法访问页面的情况。同时尝试在网页中配置网页代理也无效所以只能退回2.12.12版本

Issues-translate-bot commented 1 day ago

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


When I saw the issue was closed, I thought it had been fixed, but when I tried it, I found it wasn't.

My local proxy can be used normally. I don’t know why you can’t. Did you compile it yourself? You can try the image I compiled. I have been using it for several days.

I pulled the image from docker hub, and the program can start normally. However, after configuring the proxy, I cannot access the page. At the same time, trying to configure the web proxy in the web page also has no effect, so I can only return to version 2.12.12.

Icestab commented 1 day ago

看到问题关闭我以为已经修复了,但试了一下发现并没有

我本地代理已经可以正常使用了,不知道你为什么不行,你是自己自己编译的吗,可以试下我编译的镜像,我这边已经用了好几天了

我是从docker hub中拉取的镜像,程序能正常启动,遇到也是配置了代理之后就无法访问页面的情况。同时尝试在网页中配置网页代理也无效所以只能退回2.12.12版本

官方镜像并没有重新打包,我修复后重新打包上传了,你可以试试[docker pull icestab/chatgpt-next-web:v2.12.4]

Issues-translate-bot commented 1 day ago

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


When I saw the issue was closed, I thought it had been fixed, but when I tried it, I found it wasn’t.

My local proxy can be used normally. I don’t know why you can’t. Did you compile it yourself? You can try the image I compiled. I have been using it for several days.

I pulled the image from docker hub, and the program can start normally. However, after configuring the proxy, I cannot access the page. At the same time, trying to configure the web proxy in the web page also has no effect, so I can only return to version 2.12.12.

The official image was not repackaged. I repaired it and repackaged it for upload. You can try [docker pull icestab/chatgpt-next-web:v2.12.4]