|
|
|
# Include configuration file
|
|
|
|
# Describes common rules for available locations at
|
|
|
|
# nginx/opennet/locations
|
|
|
|
|
|
|
|
# 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;
|
|
|
|
|
|
|
|
# Prevent out redirects (issue #2)
|
|
|
|
proxy_intercept_errors on;
|
|
|
|
error_page 301 302 307 = @opennet_locations_handle_redirect;
|
|
|
|
|
|
|
|
# Replace all matches
|
|
|
|
sub_filter_once off;
|
|
|
|
|
|
|
|
# Enable multimedia replacement
|
|
|
|
sub_filter_types *;
|
|
|
|
|
|
|
|
# Disable JS / trackers by default
|
|
|
|
sub_filter '<script' '<!-- <script';
|
|
|
|
sub_filter '</script>' '</script> -->';
|
|
|
|
|
|
|
|
# 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/opennet" target="_blank">YGGbro</a></body>';
|
|
|
|
|
|
|
|
# Links
|
|
|
|
|
|
|
|
# .
|
|
|
|
sub_filter 'http://opennet.ru' 'http://[$server_addr]/opennet';
|
|
|
|
sub_filter 'https://opennet.ru' 'http://[$server_addr]/opennet';
|
|
|
|
|
|
|
|
sub_filter 'http://opennet.me' 'http://[$server_addr]/opennet';
|
|
|
|
sub_filter 'https://opennet.me' 'http://[$server_addr]/opennet';
|
|
|
|
|
|
|
|
# www
|
|
|
|
sub_filter 'http://www.opennet.ru' 'http://[$server_addr]/opennet/www';
|
|
|
|
sub_filter 'https://www.opennet.ru' 'http://[$server_addr]/opennet/www';
|
|
|
|
|
|
|
|
sub_filter 'http://www.opennet.me' 'http://[$server_addr]/opennet/www';
|
|
|
|
sub_filter 'https://www.opennet.me' 'http://[$server_addr]/opennet/www';
|
|
|
|
|
|
|
|
# m
|
|
|
|
sub_filter 'http://m.opennet.ru' 'http://[$server_addr]/opennet/m';
|
|
|
|
sub_filter 'https://m.opennet.ru' 'http://[$server_addr]/opennet/m';
|
|
|
|
|
|
|
|
sub_filter 'http://m.opennet.me' 'http://[$server_addr]/opennet/m';
|
|
|
|
sub_filter 'https://m.opennet.me' 'http://[$server_addr]/opennet/m';
|
|
|
|
|
|
|
|
# mobile
|
|
|
|
sub_filter 'http://mobile.opennet.ru' 'http://[$server_addr]/opennet/mobile';
|
|
|
|
sub_filter 'https://mobile.opennet.ru' 'http://[$server_addr]/opennet/mobile';
|
|
|
|
|
|
|
|
sub_filter 'http://mobile.opennet.me' 'http://[$server_addr]/opennet/mobile';
|
|
|
|
sub_filter 'https://mobile.opennet.me' 'http://[$server_addr]/opennet/mobile';
|
|
|
|
|
|
|
|
# wiki
|
|
|
|
sub_filter 'http://wiki.opennet.ru' 'http://[$server_addr]/opennet/wiki';
|
|
|
|
sub_filter 'https://wiki.opennet.ru' 'http://[$server_addr]/opennet/wiki';
|
|
|
|
|
|
|
|
sub_filter 'http://wiki.opennet.me' 'http://[$server_addr]/opennet/wiki';
|
|
|
|
sub_filter 'https://wiki.opennet.me' 'http://[$server_addr]/opennet/wiki';
|
|
|
|
|
|
|
|
# solaris
|
|
|
|
sub_filter 'http://solaris.opennet.ru' 'http://[$server_addr]/opennet/solaris';
|
|
|
|
sub_filter 'https://solaris.opennet.ru' 'http://[$server_addr]/opennet/solaris';
|
|
|
|
|
|
|
|
sub_filter 'http://solaris.opennet.me' 'http://[$server_addr]/opennet/solaris';
|
|
|
|
sub_filter 'https://solaris.opennet.me' 'http://[$server_addr]/opennet/solaris';
|
|
|
|
|
|
|
|
# bsd
|
|
|
|
sub_filter 'http://bsd.opennet.ru' 'http://[$server_addr]/opennet/bsd';
|
|
|
|
sub_filter 'https://bsd.opennet.ru' 'http://[$server_addr]/opennet/bsd';
|
|
|
|
|
|
|
|
sub_filter 'http://bsd.opennet.me' 'http://[$server_addr]/opennet/bsd';
|
|
|
|
sub_filter 'https://bsd.opennet.me' 'http://[$server_addr]/opennet/bsd';
|
|
|
|
|
|
|
|
# cisco
|
|
|
|
sub_filter 'http://cisco.opennet.ru' 'http://[$server_addr]/opennet/cisco';
|
|
|
|
sub_filter 'https://cisco.opennet.ru' 'http://[$server_addr]/opennet/cisco';
|
|
|
|
|
|
|
|
sub_filter 'http://cisco.opennet.me' 'http://[$server_addr]/opennet/cisco';
|
|
|
|
sub_filter 'https://cisco.opennet.me' 'http://[$server_addr]/opennet/cisco';
|
|
|
|
|
|
|
|
# linux
|
|
|
|
sub_filter 'http://linux.opennet.ru' 'http://[$server_addr]/opennet/linux';
|
|
|
|
sub_filter 'https://linux.opennet.ru' 'http://[$server_addr]/opennet/linux';
|
|
|
|
|
|
|
|
sub_filter 'http://linux.opennet.me' 'http://[$server_addr]/opennet/linux';
|
|
|
|
sub_filter 'https://linux.opennet.me' 'http://[$server_addr]/opennet/linux';
|
|
|
|
|
|
|
|
# web
|
|
|
|
sub_filter 'http://web.opennet.ru' 'http://[$server_addr]/opennet/web';
|
|
|
|
sub_filter 'https://web.opennet.ru' 'http://[$server_addr]/opennet/web';
|
|
|
|
|
|
|
|
sub_filter 'http://web.opennet.me' 'http://[$server_addr]/opennet/web';
|
|
|
|
sub_filter 'https://web.opennet.me' 'http://[$server_addr]/opennet/web';
|
|
|
|
|
|
|
|
# security
|
|
|
|
sub_filter 'http://security.opennet.ru' 'http://[$server_addr]/opennet/security';
|
|
|
|
sub_filter 'https://security.opennet.ru' 'http://[$server_addr]/opennet/security';
|
|
|
|
|
|
|
|
sub_filter 'http://security.opennet.me' 'http://[$server_addr]/opennet/security';
|
|
|
|
sub_filter 'https://security.opennet.me' 'http://[$server_addr]/opennet/security';
|
|
|
|
|
|
|
|
# palm
|
|
|
|
sub_filter 'http://palm.opennet.ru' 'http://[$server_addr]/opennet/palm';
|
|
|
|
sub_filter 'https://palm.opennet.ru' 'http://[$server_addr]/opennet/palm';
|
|
|
|
|
|
|
|
sub_filter 'http://palm.opennet.me' 'http://[$server_addr]/opennet/palm';
|
|
|
|
sub_filter 'https://palm.opennet.me' 'http://[$server_addr]/opennet/palm';
|
|
|
|
|
|
|
|
# grab
|
|
|
|
sub_filter 'http://grab.opennet.ru' 'http://[$server_addr]/opennet/grab';
|
|
|
|
sub_filter 'https://grab.opennet.ru' 'http://[$server_addr]/opennet/grab';
|
|
|
|
|
|
|
|
sub_filter 'http://grab.opennet.me' 'http://[$server_addr]/opennet/grab';
|
|
|
|
sub_filter 'https://grab.opennet.me' 'http://[$server_addr]/opennet/grab';
|
|
|
|
|
|
|
|
# forum
|
|
|
|
sub_filter 'http://forum.opennet.ru' 'http://[$server_addr]/opennet/wwwcgi-bin/openforum/vsluhboard.cgi';
|
|
|
|
sub_filter 'https://forum.opennet.ru' 'http://[$server_addr]/opennet/wwwcgi-bin/openforum/vsluhboard.cgi';
|
|
|
|
|
|
|
|
sub_filter 'http://forum.opennet.me' 'http://[$server_addr]/opennet/wwwcgi-bin/openforum/vsluhboard.cgi';
|
|
|
|
sub_filter 'https://forum.opennet.me' 'http://[$server_addr]/opennet/wwwcgi-bin/openforum/vsluhboard.cgi';
|
|
|
|
|
|
|
|
sub_filter '/forum' '/cgi-bin/openforum/vsluhboard.cgi';
|
|
|
|
sub_filter './forum' 'http://[$server_addr]/opennet/wwwcgi-bin/openforum/vsluhboard.cgi';
|