-
Notifications
You must be signed in to change notification settings - Fork 59.4k
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] PROXY_URL不支持使用密码的用户代理,解析不正确 #695
Comments
不算是 bug,因为我没说它支持 |
我查了资料,将: 然后配置2个环境变量 $PROXY_USER、$PROXY_PASSWD应该就可以实现这个功能了 |
当前版本有1个讨巧的办法,你可以试试: |
需要更新 DockerFile 的 proxy 部分,使用下列脚本: function split() {
echo $1 | awk -F $2 '{print $1,$2}'
}
function parse_config() {
local input=$1
read protocol rest <<< "$(split $input '://')"
read userpass hostport <<< "$(split $rest '@')"
read user pass <<< "$(split $userpass ':')"
read host port <<< "$(split $hostport ':')"
echo "$protocol $host $port $user $pass"
}
parse_config $1 |
同问 |
容器里可以配置代理嘛,能实现本地不开代理也能访问到chatgpt嘛 |
PROXY_URL只支持http代理而不支持socks5代理吗 |
感谢,能解决问题 |
Thanks, can solve the problem |
收录至 #2105 |
Included in #2105 |
doc: #695 how to use a proxy with password in docker
doc: ChatGPTNextWeb#695 how to use a proxy with password in docker
doc: ChatGPTNextWeb#695 how to use a proxy with password in docker
描述问题
PROXY_URL不支持使用密码的用户代理,如http://user:password@127.0.0.1:7890
如何复现
使用Docker执行:
docker run -d -p 3000:3000
-e OPENAI_API_KEY="sk-xxxx"
-e CODE="your-password"
-e PROXY_URL="http://user:password@127.0.0.1:7890"
yidadaa/chatgpt-next-web
截图
ubuntu@VM-16-14-ubuntu:/opt/app/chatgpt-next-web$ ./startup.sh
[+] Running 1/1
⠿ Container chat-next-web Started 0.5s
strict_chain
proxy_dns
remote_dns_subnet 224
tcp_read_time_out 15000
tcp_connect_time_out 8000
[ProxyList]
http fwei 123456788@10.0.16.14
[proxychains] config file found: /etc/proxychains.conf
[proxychains] preloading /usr/lib/libproxychains4.so
proxy fwei has invalid value or is not numeric
non-numeric ips are only allowed under the following circumstances:
chaintype == strict (true), proxy is not first in list (false), proxy_dns active (thread)
一些必要的信息
The text was updated successfully, but these errors were encountered: