原因:
使用优化线路反代EMBY,播放时 疯狂拉满宽带并且视频卡顿
解决:
加入以下参数
proxy_buffering off;
proxy_cache off;
我的宝塔反代配置示例
#PROXY-START/
location ^~ /
{
proxy_pass http://123.8.5.6:8096;
proxy_set_header Host 123.8.5.6;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_http_version 1.1;
proxy_buffering off;
proxy_cache off;
# proxy_hide_header Upgrade;
add_header X-Cache $upstream_cache_status;
#Set Nginx Cache
set $static_fileyCbwxXaR 0;
if ( $uri ~* "\.(gif|png|jpg|css|js|woff|woff2)$" )
{
set $static_fileyCbwxXaR 1;
expires 1m;
}
if ( $static_fileyCbwxXaR = 0 )
{
add_header Cache-Control no-cache;
}
}
#PROXY-END/
套cf建议参考
https://emby.media/community/index.php?/topic/103165-how-to-recommended-cloudflare-settings/
规则1 开启图片缓存
域名/emby/Items/*/Images/*
规则2 禁用视频缓存
域名/emby/videos/*/*
公益服
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
公益服大部分禁用国内ip,所以这两条我一般都注释掉: