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

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

Closed
1 of 3 tasks
Icestab opened this issue Jun 25, 2024 · 20 comments
Closed
1 of 3 tasks

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

Icestab opened this issue Jun 25, 2024 · 20 comments
Labels
bug Something isn't working

Comments

@Icestab
Copy link

Icestab commented Jun 25, 2024

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

  • 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

@Icestab Icestab added the bug Something isn't working label Jun 25, 2024
@Issues-translate-bot
Copy link

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
Copy link

hugoyue commented Jun 26, 2024

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

@Issues-translate-bot
Copy link

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
Copy link
Author

Icestab commented Jun 26, 2024

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

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

@Issues-translate-bot
Copy link

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
Copy link

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 #4747 (comment) to rebuild the image

@Issues-translate-bot
Copy link

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
Copy link

hugoyue commented Jun 26, 2024

#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
Copy link

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
Copy link
Author

Icestab commented Jun 27, 2024

#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]

@Icestab Icestab closed this as completed Jun 27, 2024
@Issues-translate-bot
Copy link

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
Copy link

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

@Issues-translate-bot
Copy link

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
Copy link
Author

Icestab commented Jun 29, 2024

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

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

@Issues-translate-bot
Copy link

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
Copy link

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

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

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

@Issues-translate-bot
Copy link

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
Copy link
Author

Icestab commented Jun 29, 2024

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

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

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

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

@Issues-translate-bot
Copy link

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]

@daychou
Copy link

daychou commented Jul 4, 2024

Why this question has not been repaired. After adding the Proxy_url parameter, there is a problem with the monitoring 3000 in the official mirror. Although it is open source and free, I hope the official will repair the Docker mirror as soon as possible

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

5 participants