Collection of web proxies with configuration examples for Yggdrasil
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.2 KiB

server {
# HTTP/IPv6 only
listen [::]:80;
# Yggdrasil only
allow 0200::/7;
deny all;
server_name pingvinus.ru.bro.ygg;
location / {
# Forward to server
proxy_pass https://pingvinus.ru/;
# Tell to server, that's proxy request
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Accept-Encoding "";
# Replace links
sub_filter_once off;
sub_filter_types *;
sub_filter 'http://pingvinus.ru' 'http://pingvinus.ru.bro.ygg';
sub_filter 'https://pingvinus.ru' 'http://pingvinus.ru.bro.ygg';
sub_filter '<script' '<!-- <script';
sub_filter '</script>' '</script> -->';
sub_filter 'href="/' 'href="http://pingvinus.ru.bro.ygg/';
sub_filter 'src="/' 'src="http://pingvinus.ru.bro.ygg/';
sub_filter 'data-src="/' 'src="http://pingvinus.ru.bro.ygg/';
sub_filter "url('/" "url('http://pingvinus.ru.bro.ygg/";
# Feedback link to project repository
sub_filter '</body>' '<a style="position:fixed;top:20px;right:20px;z-index:999" href="https://github.com/YGGverse/YGGbro/tree/main/nginx/pingvinus.ru/pingvinus.ru.bro.ygg" target="_blank">YGGbro</a></body>';
}
}