diff --git a/README.md b/README.md index 6ec5843..e588864 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,219 @@ # vixip pixiv向けプライバシーUI。 + +# インストールする方法 + +## ① 従属ソフト + +### Devuan + +```sh +sudo echo "deb https://packages.sury.org/php/ bullseye main" > /etc/apt/sources.list.d/sury-php.list +sudo echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/debian bullseye nginx" > /etc/apt/sources.list.d/nginx.list +sudo apt update +sudo apt install curl php8.2 php8.2-curl php8.2-fpm nginx +sudo service nginx start +sudo service php-fpm start +``` + +### Artix + +```sh +sudo pacman -S curl php php-fpm nginx +sudo /etc/init.d/nginx start +sudo /etc/init.d/php-fpm start +``` + +### Crux + +```sh +su +sed -i 's|#prtdir /usr/ports/contrib|prtdir /usr/ports/contrib|' /etc/prt-get.conf +ports -u +prt-get depinst curl php php-fpm nginx +/etc/rc.d/nginx start +/etc/rc.d/php-fpm start +``` + +### OpenBSD + +```sh +doas pkg_add curl php php-fpm php-curl +rcctl enable httpd php-fpm relayd +rcctl start httpd php-fpm relayd +``` + +### FreeBSD + +```sh +sudo pkg install curl php82 php82-curl php82-extensions nginx +sudo echo 'nginx_enable="YES"' >> /etc/rc.conf +sudo echo 'php_fpm_enable="YES"' >> /etc/rc.conf +sudo service nginx start +sudo service php-fpm start +``` + +### Void + +```sh +sudo xbps-install -S curl php php-fpm nginx +sudo ln -s /etc/runit/sv/nginx /run/runit/service +sudo ln -s /etc/runit/sv/php-fpm /run/runit/service +sudo sv nginx start +sudo sv php-fpm start +``` + +### WindowsかmacOS + +不安のソフトは未対応です。 + +## ② 設置 + +### 全部(opendoasを使わなければ、sudoをご利用、又はopendoasをインストールして下さい) + +```sh +doas mkdir -p /var/www/htdocs +cd /var/www/htdocs +doas git clone https://gitler.moe/suwako/vixip.git +cd vixip +doas mv config.{example.,}php +doas nvim config.php +``` + +SITEURLは自分のURL(TLDまで)をご入力下さい。\ +SESSION_IDは自分のPixivアカウントのクッキーから受け取って下さい(別のアカウントを創作するのはオススメです)。 + +### OpenBSD + +```sh +nvim /etc/httpd.conf +``` + +``` +server "DOMAIN" { + listen on * port 80 + location "/.well-known/acme-challenge/*" { + root "/acme" + request strip 2 + } + block return 301 "https://DOMAIN$REQUEST_URI" +} + +server "DOMAIN" { + listen on * tls port 443 + root "/htdocs/vixip/www" + directory index "index.php" + fastcgi socket "/run/php-fpm.sock" + tls { + certificate "/etc/ssl/DOMAIN.fullchain.pem" + key "/etc/ssl/private/DOMAIN.key" + } + location "/.well-known/acme-challenge/*" { + root "/acme" + request strip 2 + } +} +``` + +### nginx + +注意:FreeBSDの場合、/usr/local/etc/nginx/conf.d/vixip.confと成ります。 + +```sh +nvim /etc/nginx/conf.d/vixip.conf +``` + +``` +server { + server_name DOMAIN; + root /var/www/htdocs/vixip/www; + index index.php; + add_header Permissions-Policy interest-cohort=(); + add_header X-Content-Type-Options nosniff; + add_header X-XSS-Protection "1; mode=block"; + add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains; preload'; + + location / { + try_files $uri $uri/ /index.php?id=$args; + } + + location ~ \.php$ { + try_files $uri =404; + fastcgi_pass unix:/var/run/php/php8.1-fpm.sock; + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + } + + location = /favicon.ico { + log_not_found off; + access_log off; + } + + location ~* \.(jpg|jpeg|png|gif|ico|svg|webp|mp4)$ { + expires 365d; + } + + location ~* \.(css|js|json)$ { + expires 7d; + } + + location ~ \.(oga|mp4|ogg|ogv|webm|mp3)$ { + max_ranges 0; + } + + listen 443 ssl; + ssl_certificate /etc/letsencrypt/live/DOMAIN/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/DOMAIN/privkey.pem; + include /etc/letsencrypt/options-ssl-nginx.conf; +} + +server { + if ($host = DOMAIN) { return 301 https://$host$request_uri; } + listen 80; + server_name DOMAIN; + return 404; +``` + +# PixivからSESSION_IDの受取 + +新しいPixivアカウントを創作して、ログインして、F12を押して下さい。 + +## Firefoxの場合 + +調査:\ +ストレージ→Cookie→https://www.pixiv.net + +## Chromiumの場合 + +検証:\ +Application→Cookies→https://www.pixiv.net + +## Pale MoonとBasiliskの場合 + +Inspect Element:\ +(まずはStorageを有効にして) +Storage→Cookies→https://www.pixiv.net + +PHPSESSIDの値をコピーして、config.phpに貼って下さい。 + +# インスタンス一覧 + +## 一般ネット + +| ウエブサイト | [クラフレ](http://jezf25zgvxlsvuzdzm6fg2hoetmruhy4uxnolyw46tuh4jugcwc7byqd.onion/Cloudflare%E3%82%92%E4%BD%BF%E3%82%8F%E3%81%AA%E3%81%84%E7%90%86%E7%94%B1%EF%BC%88%E3%83%AA%E3%83%81%E3%83%A3%E3%83%BC%E3%83%89%E3%83%BB%E3%82%B9%E3%83%88%E3%83%BC%E3%83%AB%E3%83%9E%E3%83%B3%EF%BC%89) | 注 | +| -- | -- | -- | +| [https://pixiv.owacon.moe/](https://pixiv.owacon.moe/) | 無 | 公式インスタンス | + +## Tor + +| オニオン | 注 | +| -- | -- | +| | | + +## I2P + +| イープサイト | 注 | +| -- | -- | +| | |