Emby食用

in with 0 comment

参考这篇文章 https://www.qzkyl.cn/post-515.html

生成证书

证书使用在线签发或者自签发都行,记得要先保存根证书,客户端需要安装

搭建伪站

建议使用nginx,使用如下配置,都无需改什么,证书使用上面生成的证书

server {
     listen 443 ssl;
     server_name mb3admin.com;
     ssl_certificate /etc/pki/tls/mb3admin.com.cert.pem;
     ssl_certificate_key /etc/pki/tls/mb3admin.com.key.pem;
     ssl_session_timeout 5m;
     ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
     ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
     ssl_prefer_server_ciphers on;
 #    location = /webdefault/images/logo.jpg {
 #    alias /usr/syno/share/nginx/logo.jpg;
 #           }
 #    location @error_page {
 #    root /usr/syno/share/nginx;
 #    rewrite (.*) /error.html break;
 #           }
 #    location ^~ /.well-known/acme-challenge {
 #    root /var/lib/letsencrypt;
 #    default_type text/plain;
 #           }
     location / {
     rewrite ^ / redirect;
            }
     location ~ ^/$ {
     rewrite / https://$host:443/ redirect;
            }
     add_header Access-Control-Allow-Origin *;
     add_header Access-Control-Allow-Headers *;
     add_header Access-Control-Allow-Method *;
     add_header Access-Control-Allow-Credentials true;
     location /admin/service/registration/validateDevice {
     default_type application/json;
     return 200 '{"cacheExpirationDays": 365,"message": "Device Valid","resultCode": "GOOD"}';
    }
     location /admin/service/registration/validate {
     default_type application/json;
     return 200 '{"featId":"","registered":true,"expDate":"2099-01-01","key":""}';
    }
     location /admin/service/registration/getStatus {
     default_type application/json;
     return 200 '{"deviceStatus":"0","planType":"Lifetime","subscriptions":{}}';
    }
}

劫持域名

客户端修改hosts,使得mb3admin.com域名指向伪站,我使用的adguardhome。劫持后访问如下地址,正常返回json数据就代表劫持成功,打开emby查看应该就是会员了。
https://mb3admin.com/admin/service/registration/validateDevice
https://mb3admin.com/admin/service/registration/validateDevice/666

emby的验证是在使用会员功能的时候客户端会向mb3admin.com发送带有设备id和激活码的请求,服务器返回设备已激活的信息,客户端收到信息后启用会员功能
请求地址如下:
mb3admin.com/admin/service/registration/getStatus
mb3admin.com/admin/service/registration/validate
mb3admin.com/admin/service/registration/validateDevice

返回信息如下:

{"deviceStatus":"","planType":"","subscriptions":[]}
{"featId":"","registered":true,"expDate":"2099-01-01","key":""}
{"cacheExpirationDays": 7,"message": "Device Valid","resultCode": "GOOD"}

对应的是用户的会员状态,会员过期日期,会员设备验证。
之前用的大佬的伪站关闭了,不知道什么原因,且用且珍惜。什么时候彻底不能用了就转jellyfin吧,虽说字幕功能做的差了点,起码免费,其他功能也和emby差不多。

Comments are closed.