kingmo888 / rustdesk-api-server

基于Django的RustDesk Api&Web Server,除了支持api所有功能,还支持web注册、管理、展示等。已支持到最新1.2.7版本。
774 stars 177 forks source link

docker版本是否考虑支持ssl证书? #13

Closed cutemanworking closed 9 months ago

cutemanworking commented 9 months ago

很好的项目, 通过docker-compose已经可以用起来, 但裸跑还是很危险,是否可以支持https?

kingmo888 commented 9 months ago

对docker不了解。

lm93129 commented 9 months ago

https可以通过NGINX反代解决

lm93129 commented 9 months ago

配置文件举例如下:

server {
    listen 6443 ssl http2 ;
    server_name rustdesk.xxx.xxx;
        # 监听IPv6
    listen [::]:6443 ssl http2;
    set_real_ip_from 172.0.0.0/8;
    real_ip_header X-Forwarded-For;
    # SSL setting
    ssl_certificate /acme.sh/*.xxx.xxx/fullchain.cer;
    ssl_certificate_key /acme.sh/*.xxx.xxx/*.xxx.xxx.key;
    ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;

    gzip on;
    gzip_vary on;
    gzip_min_length 1000;
    gzip_proxied any;
    gzip_types text/plain text/css text/xml application/xml text/javascript application/x-javascript image/svg+xml;
    gzip_disable "MSIE [1-6]\.";

    # proxy
    location / {
        proxy_pass http://192.168.1.10:21114;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header REMOTE-HOST $remote_addr;
        add_header X-Cache $upstream_cache_status;
        # cache
        add_header Cache-Control no-cache;
        expires 12h;
    }
}
cutemanworking commented 9 months ago

非常感谢!!!