声明:本文仅为方便绘画交流与学习,恕不提供 Pixiv 外其他网站指导!上次更新:2019.9.9
目录
I.Nginx 本地代理(PC适用)
II.Android 第三方客户端
III.镜像站
前言
自从 2017 年末,Pixiv 的网页和 APP 始终无法直接打开,但是检测发现其 IP 本身并没有被封禁,所以只要一点小把戏,并借助平时做网站常用反代理服务器 Nginx 即可以完美绕过针对 SNI 审查,整个代理过程在用户自己的电脑上完成,并不涉及任何第三方服务,因此理论上是完全合法的个人行为。鉴于是小白向的指南,所以不想写太多望而生畏(其实业内并不复杂)内容,如果要问原理请看这里。
- 个人精力有限无法为大家一一作出指导,可以到 QQ 群咨询其他大佬,一群:905209253,二群:901311039,三群:681759820,四群:1038688540,验证问题的答案是
Sakura
。 请低调使用此教程和工具,不建议广泛传播。
Nginx 本地代理
Windows 使用方法
从 Github 或者国内镜像下载,并解压到电脑任意路径中不含中文、日文等非英文字符的位置,之后安装文件名为 ca.cer
的根证书文件,然后参考下方「hosts 修改方法」部分修改 hosts(请使用压缩包里的hosts,因为每次更新都可能变的),最后通过可视化工具或者调试工具启动 Nginx 即可。
重要提醒:使用 Nginx 反代理的时候建议关闭各类全局代理,如各类 VPN 客户端、浏览器代理插件、某些 steam 代理工具、类似 ADSafe 这样的广告屏蔽软件,如果对 P 站的域名启用了代理,那么 hosts 就无法生效,所以请将他们暂时关闭或者把 P 站相关域名移出代理列表。
说明:
① Chrome 浏览器证书安装方法、FireFox 浏览器证书安装方法,按键具体位置因浏览器版本而异,可利用浏览器配置界面的搜索框快速查找;其他浏览器请自行寻找安装方法。务必确保 Mashiro Internet Fake Authority CA 已经添加到了受信任机构列表中(如图),遇到浏览器安全提醒说明你一定还没有添加成功。注意:如果遇到浏览器显示网站不可信任,这时即使你点了信任,网页内的图片等内容还是可能被浏览器阻止,最好的解决办法是保证证书安装成功。
② 如果遇到 Nginx 启动失败,首先请确保路径为全英文,可将解压出来的整个文件夹移动到各个磁盘的根目录处;其次自行查看错误日志,通常用搜索引擎直接检索日志里那行信息就可以找到一大堆解决方法了;如需反馈请附上logs/error.log
中的日志(摘取出现错误时间点的片段即可,一般在文件最后几行,切勿在我这里发太长的日志)。
③ 无法启动 Nginx,常见原因是端口被占用(80 或 443 端口,建议先看一下日志),参考端口占用的解决方法。
④ 很多人说图片显示不出来,可依次尝试把 hosts 中 i.pximg.net
的 IP 改成 210.140.92.140、210.140.92.141、210.140.92.134、210.140.92.135、210.140.92.139、210.140.92.143、210.140.92.137、210.140.92.138 中的任意一个。
⑤ 可视化工具仅支持 Windows 64 位版,32 位版请尝试通过调试脚本启动,如果都不行请看用 cmd 管理 Nginx
。
MAC 使用方法
MAC 上同样可以使用 Nginx,详细的 MAC 配置方法请看这篇文章。
Linux 使用方法
Nginx 配置文件目录为 /etc/nginx/
,使用和 MAC 完全一致的配置文件和证书并替换配置文件即可,最后参考下方「hosts 修改方法」部分的方法修改 hosts(请使用压缩包里的hosts,因为每次更新都可能变的)。
hosts 修改方法
以下是针对 Windows 的改法,其他系统类似,可自行百度 hosts 文件的位置。MAC用户看这里。Linux各发行版:sudo nano /etc/hosts
,原则上立即生效。
用文本编辑器(比如 Notepad++)打开 "C:\Windows\System32\drivers\etc\hosts"
文件(64位和32位系统都是这个路径,不熟悉的注意看下后面的补充及截图),最下方直接粘贴压缩包内 hosts 文件中的内容后保存(遇到权限问题无法保存看这里),这时应该就可以正常访问了。如果仍然无法访问,请按下 + R 键,输入 cmd
,回车,进入 cmd 后输入 ipconfig /flushdns
,回车执行以刷新DNS缓存,若还不行请尝试清理浏览器缓存、Cookie、停用所有浏览器插件并重启电脑。
请注意: hosts文件无后缀,无后缀,无后缀! 同时 hosts 文件中不能有 http://
、https://
等开头和斜杠 /
。
hosts 文件位置如下:
hosts 文件粘贴示例(实际粘贴的内容与图中不完全一致):
如果你嫌上面的操作太麻烦了,或者极少数电脑原本就没有 hosts 文件,可直接用压缩包内的 hosts 文件覆盖原文件或放到以上 hosts 文件的路径就行了。
Android 代理方案
在第三方客户端 Pivision 基础上更换了代理接口、修复了 OAuth 登陆问题,重新打的包改名 PivisionS,这里下载。
PivisionS 更新记录:
发布时间 | 版本号 | 更新内容 |
---|---|---|
2019-09-09 06:30 | 1.0 | 修复大陆无法使用的“bug”;更新 OAuth 登陆接口 |
2019-09-09 20:00 | 5.0.1 | 更新代理源 |
做这个纯属举手之劳,并且能力也有限,如果嫌慢、功能少请自购 VPN 吧。
此外也有不少优秀的 Pixiv 第三方客户端可以选择,它们基于类似前文的域前置方法实现了直链访问。比较优秀的两个是 Shaft 和 Pix-EzViewer,这两个 APP 的安装包可以在文章开头的群文件里获取。
iOS 代理方案
抱歉,iOS 客户端除了 VPN 暂时没有更好的办法了(其实像上面 Android 那样做个客户端也不难,几个简单的接口改一下就行了)。
镜像站
如果你有自己的服务器的话,可以搭建镜像站,虽然难度不大,但是都有自己服务器了何不直接自建 VPN 呢?而且这显然是不合法的,自己悄悄用就好了。
相关教程:https://moe.best/technology/pixiv-proxy.html
常见问题
无法登陆/注册
登陆问题在最新版 Nginx 本地代理工具包中解决了,注册的话,可以加文章开头的 QQ 群,找管理员免费代注册。
关于证书
这是我自己签的证书,如果你信任我,那么直接安装即可;如果不信任,那么请自己签,自签证书教程。
证书十年后到期,到时候记得来找我,haha。
关于维基百科和 Steam
Wikipedia、Steam Community 的封锁情况与 P 站完全一致,所以在 mashirozx/Pixiv-Nginx 中都顺便反代了,相应地增加以下 hosts 即可:
# Wikipedia Start
# 维基百科语言众多,其他语言参照下面添加 xx.wikipedia.org 及 xx.m.wikipedia.org 的记录即可
127.0.0.1 en.wikipedia.org #英文维基百科桌面版
127.0.0.1 zh.wikipedia.org #中文维基百科桌面版
127.0.0.1 en.m.wikipedia.org #英文维基百科移动版
127.0.0.1 zh.m.wikipedia.org #中文维基百科移动版
127.0.0.1 zh-yue.wikipedia.org #粤文维基百科桌面版
127.0.0.1 wuu.wikipedia.org #吴语维基百科桌面版
127.0.0.1 ug.wikipedia.org #维吾尔文维基百科桌面版
127.0.0.1 ja.wikipedia.org #日文维基百科桌面版
# Wikipedia End
# Steam Community
127.0.0.1 store.steampowered.com
127.0.0.1 steamcommunity.com
# Steam Community End
法律适用
《国际联网暂行规定》第六条规定:“计算机信息网络直接进行国际联网,必须使用邮电部国家公用电信网提供的国际出入口信道。任何单位和个人不得自行建立或者使用其他信道进行国际联网。”Nginx 本地代理和服务器代理(代理服务器位于广州)使用的都是“公用电信网提供的国际出入口信道”,从日本 Pixiv 服务器到国内用户电脑/代理服务器的流量,使用的是正常流量通道,其间未对流量进行任何额外加密(仅有网页原有的 SSL 加密,用户和代理人并不掌握该 SSL 密钥,区别于 VPN 的流量加密),而 Nginx 获取到网页数据之后发生的整个代理过程完全在国内,不再适用国际互联网相关之规定。
其他
如果嫌每次手动开启 Nginx 麻烦,可以在确保无端口占用的情况下,将 nginx.exe
的添加到开机启动项中,方法可自行查找,不再赘述。
转载请注明出处: https://2heng.xin/2017/09/19/pixiv/
「樱花庄的白猫」原创文章:《PIXIV网页版及客户端访问恢复指南》,转载请保留出处!https://2heng.xin/2017/09/19/pixiv/
Q.E.D.
Comments | 2,600 条评论
博主 361949142
E绅士不显示预览图了是什么情况哦
博主 6302
求教
楼下这些ip是怎么获得的?与我在 https://www.diggui.com/ 里获得的有什么区别?
博主 468257060
upstream www-pixiv-net {
#server 104.18.42.239:443;
server 210.140.92.181:443;
server 210.140.92.183:443;
server 210.140.92.187:443;
}
upstream account-pixiv-net {
server 104.18.42.239:443;
server 210.140.92.179:443;
server 210.140.92.182:443;
server 210.140.92.185:443;
}
upstream sketch-pixiv-net {
server 210.140.174.37:443;
server 210.140.170.179:443;
server 210.140.175.130:443;
}
upstream sketch-hls-server {
server 210.140.170.179:443;
server 210.140.174.37:443;
server 210.140.175.130:443;
}
upstream imgaz-pixiv-net {
server 104.18.42.239:443;
server 210.140.131.144:443;
server 210.140.131.145:443;
server 210.140.131.147:443;
server 210.140.131.153:443;
}
upstream i-pximg-net {
server 210.140.139.129:443;
server 210.140.139.130:443;
server 210.140.139.131:443;
server 210.140.139.132:443;
server 210.140.139.133:443;
server 210.140.139.134:443;
server 210.140.139.135:443;
server 210.140.139.136:443;
server 210.140.139.137:443;
}
upstream app-api-pixiv-net {
server 104.18.42.239:443;
}
upstream fanbox-cc {
server 210.140.92.181:443;
server 210.140.92.183:443;
server 210.140.92.186:443;
}
server {
listen 80 default_server;
rewrite ^(.*) https://$host$1 permanent;
}
server {
listen 443 ssl;
server_name https://www.pixiv.net;
ssl_certificate ca/pixiv.net.crt;
ssl_certificate_key ca/pixiv.net.key;
client_max_body_size 50M;
location / {
#proxy_ssl_server_name on;
proxy_pass https://www-pixiv-net;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header Accept-Encoding '';
proxy_set_header Connection "Keep-Alive";
proxy_buffering off;
}
}
server {
listen 443 ssl;
server_name pixiv.net;
server_name ssl.pixiv.net;
server_name accounts.pixiv.net;
server_name touch.pixiv.net;
server_name oauth.secure.pixiv.net;
ssl_certificate ca/pixiv.net.crt;
ssl_certificate_key ca/pixiv.net.key;
client_max_body_size 50M;
location / {
proxy_pass https://account-pixiv-net;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header Accept-Encoding '';
proxy_set_header Connection "Keep-Alive";
proxy_buffering off;
}
}
server {
listen 443 ssl;
server_name i.pximg.net;
ssl_certificate ca/pixiv.net.crt;
ssl_certificate_key ca/pixiv.net.key;
location / {
proxy_pass https://i-pximg-net;
proxy_set_header Host $http_host;
proxy_ssl_server_name on;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header Accept-Encoding '';
proxy_set_header Connection "Keep-Alive";
proxy_buffering off;
}
}
server {
listen 443 ssl;
server_name sketch.pixiv.net;
ssl_certificate ca/pixiv.net.crt;
ssl_certificate_key ca/pixiv.net.key;
location / {
proxy_pass https://sketch-pixiv-net;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header Accept-Encoding '';
proxy_set_header Connection "Keep-Alive";
proxy_buffering off;
}
# Proxying WebSockets
location /ws/ {
proxy_pass https://sketch-pixiv-net;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}
}
server {
listen 443 ssl;
server_name *.pixivsketch.net;
ssl_certificate ca/pixiv.net.crt;
ssl_certificate_key ca/pixiv.net.key;
location / {
proxy_pass https://sketch-hls-server;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header Accept-Encoding '';
proxy_set_header Connection "Keep-Alive";
proxy_buffering off;
}
}
server {
listen 443 ssl;
server_name *.fanbox.cc;
server_name factory.pixiv.net;
server_name dic.pixiv.net;
server_name en-dic.pixiv.net;
server_name sensei.pixiv.net;
server_name payment.pixiv.net;
ssl_certificate ca/pixiv.net.crt;
ssl_certificate_key ca/pixiv.net.key;
location / {
proxy_pass https://fanbox-cc;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header Accept-Encoding '';
proxy_set_header Connection "Keep-Alive";
proxy_buffering off;
}
}
server {
listen 443 ssl;
server_name imgaz.pixiv.net;
server_name novel.pixiv.net;
server_name source.pixiv.net;
server_name comic.pixiv.net;
server_name i1.pixiv.net;
server_name i2.pixiv.net;
server_name i3.pixiv.net;
server_name i4.pixiv.net;
ssl_certificate ca/pixiv.net.crt;
ssl_certificate_key ca/pixiv.net.key;
location / {
proxy_pass https://imgaz-pixiv-net;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header Accept-Encoding '';
proxy_set_header Connection "Keep-Alive";
proxy_buffering off;
}
}
server {
listen 443 ssl;
server_name app-api.pixiv.net;
ssl_certificate ca/pixiv.net.crt;
ssl_certificate_key ca/pixiv.net.key;
location / {
proxy_pass https://app-api-pixiv-net;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header Accept-Encoding '';
proxy_set_header Connection "Keep-Alive";
proxy_buffering off;
}
}
server {
listen 443 ssl;
server_name https://www.google.com;
ssl_certificate ca/pixiv.net.crt;
ssl_certificate_key ca/pixiv.net.key;
location ^~ /recaptcha/ {
rewrite ^(.*)$ https://www.recaptcha.net$1 break;
}
location / {
default_type text/html;
charset utf-8;
return 200 'Pixiv-Nginx提醒:本工具默认代理了www.google.com,用于加载P站登陆时的验证码插件,如果你有方法正常访问www.google.com,并且不希望看到这个页面,那么将 <code>C:\Windows\System32\drivers\etc\hosts</code> 中 <code>127.0.0.1 www.google.com</code> 的那行记录删除即可。如果删除后刷新网页还是看到这个页面,请先清除一下浏览器缓存。';
}
}
server {
listen 443 ssl;
server_name sukebei.nyaa.si;
ssl_certificate ca/pixiv.net.crt;
ssl_certificate_key ca/pixiv.net.key;
location / {
proxy_pass https://198.251.89.38/;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header Accept-Encoding '';
proxy_buffering off;
}
}
server {
listen 443 ssl;
server_name nyaa.si;
server_name https://www.nyaa.si;
ssl_certificate ca/pixiv.net.crt;
ssl_certificate_key ca/pixiv.net.key;
location / {
proxy_pass https://186.2.163.20/;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header Accept-Encoding '';
proxy_buffering off;
}
}
upstream e-hentai-lb {
server 104.20.134.21:443;
server 104.20.135.21:443;
server 172.67.0.127:443;
}
server {
listen 443 ssl;
server_name e-hentai.org;
ssl_certificate ca/pixiv.net.crt;
ssl_certificate_key ca/pixiv.net.key;
location / {
proxy_pass https://e-hentai-lb/;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header Accept-Encoding '';
proxy_buffering off;
}
}
upstream www-pixiv-net {
#server 104.18.42.239:443;
server 210.140.92.181:443;
server 210.140.92.183:443;
server 210.140.92.187:443;
}
upstream account-pixiv-net {
server 104.18.42.239:443;
server 210.140.92.179:443;
server 210.140.92.182:443;
server 210.140.92.185:443;
}
upstream sketch-pixiv-net {
server 210.140.174.37:443;
server 210.140.170.179:443;
server 210.140.175.130:443;
}
upstream sketch-hls-server {
server 210.140.170.179:443;
server 210.140.174.37:443;
server 210.140.175.130:443;
}
upstream imgaz-pixiv-net {
server 104.18.42.239:443;
server 210.140.131.144:443;
server 210.140.131.145:443;
server 210.140.131.147:443;
server 210.140.131.153:443;
}
upstream i-pximg-net {
server 210.140.139.129:443;
server 210.140.139.130:443;
server 210.140.139.131:443;
server 210.140.139.132:443;
server 210.140.139.133:443;
server 210.140.139.134:443;
server 210.140.139.135:443;
server 210.140.139.136:443;
server 210.140.139.137:443;
}
upstream app-api-pixiv-net {
server 104.18.42.239:443;
}
upstream fanbox-cc {
server 210.140.92.181:443;
server 210.140.92.183:443;
server 210.140.92.186:443;
}
server {
listen 80 default_server;
rewrite ^(.*) https://$host$1 permanent;
}
server {
listen 443 ssl;
server_name https://www.pixiv.net;
ssl_certificate ca/pixiv.net.crt;
ssl_certificate_key ca/pixiv.net.key;
client_max_body_size 50M;
location / {
#proxy_ssl_server_name on;
proxy_pass https://www-pixiv-net;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header Accept-Encoding '';
proxy_set_header Connection "Keep-Alive";
proxy_buffering off;
}
}
server {
listen 443 ssl;
server_name pixiv.net;
server_name ssl.pixiv.net;
server_name accounts.pixiv.net;
server_name touch.pixiv.net;
server_name oauth.secure.pixiv.net;
ssl_certificate ca/pixiv.net.crt;
ssl_certificate_key ca/pixiv.net.key;
client_max_body_size 50M;
location / {
proxy_pass https://account-pixiv-net;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header Accept-Encoding '';
proxy_set_header Connection "Keep-Alive";
proxy_buffering off;
}
}
server {
listen 443 ssl;
server_name i.pximg.net;
ssl_certificate ca/pixiv.net.crt;
ssl_certificate_key ca/pixiv.net.key;
location / {
proxy_pass https://i-pximg-net;
proxy_set_header Host $http_host;
proxy_ssl_server_name on;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header Accept-Encoding '';
proxy_set_header Connection "Keep-Alive";
proxy_buffering off;
}
}
server {
listen 443 ssl;
server_name sketch.pixiv.net;
ssl_certificate ca/pixiv.net.crt;
ssl_certificate_key ca/pixiv.net.key;
location / {
proxy_pass https://sketch-pixiv-net;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header Accept-Encoding '';
proxy_set_header Connection "Keep-Alive";
proxy_buffering off;
}
# Proxying WebSockets
location /ws/ {
proxy_pass https://sketch-pixiv-net;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}
}
server {
listen 443 ssl;
server_name *.pixivsketch.net;
ssl_certificate ca/pixiv.net.crt;
ssl_certificate_key ca/pixiv.net.key;
location / {
proxy_pass https://sketch-hls-server;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header Accept-Encoding '';
proxy_set_header Connection "Keep-Alive";
proxy_buffering off;
}
}
server {
listen 443 ssl;
server_name *.fanbox.cc;
server_name factory.pixiv.net;
server_name dic.pixiv.net;
server_name en-dic.pixiv.net;
server_name sensei.pixiv.net;
server_name payment.pixiv.net;
ssl_certificate ca/pixiv.net.crt;
ssl_certificate_key ca/pixiv.net.key;
location / {
proxy_pass https://fanbox-cc;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header Accept-Encoding '';
proxy_set_header Connection "Keep-Alive";
proxy_buffering off;
}
}
server {
listen 443 ssl;
server_name imgaz.pixiv.net;
server_name novel.pixiv.net;
server_name source.pixiv.net;
server_name comic.pixiv.net;
server_name i1.pixiv.net;
server_name i2.pixiv.net;
server_name i3.pixiv.net;
server_name i4.pixiv.net;
ssl_certificate ca/pixiv.net.crt;
ssl_certificate_key ca/pixiv.net.key;
location / {
proxy_pass https://imgaz-pixiv-net;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header Accept-Encoding '';
proxy_set_header Connection "Keep-Alive";
proxy_buffering off;
}
}
server {
listen 443 ssl;
server_name app-api.pixiv.net;
ssl_certificate ca/pixiv.net.crt;
ssl_certificate_key ca/pixiv.net.key;
location / {
proxy_pass https://app-api-pixiv-net;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header Accept-Encoding '';
proxy_set_header Connection "Keep-Alive";
proxy_buffering off;
}
}
server {
listen 443 ssl;
server_name https://www.google.com;
ssl_certificate ca/pixiv.net.crt;
ssl_certificate_key ca/pixiv.net.key;
location ^~ /recaptcha/ {
rewrite ^(.*)$ https://www.recaptcha.net$1 break;
}
location / {
default_type text/html;
charset utf-8;
return 200 'Pixiv-Nginx提醒:本工具默认代理了www.google.com,用于加载P站登陆时的验证码插件,如果你有方法正常访问www.google.com,并且不希望看到这个页面,那么将 <code>C:\Windows\System32\drivers\etc\hosts</code> 中 <code>127.0.0.1 www.google.com</code> 的那行记录删除即可。如果删除后刷新网页还是看到这个页面,请先清除一下浏览器缓存。';
}
}
server {
listen 443 ssl;
server_name sukebei.nyaa.si;
ssl_certificate ca/pixiv.net.crt;
ssl_certificate_key ca/pixiv.net.key;
location / {
proxy_pass https://198.251.89.38/;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header Accept-Encoding '';
proxy_buffering off;
}
}
server {
listen 443 ssl;
server_name nyaa.si;
server_name https://www.nyaa.si;
ssl_certificate ca/pixiv.net.crt;
ssl_certificate_key ca/pixiv.net.key;
location / {
proxy_pass https://186.2.163.20/;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header Accept-Encoding '';
proxy_buffering off;
}
}
upstream e-hentai-lb {
server 104.20.134.21:443;
server 104.20.135.21:443;
server 172.67.0.127:443;
}
server {
listen 443 ssl;
server_name e-hentai.org;
ssl_certificate ca/pixiv.net.crt;
ssl_certificate_key ca/pixiv.net.key;
location / {
proxy_pass https://e-hentai-lb/;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header Accept-Encoding '';
proxy_buffering off;
}
}
博主 468257060
@468257060 sorry 不知道为什么复制了两次
博主 1913715490
@468257060 求教,这些host是怎么获得的?
博主 1913715490
@468257060 求教
这些ip是怎么获得的,与我在 https://www.diggui.com/ 里获得的有什么区别?
博主 6302
@468257060 求教
这些ip是怎么获得的,与我在 https://www.diggui.com/ 里获得的有什么区别?
博主 468257060
upstream www-pixiv-net {
#server 104.18.42.239:443;
server 210.140.92.181:443;
server 210.140.92.183:443;
server 210.140.92.187:443;
}
upstream account-pixiv-net {
server 104.18.42.239:443;
server 210.140.92.179:443;
server 210.140.92.182:443;
server 210.140.92.185:443;
}
upstream sketch-pixiv-net {
server 210.140.174.37:443;
server 210.140.170.179:443;
server 210.140.175.130:443;
}
upstream sketch-hls-server {
server 210.140.170.179:443;
server 210.140.174.37:443;
server 210.140.175.130:443;
}
upstream imgaz-pixiv-net {
server 104.18.42.239:443;
server 210.140.131.144:443;
server 210.140.131.145:443;
server 210.140.131.147:443;
server 210.140.131.153:443;
}
upstream i-pximg-net {
server 210.140.139.129:443;
server 210.140.139.130:443;
server 210.140.139.131:443;
server 210.140.139.132:443;
server 210.140.139.133:443;
server 210.140.139.134:443;
server 210.140.139.135:443;
server 210.140.139.136:443;
server 210.140.139.137:443;
}
upstream app-api-pixiv-net {
server 104.18.42.239:443;
}
upstream fanbox-cc {
server 210.140.92.181:443;
server 210.140.92.183:443;
server 210.140.92.186:443;
}
server {
listen 80 default_server;
rewrite ^(.*) https://$host$1 permanent;
}
server {
listen 443 ssl;
server_name https://www.pixiv.net;
ssl_certificate ca/pixiv.net.crt;
ssl_certificate_key ca/pixiv.net.key;
client_max_body_size 50M;
location / {
#proxy_ssl_server_name on;
proxy_pass https://www-pixiv-net;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header Accept-Encoding '';
proxy_set_header Connection "Keep-Alive";
proxy_buffering off;
}
}
server {
listen 443 ssl;
server_name pixiv.net;
server_name ssl.pixiv.net;
server_name accounts.pixiv.net;
server_name touch.pixiv.net;
server_name oauth.secure.pixiv.net;
ssl_certificate ca/pixiv.net.crt;
ssl_certificate_key ca/pixiv.net.key;
client_max_body_size 50M;
location / {
proxy_pass https://account-pixiv-net;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header Accept-Encoding '';
proxy_set_header Connection "Keep-Alive";
proxy_buffering off;
}
}
server {
listen 443 ssl;
server_name i.pximg.net;
ssl_certificate ca/pixiv.net.crt;
ssl_certificate_key ca/pixiv.net.key;
location / {
proxy_pass https://i-pximg-net;
proxy_set_header Host $http_host;
proxy_ssl_server_name on;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header Accept-Encoding '';
proxy_set_header Connection "Keep-Alive";
proxy_buffering off;
}
}
server {
listen 443 ssl;
server_name sketch.pixiv.net;
ssl_certificate ca/pixiv.net.crt;
ssl_certificate_key ca/pixiv.net.key;
location / {
proxy_pass https://sketch-pixiv-net;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header Accept-Encoding '';
proxy_set_header Connection "Keep-Alive";
proxy_buffering off;
}
# Proxying WebSockets
location /ws/ {
proxy_pass https://sketch-pixiv-net;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}
}
server {
listen 443 ssl;
server_name *.pixivsketch.net;
ssl_certificate ca/pixiv.net.crt;
ssl_certificate_key ca/pixiv.net.key;
location / {
proxy_pass https://sketch-hls-server;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header Accept-Encoding '';
proxy_set_header Connection "Keep-Alive";
proxy_buffering off;
}
}
server {
listen 443 ssl;
server_name *.fanbox.cc;
server_name factory.pixiv.net;
server_name dic.pixiv.net;
server_name en-dic.pixiv.net;
server_name sensei.pixiv.net;
server_name payment.pixiv.net;
ssl_certificate ca/pixiv.net.crt;
ssl_certificate_key ca/pixiv.net.key;
location / {
proxy_pass https://fanbox-cc;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header Accept-Encoding '';
proxy_set_header Connection "Keep-Alive";
proxy_buffering off;
}
}
server {
listen 443 ssl;
server_name imgaz.pixiv.net;
server_name novel.pixiv.net;
server_name source.pixiv.net;
server_name comic.pixiv.net;
server_name i1.pixiv.net;
server_name i2.pixiv.net;
server_name i3.pixiv.net;
server_name i4.pixiv.net;
ssl_certificate ca/pixiv.net.crt;
ssl_certificate_key ca/pixiv.net.key;
location / {
proxy_pass https://imgaz-pixiv-net;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header Accept-Encoding '';
proxy_set_header Connection "Keep-Alive";
proxy_buffering off;
}
}
server {
listen 443 ssl;
server_name app-api.pixiv.net;
ssl_certificate ca/pixiv.net.crt;
ssl_certificate_key ca/pixiv.net.key;
location / {
proxy_pass https://app-api-pixiv-net;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header Accept-Encoding '';
proxy_set_header Connection "Keep-Alive";
proxy_buffering off;
}
}
server {
listen 443 ssl;
server_name https://www.google.com;
ssl_certificate ca/pixiv.net.crt;
ssl_certificate_key ca/pixiv.net.key;
location ^~ /recaptcha/ {
rewrite ^(.*)$ https://www.recaptcha.net$1 break;
}
location / {
default_type text/html;
charset utf-8;
return 200 'Pixiv-Nginx提醒:本工具默认代理了www.google.com,用于加载P站登陆时的验证码插件,如果你有方法正常访问www.google.com,并且不希望看到这个页面,那么将 <code>C:\Windows\System32\drivers\etc\hosts</code> 中 <code>127.0.0.1 www.google.com</code> 的那行记录删除即可。如果删除后刷新网页还是看到这个页面,请先清除一下浏览器缓存。';
}
}
server {
listen 443 ssl;
server_name sukebei.nyaa.si;
ssl_certificate ca/pixiv.net.crt;
ssl_certificate_key ca/pixiv.net.key;
location / {
proxy_pass https://198.251.89.38/;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header Accept-Encoding '';
proxy_buffering off;
}
}
server {
listen 443 ssl;
server_name nyaa.si;
server_name https://www.nyaa.si;
ssl_certificate ca/pixiv.net.crt;
ssl_certificate_key ca/pixiv.net.key;
location / {
proxy_pass https://186.2.163.20/;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header Accept-Encoding '';
proxy_buffering off;
}
}
upstream e-hentai-lb {
server 104.20.134.21:443;
server 104.20.135.21:443;
server 172.67.0.127:443;
}
server {
listen 443 ssl;
server_name e-hentai.org;
ssl_certificate ca/pixiv.net.crt;
ssl_certificate_key ca/pixiv.net.key;
location / {
proxy_pass https://e-hentai-lb/;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real_IP $remote_addr;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header Accept-Encoding '';
proxy_buffering off;
}
}
博主 6302
@468257060 求教
这些ip是怎么获得的?与我在 https://www.diggui.com/ 里获得的有什么区别?
博主 nixoni
有哪位大手子知道最新的hosts吗?
博主 3536056376
我真的不是机器人,让我进去
博主 menkaola
我的nginx已经在运行了,为什么P站还是打不开呢?
博主 Dask'
( ̄▽ ̄)
博主 Firefly火莹
大佬 无法正常加载图片有办法解决么
博主 梦
不行了
博主 HuanzuoSP
https://www.pixiv.net套cloudflare了
博主 小菜壁
nginx点开一闪而过
error.log里是signal process started
博主 小菜壁
@小菜壁 没事没事,是我zz了
博主 bvvd狩猎人
麻,用了前面几位老哥改ip的方法,无非就是502快了点而已
博主 山田うどん
@bvvd狩猎人 俺也一样
博主 aofen11
502的可以试一试:先确保nginx关闭,然后用notepad++(自行百度下载)打开配置文件中的pixiv.conf文件(找不到可以用everything软件搜索),打开文件后,在“upstream www-pixiv-net”一栏可以看到5行数字,前两行不用改动,把后三行的数字替换成
210.140.92.186
210.140.92.183
210.140.92.180 然后保存,再启动nginx试一试,刚刚我就是这么解决的
博主 长尾鲮
@aofen11 P站是能上了,但是图加载不出来怎么办?
博主 bill
@aofen11 能上但动态图不能动了,你的正常吗?
博主 Bob Fake "STEVE"nson
@aofen11 <其实要在这3行IP后面加上端口“443”(“:443”)>