使用webp为小姐姐图片加速

技术说明 webp nginx webp_server_go webp-sh/webp_server_go 实现 解压 find Coser.xgmoe.collection.pack -name "*.zip" -exec sh -c 'unzip -d "/mnt/user/Pictures/Collection/Coser/Coser.xgmoe.collection.pack/" "$0"' {} \; zfile4 webp_server_go Nginx server { # 监听端口 3041,启用SSL加密 listen 18783 ssl; # 绑定域名 server_name a.b; # 当请求非SSL时,自动重定向到SSL协议 error_page 497 https://$host:$server_port$request_uri; # SSL证书、私钥文件路径 ssl_certificate /etc/nginx/ssl/a.b_bundle.crt; ssl_certificate_key /etc/nginx/ssl/a.b.key; # 允许上传文件大小 client_max_body_size 200M; # 所有请求反向代理 location / { proxy_pass http://127.0.0.1:8783; proxy_set_header Host $http_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; } location ~* ^/pd/(.*\.(jpg|png))$ { proxy_pass http://127.0.0.1:3333/$1; } } webp-server -prefetch -jobs=12 –config=/etc/config.json ...

August 7, 2024 · 1 min