From 1872672f647820cb2eaa868d365ef6f24fce59f8 Mon Sep 17 00:00:00 2001 From: ghost Date: Sun, 3 Dec 2023 19:22:47 +0200 Subject: [PATCH] add bro.ygg --- nginx/opennet.bro.ygg/README.md | 36 +++++ nginx/opennet.bro.ygg/handles/redirect.conf | 9 ++ .../locations/include/common.conf | 126 ++++++++++++++++++ nginx/opennet.bro.ygg/server.conf | 38 ++++++ .../servers/bsd.opennet.bro.ygg.conf | 29 ++++ .../servers/cisco.opennet.bro.ygg.conf | 29 ++++ .../servers/grab.opennet.bro.ygg.conf | 29 ++++ .../servers/linux.opennet.bro.ygg.conf | 29 ++++ .../servers/m.opennet.bro.ygg.conf | 29 ++++ .../servers/mobile.opennet.bro.ygg.conf | 29 ++++ .../servers/opennet.bro.ygg.conf | 29 ++++ .../servers/palm.opennet.bro.ygg.conf | 29 ++++ .../servers/security.opennet.bro.ygg.conf | 29 ++++ .../servers/solaris.opennet.bro.ygg.conf | 29 ++++ .../servers/web.opennet.bro.ygg.conf | 29 ++++ .../servers/wiki.opennet.bro.ygg.conf | 29 ++++ .../servers/www.opennet.bro.ygg.conf | 29 ++++ 17 files changed, 586 insertions(+) create mode 100644 nginx/opennet.bro.ygg/README.md create mode 100644 nginx/opennet.bro.ygg/handles/redirect.conf create mode 100644 nginx/opennet.bro.ygg/locations/include/common.conf create mode 100644 nginx/opennet.bro.ygg/server.conf create mode 100644 nginx/opennet.bro.ygg/servers/bsd.opennet.bro.ygg.conf create mode 100644 nginx/opennet.bro.ygg/servers/cisco.opennet.bro.ygg.conf create mode 100644 nginx/opennet.bro.ygg/servers/grab.opennet.bro.ygg.conf create mode 100644 nginx/opennet.bro.ygg/servers/linux.opennet.bro.ygg.conf create mode 100644 nginx/opennet.bro.ygg/servers/m.opennet.bro.ygg.conf create mode 100644 nginx/opennet.bro.ygg/servers/mobile.opennet.bro.ygg.conf create mode 100644 nginx/opennet.bro.ygg/servers/opennet.bro.ygg.conf create mode 100644 nginx/opennet.bro.ygg/servers/palm.opennet.bro.ygg.conf create mode 100644 nginx/opennet.bro.ygg/servers/security.opennet.bro.ygg.conf create mode 100644 nginx/opennet.bro.ygg/servers/solaris.opennet.bro.ygg.conf create mode 100644 nginx/opennet.bro.ygg/servers/web.opennet.bro.ygg.conf create mode 100644 nginx/opennet.bro.ygg/servers/wiki.opennet.bro.ygg.conf create mode 100644 nginx/opennet.bro.ygg/servers/www.opennet.bro.ygg.conf diff --git a/nginx/opennet.bro.ygg/README.md b/nginx/opennet.bro.ygg/README.md new file mode 100644 index 0000000..1a895ac --- /dev/null +++ b/nginx/opennet.bro.ygg/README.md @@ -0,0 +1,36 @@ +# Nginx proxy configuration for OpenNet located at .opennet.bro.ygg + +Current implementation forward subdomains to following locations: + +* `opennet.ru` > `http://opennet.bro.ygg` +* `www.opennet.ru` > `http://www.opennet.bro.ygg` +* `bsd.opennet.ru` > `http://bsd.opennet.bro.ygg` +* `cisco.opennet.ru` > `http://cisco.opennet.bro.ygg` +* `grab.opennet.ru` > `http://grab.opennet.bro.ygg` +* `linux.opennet.ru` > `http://linux.opennet.bro.ygg` +* `m.opennet.ru` > `http://m.opennet.bro.ygg` +* `mobile.opennet.ru` > `http://mobile.opennet.bro.ygg` +* `palm.opennet.ru` > `http://palm.opennet.bro.ygg` +* `security.opennet.ru` > `http://security.opennet.bro.ygg` +* `solaris.opennet.ru` > `http://solaris.opennet.bro.ygg` +* `web.opennet.ru` > `http://web.opennet.bro.ygg` +* `wiki.opennet.ru` > `http://wiki.opennet.bro.ygg` +* `forum.opennet.ru` > `http://opennet.bro.ygg/wwwcgi-bin/openforum/vsluhboard.cgi` + +## Install + +* `ln -s /etc/yggbro/nginx/opennet.bro.ygg/server.conf /etc/nginx/sites-enabled/yggbro.opennet.bro.ygg.conf` +* `nginx -t` +* `service nginx reload` + +## Uninstall + +* `rm /etc/nginx/sites-enabled/yggbro.opennet.bro.ygg.conf` +* `nginx -t` +* `service nginx reload` + +## Issues + +1. At this moment, config drops all JS some tabs could not work +2. Youtube embedded content still works +3. Redirect cases for some sub-domains require additional rules implementation \ No newline at end of file diff --git a/nginx/opennet.bro.ygg/handles/redirect.conf b/nginx/opennet.bro.ygg/handles/redirect.conf new file mode 100644 index 0000000..1432673 --- /dev/null +++ b/nginx/opennet.bro.ygg/handles/redirect.conf @@ -0,0 +1,9 @@ +# Prevent out redirects (solution for issue #2) + +location @yggbro_nginx_opennet_bro_ygg_handles_redirect { + + set $original_uri $uri; + set $orig_loc $upstream_http_location; + + proxy_pass $orig_loc; +} \ No newline at end of file diff --git a/nginx/opennet.bro.ygg/locations/include/common.conf b/nginx/opennet.bro.ygg/locations/include/common.conf new file mode 100644 index 0000000..5f82493 --- /dev/null +++ b/nginx/opennet.bro.ygg/locations/include/common.conf @@ -0,0 +1,126 @@ +# Include configuration file +# Describes common rules for available 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 = @yggbro_nginx_opennet_bro_ygg_handles_redirect; + +# Replace all matches +sub_filter_once off; + +# Enable multimedia replacement +sub_filter_types *; + +# Disable JS / trackers by default +sub_filter '' ' -->'; + +# Feedback link to project repository +sub_filter '' 'YGGbro'; + +# Links + +# . +sub_filter 'http://opennet.ru' 'http://opennet.bro.ygg'; +sub_filter 'https://opennet.ru' 'http://opennet.bro.ygg'; + +sub_filter 'http://opennet.me' 'http://opennet.bro.ygg'; +sub_filter 'https://opennet.me' 'http://opennet.bro.ygg'; + +# www +sub_filter 'http://www.opennet.ru' 'http://www.opennet.bro.ygg'; +sub_filter 'https://www.opennet.ru' 'http://www.opennet.bro.ygg'; + +sub_filter 'http://www.opennet.me' 'http://www.opennet.bro.ygg'; +sub_filter 'https://www.opennet.me' 'http://www.opennet.bro.ygg'; + +# m +sub_filter 'http://m.opennet.ru' 'http://m.opennet.bro.ygg'; +sub_filter 'https://m.opennet.ru' 'http://m.opennet.bro.ygg'; + +sub_filter 'http://m.opennet.me' 'http://m.opennet.bro.ygg'; +sub_filter 'https://m.opennet.me' 'http://m.opennet.bro.ygg'; + +# mobile +sub_filter 'http://mobile.opennet.ru' 'http://mobile.opennet.bro.ygg'; +sub_filter 'https://mobile.opennet.ru' 'http://mobile.opennet.bro.ygg'; + +sub_filter 'http://mobile.opennet.me' 'http://mobile.opennet.bro.ygg'; +sub_filter 'https://mobile.opennet.me' 'http://mobile.opennet.bro.ygg'; + +# wiki +sub_filter 'http://wiki.opennet.ru' 'http://wiki.opennet.bro.ygg'; +sub_filter 'https://wiki.opennet.ru' 'http://wiki.opennet.bro.ygg'; + +sub_filter 'http://wiki.opennet.me' 'http://wiki.opennet.bro.ygg'; +sub_filter 'https://wiki.opennet.me' 'http://wiki.opennet.bro.ygg'; + +# solaris +sub_filter 'http://solaris.opennet.ru' 'http://solaris.opennet.bro.ygg'; +sub_filter 'https://solaris.opennet.ru' 'http://solaris.opennet.bro.ygg'; + +sub_filter 'http://solaris.opennet.me' 'http://solaris.opennet.bro.ygg'; +sub_filter 'https://solaris.opennet.me' 'http://solaris.opennet.bro.ygg'; + +# bsd +sub_filter 'http://bsd.opennet.ru' 'http://bsd.opennet.bro.ygg'; +sub_filter 'https://bsd.opennet.ru' 'http://bsd.opennet.bro.ygg'; + +sub_filter 'http://bsd.opennet.me' 'http://bsd.opennet.bro.ygg'; +sub_filter 'https://bsd.opennet.me' 'http://bsd.opennet.bro.ygg'; + +# cisco +sub_filter 'http://cisco.opennet.ru' 'http://cisco.opennet.bro.ygg'; +sub_filter 'https://cisco.opennet.ru' 'http://cisco.opennet.bro.ygg'; + +sub_filter 'http://cisco.opennet.me' 'http://cisco.opennet.bro.ygg'; +sub_filter 'https://cisco.opennet.me' 'http://cisco.opennet.bro.ygg'; + +# linux +sub_filter 'http://linux.opennet.ru' 'http://linux.opennet.bro.ygg'; +sub_filter 'https://linux.opennet.ru' 'http://linux.opennet.bro.ygg'; + +sub_filter 'http://linux.opennet.me' 'http://linux.opennet.bro.ygg'; +sub_filter 'https://linux.opennet.me' 'http://linux.opennet.bro.ygg'; + +# web +sub_filter 'http://web.opennet.ru' 'http://web.opennet.bro.ygg'; +sub_filter 'https://web.opennet.ru' 'http://web.opennet.bro.ygg'; + +sub_filter 'http://web.opennet.me' 'http://web.opennet.bro.ygg'; +sub_filter 'https://web.opennet.me' 'http://web.opennet.bro.ygg'; + +# security +sub_filter 'http://security.opennet.ru' 'http://security.opennet.bro.ygg'; +sub_filter 'https://security.opennet.ru' 'http://security.opennet.bro.ygg'; + +sub_filter 'http://security.opennet.me' 'http://security.opennet.bro.ygg'; +sub_filter 'https://security.opennet.me' 'http://security.opennet.bro.ygg'; + +# palm +sub_filter 'http://palm.opennet.ru' 'http://palm.opennet.bro.ygg'; +sub_filter 'https://palm.opennet.ru' 'http://palm.opennet.bro.ygg'; + +sub_filter 'http://palm.opennet.me' 'http://palm.opennet.bro.ygg'; +sub_filter 'https://palm.opennet.me' 'http://palm.opennet.bro.ygg'; + +# grab +sub_filter 'http://grab.opennet.ru' 'http://grab.opennet.bro.ygg'; +sub_filter 'https://grab.opennet.ru' 'http://grab.opennet.bro.ygg'; + +sub_filter 'http://grab.opennet.me' 'http://grab.opennet.bro.ygg'; +sub_filter 'https://grab.opennet.me' 'http://grab.opennet.bro.ygg'; + +# forum +sub_filter 'http://forum.opennet.ru' 'http://opennet.bro.ygg/wwwcgi-bin/openforum/vsluhboard.cgi'; +sub_filter 'https://forum.opennet.ru' 'http://opennet.bro.ygg/wwwcgi-bin/openforum/vsluhboard.cgi'; + +sub_filter 'http://forum.opennet.me' 'http://opennet.bro.ygg/wwwcgi-bin/openforum/vsluhboard.cgi'; +sub_filter 'https://forum.opennet.me' 'http://opennet.bro.ygg/wwwcgi-bin/openforum/vsluhboard.cgi'; + +sub_filter '/forum' '/cgi-bin/openforum/vsluhboard.cgi'; +sub_filter './forum' 'http://opennet.bro.ygg/wwwcgi-bin/openforum/vsluhboard.cgi'; \ No newline at end of file diff --git a/nginx/opennet.bro.ygg/server.conf b/nginx/opennet.bro.ygg/server.conf new file mode 100644 index 0000000..2ad3a57 --- /dev/null +++ b/nginx/opennet.bro.ygg/server.conf @@ -0,0 +1,38 @@ +# www-less +include /etc/yggbro/nginx/opennet.bro.ygg/servers/opennet.bro.ygg.conf; + +# www +include /etc/yggbro/nginx/opennet.bro.ygg/servers/www.opennet.bro.ygg.conf; + +# bsd +include /etc/yggbro/nginx/opennet.bro.ygg/servers/bsd.opennet.bro.ygg.conf; + +# cisco +include /etc/yggbro/nginx/opennet.bro.ygg/servers/cisco.opennet.bro.ygg.conf; + +# grab +include /etc/yggbro/nginx/opennet.bro.ygg/servers/grab.opennet.bro.ygg.conf; + +# linux +include /etc/yggbro/nginx/opennet.bro.ygg/servers/linux.opennet.bro.ygg.conf; + +# m +include /etc/yggbro/nginx/opennet.bro.ygg/servers/m.opennet.bro.ygg.conf; + +# mobile +include /etc/yggbro/nginx/opennet.bro.ygg/servers/mobile.opennet.bro.ygg.conf; + +# palm +include /etc/yggbro/nginx/opennet.bro.ygg/servers/palm.opennet.bro.ygg.conf; + +# security +include /etc/yggbro/nginx/opennet.bro.ygg/servers/security.opennet.bro.ygg.conf; + +# solaris +include /etc/yggbro/nginx/opennet.bro.ygg/servers/solaris.opennet.bro.ygg.conf; + +# web +include /etc/yggbro/nginx/opennet.bro.ygg/servers/web.opennet.bro.ygg.conf; + +# wiki +include /etc/yggbro/nginx/opennet.bro.ygg/servers/wiki.opennet.bro.ygg.conf; \ No newline at end of file diff --git a/nginx/opennet.bro.ygg/servers/bsd.opennet.bro.ygg.conf b/nginx/opennet.bro.ygg/servers/bsd.opennet.bro.ygg.conf new file mode 100644 index 0000000..9d4778f --- /dev/null +++ b/nginx/opennet.bro.ygg/servers/bsd.opennet.bro.ygg.conf @@ -0,0 +1,29 @@ +server { + + # .ygg supports yggdrasil addresses only + listen [::]:80; + + allow 0200::/7; + deny all; + + server_name bsd.opennet.bro.ygg; + + # Include handles (do not delete) + include /etc/yggbro/nginx/opennet.bro.ygg/handles/redirect.conf; + + location / { + + # Domain source + proxy_pass https://bsd.opennet.ru/; + + # Include common location rules + include /etc/yggbro/nginx/opennet.bro.ygg/locations/include/common.conf; + + # Relative paths + sub_filter 'action="/' 'action="http://bsd.opennet.bro.ygg/'; + sub_filter 'href="/' 'href="http://bsd.opennet.bro.ygg/'; + sub_filter 'src="/' 'src="http://bsd.opennet.bro.ygg/'; + sub_filter 'data-src="/' 'src="http://bsd.opennet.bro.ygg/'; + sub_filter "url('/" "url('http://bsd.opennet.bro.ygg/"; + } +} \ No newline at end of file diff --git a/nginx/opennet.bro.ygg/servers/cisco.opennet.bro.ygg.conf b/nginx/opennet.bro.ygg/servers/cisco.opennet.bro.ygg.conf new file mode 100644 index 0000000..6218124 --- /dev/null +++ b/nginx/opennet.bro.ygg/servers/cisco.opennet.bro.ygg.conf @@ -0,0 +1,29 @@ +server { + + # .ygg supports yggdrasil addresses only + listen [::]:80; + + allow 0200::/7; + deny all; + + server_name cisco.opennet.bro.ygg; + + # Include handles (do not delete) + include /etc/yggbro/nginx/opennet.bro.ygg/handles/redirect.conf; + + location / { + + # Domain source + proxy_pass https://cisco.opennet.ru/; + + # Include common location rules + include /etc/yggbro/nginx/opennet.bro.ygg/locations/include/common.conf; + + # Relative paths + sub_filter 'action="/' 'action="http://cisco.opennet.bro.ygg/'; + sub_filter 'href="/' 'href="http://cisco.opennet.bro.ygg/'; + sub_filter 'src="/' 'src="http://cisco.opennet.bro.ygg/'; + sub_filter 'data-src="/' 'src="http://cisco.opennet.bro.ygg/'; + sub_filter "url('/" "url('http://cisco.opennet.bro.ygg/"; + } +} \ No newline at end of file diff --git a/nginx/opennet.bro.ygg/servers/grab.opennet.bro.ygg.conf b/nginx/opennet.bro.ygg/servers/grab.opennet.bro.ygg.conf new file mode 100644 index 0000000..591cc98 --- /dev/null +++ b/nginx/opennet.bro.ygg/servers/grab.opennet.bro.ygg.conf @@ -0,0 +1,29 @@ +server { + + # .ygg supports yggdrasil addresses only + listen [::]:80; + + allow 0200::/7; + deny all; + + server_name grab.opennet.bro.ygg; + + # Include handles (do not delete) + include /etc/yggbro/nginx/opennet.bro.ygg/handles/redirect.conf; + + location / { + + # Domain source + proxy_pass https://grab.opennet.ru/; + + # Include common location rules + include /etc/yggbro/nginx/opennet.bro.ygg/locations/include/common.conf; + + # Relative paths + sub_filter 'action="/' 'action="http://grab.opennet.bro.ygg/'; + sub_filter 'href="/' 'href="http://grab.opennet.bro.ygg/'; + sub_filter 'src="/' 'src="http://grab.opennet.bro.ygg/'; + sub_filter 'data-src="/' 'src="http://grab.opennet.bro.ygg/'; + sub_filter "url('/" "url('http://grab.opennet.bro.ygg/"; + } +} \ No newline at end of file diff --git a/nginx/opennet.bro.ygg/servers/linux.opennet.bro.ygg.conf b/nginx/opennet.bro.ygg/servers/linux.opennet.bro.ygg.conf new file mode 100644 index 0000000..c4eddfd --- /dev/null +++ b/nginx/opennet.bro.ygg/servers/linux.opennet.bro.ygg.conf @@ -0,0 +1,29 @@ +server { + + # .ygg supports yggdrasil addresses only + listen [::]:80; + + allow 0200::/7; + deny all; + + server_name linux.opennet.bro.ygg; + + # Include handles (do not delete) + include /etc/yggbro/nginx/opennet.bro.ygg/handles/redirect.conf; + + location / { + + # Domain source + proxy_pass https://linux.opennet.ru/; + + # Include common location rules + include /etc/yggbro/nginx/opennet.bro.ygg/locations/include/common.conf; + + # Relative paths + sub_filter 'action="/' 'action="http://linux.opennet.bro.ygg/'; + sub_filter 'href="/' 'href="http://linux.opennet.bro.ygg/'; + sub_filter 'src="/' 'src="http://linux.opennet.bro.ygg/'; + sub_filter 'data-src="/' 'src="http://linux.opennet.bro.ygg/'; + sub_filter "url('/" "url('http://linux.opennet.bro.ygg/"; + } +} \ No newline at end of file diff --git a/nginx/opennet.bro.ygg/servers/m.opennet.bro.ygg.conf b/nginx/opennet.bro.ygg/servers/m.opennet.bro.ygg.conf new file mode 100644 index 0000000..c53f3ed --- /dev/null +++ b/nginx/opennet.bro.ygg/servers/m.opennet.bro.ygg.conf @@ -0,0 +1,29 @@ +server { + + # .ygg supports yggdrasil addresses only + listen [::]:80; + + allow 0200::/7; + deny all; + + server_name m.opennet.bro.ygg; + + # Include handles (do not delete) + include /etc/yggbro/nginx/opennet.bro.ygg/handles/redirect.conf; + + location / { + + # Domain source + proxy_pass https://m.opennet.ru/; + + # Include common location rules + include /etc/yggbro/nginx/opennet.bro.ygg/locations/include/common.conf; + + # Relative paths + sub_filter 'action="/' 'action="http://m.opennet.bro.ygg/'; + sub_filter 'href="/' 'href="http://m.opennet.bro.ygg/'; + sub_filter 'src="/' 'src="http://m.opennet.bro.ygg/'; + sub_filter 'data-src="/' 'src="http://m.opennet.bro.ygg/'; + sub_filter "url('/" "url('http://m.opennet.bro.ygg/"; + } +} \ No newline at end of file diff --git a/nginx/opennet.bro.ygg/servers/mobile.opennet.bro.ygg.conf b/nginx/opennet.bro.ygg/servers/mobile.opennet.bro.ygg.conf new file mode 100644 index 0000000..20579df --- /dev/null +++ b/nginx/opennet.bro.ygg/servers/mobile.opennet.bro.ygg.conf @@ -0,0 +1,29 @@ +server { + + # .ygg supports yggdrasil addresses only + listen [::]:80; + + allow 0200::/7; + deny all; + + server_name mobile.opennet.bro.ygg; + + # Include handles (do not delete) + include /etc/yggbro/nginx/opennet.bro.ygg/handles/redirect.conf; + + location / { + + # Domain source + proxy_pass https://mobile.opennet.ru/; + + # Include common location rules + include /etc/yggbro/nginx/opennet.bro.ygg/locations/include/common.conf; + + # Relative paths + sub_filter 'action="/' 'action="http://mobile.opennet.bro.ygg/'; + sub_filter 'href="/' 'href="http://mobile.opennet.bro.ygg/'; + sub_filter 'src="/' 'src="http://mobile.opennet.bro.ygg/'; + sub_filter 'data-src="/' 'src="http://mobile.opennet.bro.ygg/'; + sub_filter "url('/" "url('http://mobile.opennet.bro.ygg/"; + } +} \ No newline at end of file diff --git a/nginx/opennet.bro.ygg/servers/opennet.bro.ygg.conf b/nginx/opennet.bro.ygg/servers/opennet.bro.ygg.conf new file mode 100644 index 0000000..e3d5e9b --- /dev/null +++ b/nginx/opennet.bro.ygg/servers/opennet.bro.ygg.conf @@ -0,0 +1,29 @@ +server { + + # .ygg supports yggdrasil addresses only + listen [::]:80; + + allow 0200::/7; + deny all; + + server_name opennet.bro.ygg; + + # Include handles (do not delete) + include /etc/yggbro/nginx/opennet.bro.ygg/handles/redirect.conf; + + location / { + + # Domain source + proxy_pass https://opennet.ru/; + + # Include common location rules + include /etc/yggbro/nginx/opennet.bro.ygg/locations/include/common.conf; + + # Relative paths + sub_filter 'action="/' 'action="http://opennet.bro.ygg/'; + sub_filter 'href="/' 'href="http://opennet.bro.ygg/'; + sub_filter 'src="/' 'src="http://opennet.bro.ygg/'; + sub_filter 'data-src="/' 'src="http://opennet.bro.ygg/'; + sub_filter "url('/" "url('http://opennet.bro.ygg/"; + } +} \ No newline at end of file diff --git a/nginx/opennet.bro.ygg/servers/palm.opennet.bro.ygg.conf b/nginx/opennet.bro.ygg/servers/palm.opennet.bro.ygg.conf new file mode 100644 index 0000000..bbbba7d --- /dev/null +++ b/nginx/opennet.bro.ygg/servers/palm.opennet.bro.ygg.conf @@ -0,0 +1,29 @@ +server { + + # .ygg supports yggdrasil addresses only + listen [::]:80; + + allow 0200::/7; + deny all; + + server_name palm.opennet.bro.ygg; + + # Include handles (do not delete) + include /etc/yggbro/nginx/opennet.bro.ygg/handles/redirect.conf; + + location / { + + # Domain source + proxy_pass https://palm.opennet.ru/; + + # Include common location rules + include /etc/yggbro/nginx/opennet.bro.ygg/locations/include/common.conf; + + # Relative paths + sub_filter 'action="/' 'action="http://palm.opennet.bro.ygg/'; + sub_filter 'href="/' 'href="http://palm.opennet.bro.ygg/'; + sub_filter 'src="/' 'src="http://palm.opennet.bro.ygg/'; + sub_filter 'data-src="/' 'src="http://palm.opennet.bro.ygg/'; + sub_filter "url('/" "url('http://palm.opennet.bro.ygg/"; + } +} \ No newline at end of file diff --git a/nginx/opennet.bro.ygg/servers/security.opennet.bro.ygg.conf b/nginx/opennet.bro.ygg/servers/security.opennet.bro.ygg.conf new file mode 100644 index 0000000..7a71ce6 --- /dev/null +++ b/nginx/opennet.bro.ygg/servers/security.opennet.bro.ygg.conf @@ -0,0 +1,29 @@ +server { + + # .ygg supports yggdrasil addresses only + listen [::]:80; + + allow 0200::/7; + deny all; + + server_name security.opennet.bro.ygg; + + # Include handles (do not delete) + include /etc/yggbro/nginx/opennet.bro.ygg/handles/redirect.conf; + + location / { + + # Domain source + proxy_pass https://security.opennet.ru/; + + # Include common location rules + include /etc/yggbro/nginx/opennet.bro.ygg/locations/include/common.conf; + + # Relative paths + sub_filter 'action="/' 'action="http://security.opennet.bro.ygg/'; + sub_filter 'href="/' 'href="http://security.opennet.bro.ygg/'; + sub_filter 'src="/' 'src="http://security.opennet.bro.ygg/'; + sub_filter 'data-src="/' 'src="http://security.opennet.bro.ygg/'; + sub_filter "url('/" "url('http://security.opennet.bro.ygg/"; + } +} \ No newline at end of file diff --git a/nginx/opennet.bro.ygg/servers/solaris.opennet.bro.ygg.conf b/nginx/opennet.bro.ygg/servers/solaris.opennet.bro.ygg.conf new file mode 100644 index 0000000..68c267f --- /dev/null +++ b/nginx/opennet.bro.ygg/servers/solaris.opennet.bro.ygg.conf @@ -0,0 +1,29 @@ +server { + + # .ygg supports yggdrasil addresses only + listen [::]:80; + + allow 0200::/7; + deny all; + + server_name solaris.opennet.bro.ygg; + + # Include handles (do not delete) + include /etc/yggbro/nginx/opennet.bro.ygg/handles/redirect.conf; + + location / { + + # Domain source + proxy_pass https://solaris.opennet.ru/; + + # Include common location rules + include /etc/yggbro/nginx/opennet.bro.ygg/locations/include/common.conf; + + # Relative paths + sub_filter 'action="/' 'action="http://solaris.opennet.bro.ygg/'; + sub_filter 'href="/' 'href="http://solaris.opennet.bro.ygg/'; + sub_filter 'src="/' 'src="http://solaris.opennet.bro.ygg/'; + sub_filter 'data-src="/' 'src="http://solaris.opennet.bro.ygg/'; + sub_filter "url('/" "url('http://solaris.opennet.bro.ygg/"; + } +} \ No newline at end of file diff --git a/nginx/opennet.bro.ygg/servers/web.opennet.bro.ygg.conf b/nginx/opennet.bro.ygg/servers/web.opennet.bro.ygg.conf new file mode 100644 index 0000000..57b2955 --- /dev/null +++ b/nginx/opennet.bro.ygg/servers/web.opennet.bro.ygg.conf @@ -0,0 +1,29 @@ +server { + + # .ygg supports yggdrasil addresses only + listen [::]:80; + + allow 0200::/7; + deny all; + + server_name web.opennet.bro.ygg; + + # Include handles (do not delete) + include /etc/yggbro/nginx/opennet.bro.ygg/handles/redirect.conf; + + location / { + + # Domain source + proxy_pass https://web.opennet.ru/; + + # Include common location rules + include /etc/yggbro/nginx/opennet.bro.ygg/locations/include/common.conf; + + # Relative paths + sub_filter 'action="/' 'action="http://web.opennet.bro.ygg/'; + sub_filter 'href="/' 'href="http://web.opennet.bro.ygg/'; + sub_filter 'src="/' 'src="http://web.opennet.bro.ygg/'; + sub_filter 'data-src="/' 'src="http://web.opennet.bro.ygg/'; + sub_filter "url('/" "url('http://web.opennet.bro.ygg/"; + } +} \ No newline at end of file diff --git a/nginx/opennet.bro.ygg/servers/wiki.opennet.bro.ygg.conf b/nginx/opennet.bro.ygg/servers/wiki.opennet.bro.ygg.conf new file mode 100644 index 0000000..4981c59 --- /dev/null +++ b/nginx/opennet.bro.ygg/servers/wiki.opennet.bro.ygg.conf @@ -0,0 +1,29 @@ +server { + + # .ygg supports yggdrasil addresses only + listen [::]:80; + + allow 0200::/7; + deny all; + + server_name wiki.opennet.bro.ygg; + + # Include handles (do not delete) + include /etc/yggbro/nginx/opennet.bro.ygg/handles/redirect.conf; + + location / { + + # Domain source + proxy_pass https://wiki.opennet.ru/; + + # Include common location rules + include /etc/yggbro/nginx/opennet.bro.ygg/locations/include/common.conf; + + # Relative paths + sub_filter 'action="/' 'action="http://wiki.opennet.bro.ygg/'; + sub_filter 'href="/' 'href="http://wiki.opennet.bro.ygg/'; + sub_filter 'src="/' 'src="http://wiki.opennet.bro.ygg/'; + sub_filter 'data-src="/' 'src="http://wiki.opennet.bro.ygg/'; + sub_filter "url('/" "url('http://wiki.opennet.bro.ygg/"; + } +} \ No newline at end of file diff --git a/nginx/opennet.bro.ygg/servers/www.opennet.bro.ygg.conf b/nginx/opennet.bro.ygg/servers/www.opennet.bro.ygg.conf new file mode 100644 index 0000000..f27633b --- /dev/null +++ b/nginx/opennet.bro.ygg/servers/www.opennet.bro.ygg.conf @@ -0,0 +1,29 @@ +server { + + # .ygg supports yggdrasil addresses only + listen [::]:80; + + allow 0200::/7; + deny all; + + server_name www.opennet.bro.ygg; + + # Include handles (do not delete) + include /etc/yggbro/nginx/opennet.bro.ygg/handles/redirect.conf; + + location / { + + # Domain source + proxy_pass https://www.opennet.ru/; + + # Include common location rules + include /etc/yggbro/nginx/opennet.bro.ygg/locations/include/common.conf; + + # Relative paths + sub_filter 'action="/' 'action="http://www.opennet.bro.ygg/'; + sub_filter 'href="/' 'href="http://www.opennet.bro.ygg/'; + sub_filter 'src="/' 'src="http://www.opennet.bro.ygg/'; + sub_filter 'data-src="/' 'src="http://www.opennet.bro.ygg/'; + sub_filter "url('/" "url('http://www.opennet.bro.ygg/"; + } +} \ No newline at end of file