树洞剪藏#剪藏#树洞剪藏

反向代理 - Pixiv圖片代理

2024 年 11 月 19 日1 分钟
分享Twitter / XTelegram微博
反向代理 - Pixiv圖片代理 封面

同步来源:树洞剪藏 源站剪藏 ID:133 原文地址:https://pixiv.cat/reverseproxy.html

打开原文 · 打开源站剪藏快照


反向代理 - Pixiv圖片代理

Pixiv圖片代理

首頁

生成圖片連結

反向代理 (current)

關於

GitHub

Language

反向代理

中国大陆用户请改用 i.pixiv.re 或 i.pixiv.nl

TL;DR : 將 i.pximg.net 修改為 i.pixiv.cat

這個代理是 pixiv 圖片伺服器連結的反向代理,只需修改網域部分即可使用。

pixiv 的圖片伺服器網域為 i.pximg.net,因為有盜連保護,只要 Referer 是空值或不是來自 pixiv 的網域就會返回403。

pixiv 網站上的原始連結(在其他網站使用會返回403):https:// i.pximg.net /img-original/img/2018/04/24/01/51/35/68377968_p0.png

反向代理(可以正常在其他網站使用):https:// i.pixiv.cat /img-original/img/2018/04/24/01/51/35/68377968_p0.png

原始連結(i.pximg.net) Pixiv.cat 反向代理(i.pixiv.cat)

自行託管設定檔參考

nginx

proxy_cache_path /path/to/cache levels=1:2 keys_zone=pximg:10m max_size=10g inactive=7d use_temp_path=off;

server { listen 443 ssl http2;

ssl_certificate /path/to/ssl_certificate.crt; ssl_certificate_key /path/to/ssl_certificate.key;

server_name i.pixiv.cat; access_log off;

location / { proxy_cache pximg; proxy_pass https://i.pximg.net; proxy_cache_revalidate on; proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504; proxy_cache_lock on; add_header X-Cache-Status $upstream_cache_status; proxy_set_header Host i.pximg.net; proxy_set_header Referer "https://www.pixiv.net/";

proxy_cache_valid 200 7d; proxy_cache_valid 404 5m; } }

Cloudflare Workers

addEventListener("fetch", event => { let url = new URL(event.request.url); url.hostname = "i.pximg.net";

let request = new Request(url, event.request); event.respondWith( fetch(request, { headers: { 'Referer': 'https://www.pixiv.net/', 'User-Agent': 'Cloudflare Workers' } }) ); });

This website is not affiliated with Pixiv Inc.

已運行 7 年 24 天 15 小時 34 分鐘 30 秒

相关文章