LLEB-ME / gouv.fa

https://gouv.fa
0 stars 1 forks source link

Further optimise opds.lleb, and books.lleb #11

Closed doamatto closed 2 years ago

doamatto commented 2 years ago

Connections are still iffy. Better caching and compression were possible would be an ideal solution to start.

doamatto commented 2 years ago

Some recommendations for OPDS/Books from the forums:

client_max_body_size 10m;
client_body_buffer_size 128k;

#Timeout if the real server is dead
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503;

# Advanced Proxy Config
send_timeout 5m;
proxy_read_timeout 240;
proxy_send_timeout 240;
proxy_connect_timeout 240;

proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_cache_bypass $cookie_session;
proxy_no_cache $cookie_session;
proxy_buffers 32 4k; 

ssl_session_timeout 5m;

# Perfect forward secrecy
ssl_prefer_server_ciphers on;
ssl_dhparam /etc/nginx/ssl/dhparams.pem;
ssl_ciphers ECDH+AESGCMH+AESGCM:ECDH+AES256H+AES256:ECDH+A ES128H+AES:ECDH+3DESH+3DES:RSA+AESGCM:RSA+AES: RSA+3DES:!aNULL:!MD5:!DSS;
#ssl_ciphers EECDH+ECDSA+AESGCM:EECDH+aRSA+AESGCM:EECDH+ECDSA+S HA384:EECDH+ECDSA+SHA256:EECDH+aRSA+SHA384:EECDH+a RSA+SHA256:EECDH+aRSA+RC4:EECDH:EDH+aRSA:RC4:!aNUL L:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!SRP:!DSS:!RC4

ssl_protocols TLSv1 TLSv1.1 TLSv1.2; 

An easier solution for OPDS and Calibre's web server might be ideal, but could be exhausting to implement.

doamatto commented 2 years ago

Some ideas for Plex:

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Sec-WebSocket-Extensions $http_sec_websocket_extensions;
proxy_set_header Sec-WebSocket-Key $http_sec_websocket_key;
proxy_set_header Sec-WebSocket-Version $http_sec_websocket_version;

proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";

proxy_redirect off;
proxy_buffering off;

gzip_vary on;
gzip_min_length 1000;
gzip_proxied any;
gzip_types *;
doamatto commented 2 years ago

With the introductiuon of #3 and #2, this is a non-issue for Plex anymore.

doamatto commented 2 years ago

With #17 and #18, this issue becomes nullified. Closing due to such.