yuudi/yobot

您好,以后能支持ipv6吗?[Feature request] 标题

Closed this issue · 9 comments

您好,以后能支持ipv6吗?
由于家里没有ipv4公网ip.我是打算用ipv6来搭建yobot的
发现配置文件里的"host": "0.0.0.0",改为"host": "[::1]", 后,打开yobot发现是会闪退的
之后我没改配置文件.选择使用nginx的反代理来代理ipv6地址,发现登录会报错
报错日记在下一楼.

这是配置文件改为"host": "[::1]",的错误
配置文件改为

这是不改文件,使用了nginx反代理ipv6的错误,手册,帮助和关于yobot都可以打开
不改文件,反代理后
网页显示

用nginx反代就好了,我就是这样的,没必要每个服务都直接暴露给公网,有反代方便很多

用nginx反代就好了,我就是这样的,没必要每个服务都直接暴露给公网,有反代方便很多

已经使用反代理了,不使用反代理的话打开都打开不了

用nginx反代就好了,我就是这样的,没必要每个服务都直接暴露给公网,有反代方便很多

已经使用反代理了,不使用反代理的话打开都打开不了

那只能说明是某些配置有问题了,我就是外网ipv6通过nginx代理到本地9222端口,所有功能正常,只是记录的登陆地址全都是127.0.0.1而已

用nginx反代就好了,我就是这样的,没必要每个服务都直接暴露给公网,有反代方便很多

已经使用反代理了,不使用反代理的话打开都打开不了

那只能说明是某些配置有问题了,我就是外网ipv6通过nginx代理到本地9222端口,所有功能正常,只是记录的登陆地址全都是127.0.0.1而已

请问能分享一下配置文件吗?我这一用登录。就会控制台报错。

ssl_session_cache shared:ssl_session_cache:10m;
server {
    listen 80;
    listen [::]:80;
    server_name ****;
    # enforce https
    return 301 https://$server_name:443$request_uri;
}
server {
  listen  443 ssl http2;
  listen [::]:443 ssl http2;
  server_name           ****; 
    ssl_certificate ****.cer; # managed by acme
    ssl_certificate_key ****.key; # managed by acme
	ssl_protocols        TLSv1.2 ;
	ssl_ciphers "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
        ssl_prefer_server_ciphers on;
	ssl_stapling on; 
	ssl_stapling_verify on; 
	resolver 8.8.8.8 1.1.1.1 valid=300s; 
	resolver_timeout 5s;
	add_header Strict-Transport-Security "max-age=31536000;includeSubdomains;preload";
        location / {
	   proxy_http_version 1.1;
           proxy_set_header Upgrade $http_upgrade;
           proxy_set_header Connection "Upgrade";
           proxy_pass http://localhost:9222;     
        }
}

image

ssl_session_cache shared:ssl_session_cache:10m;
server {
    listen 80;
    listen [::]:80;
    server_name ****;
    # enforce https
    return 301 https://$server_name:443$request_uri;
}
server {
  listen  443 ssl http2;
  listen [::]:443 ssl http2;
  server_name           ****; 
    ssl_certificate ****.cer; # managed by acme
    ssl_certificate_key ****.key; # managed by acme
	ssl_protocols        TLSv1.2 ;
	ssl_ciphers "ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
        ssl_prefer_server_ciphers on;
	ssl_stapling on; 
	ssl_stapling_verify on; 
	resolver 8.8.8.8 1.1.1.1 valid=300s; 
	resolver_timeout 5s;
	add_header Strict-Transport-Security "max-age=31536000;includeSubdomains;preload";
        location / {
	   proxy_http_version 1.1;
           proxy_set_header Upgrade $http_upgrade;
           proxy_set_header Connection "Upgrade";
           proxy_pass http://localhost:9222;     
        }
}

图片

好的 谢谢你了

已解决问题.原因是在'location'里添加了
'proxy_set_header X-Real-IP $remote_addr; # 传递用户IP'这句