Browse Source

integrate texty.org.ua

main
ghost 12 months ago
parent
commit
8b1aa75ea4
  1. 5
      README.md
  2. 32
      nginx/_todo/texty.org.ua
  3. 17
      nginx/texty.org.ua.bro.ygg/README.md
  4. 38
      nginx/texty.org.ua.bro.ygg/server.conf
  5. 17
      nginx/yggbro/texty.org.ua/README.md
  6. 36
      nginx/yggbro/texty.org.ua/server.conf

5
README.md

@ -94,10 +94,9 @@ If you're running own station in Yggdrasil network, take a look also: @@ -94,10 +94,9 @@ If you're running own station in Yggdrasil network, take a look also:
#### IT
* [opennet.ru](https://opennet.ru/)
+ `http://[201:23b4:991a:634d:8359:4521:5576:15b7]/opennet`
+ `http://opennet.bro.ygg`
+ `http://[201:23b4:991a:634d:8359:4521:5576:15b7]/yggbro/opennet/` | [opennet.bro.ygg](http://opennet.bro.ygg)
#### News
* [texty.org.ua](https://texty.org.ua/)
+ `http://[201:23b4:991a:634d:8359:4521:5576:15b7]/texty.org.ua/`
+ `http://[201:23b4:991a:634d:8359:4521:5576:15b7]/yggbro/texty.org.ua/` | [texty.org.ua.bro.ygg](http://texty.org.ua.bro.ygg)

32
nginx/_todo/texty.org.ua

@ -1,32 +0,0 @@ @@ -1,32 +0,0 @@
# Mirror for https://texty.org.ua/
# Drops all JS
server {
# HTTP/IPv6 connections only
# listen [::]:80 ipv6only=on;
# Yggdrasil connections only
# allow 0200::/7;
# deny all;
# 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;
location /texty.org.ua {
proxy_pass https://texty.org.ua/;
sub_filter 'http://texty.org.ua' 'http://[$server_addr]/texty.org.ua';
sub_filter 'https://texty.org.ua' 'http://[$server_addr]/texty.org.ua';
sub_filter '<script' '<!-- <script';
sub_filter '</script>' '</script> -->';
sub_filter 'href="/support/"' 'href="https://texty.org.ua/p/support"';
sub_filter 'href="/' 'href="http://[$server_addr]/texty.org.ua/';
sub_filter 'src="/' 'src="http://[$server_addr]/texty.org.ua/';
sub_filter 'data-src="/' 'src="http://[$server_addr]/texty.org.ua/';
sub_filter "url('/" "url('http://[$server_addr]/texty.org.ua/";
sub_filter_once off;
sub_filter_types *;
}
}

17
nginx/texty.org.ua.bro.ygg/README.md

@ -0,0 +1,17 @@ @@ -0,0 +1,17 @@
# Nginx proxy configuration for texty.org.ua.bro.ygg
Current implementation drops all JS and forward links to following locations:
* `http://texty.org.ua` > `http://texty.org.ua.bro.ygg`
## Install
* `ln -s /etc/yggbro/nginx/texty.org.ua.bro.ygg/server.conf /etc/nginx/sites-enabled/yggbro.texty.org.ua.bro.ygg.conf`
* `nginx -t`
* `service nginx reload`
## Uninstall
* `rm /etc/nginx/sites-enabled/yggbro.texty.org.ua.bro.ygg.conf`
* `nginx -t`
* `service nginx reload`

38
nginx/texty.org.ua.bro.ygg/server.conf

@ -0,0 +1,38 @@ @@ -0,0 +1,38 @@
server {
# HTTP/IPv6 only
listen [::]:80;
# Yggdrasil only
allow 0200::/7;
deny all;
server_name texty.org.ua.bro.ygg;
location / {
# Forward to server
proxy_pass https://texty.org.ua/;
# 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;
# Replace links
sub_filter_once off;
sub_filter_types *;
sub_filter 'http://texty.org.ua' 'http://texty.org.ua.bro.ygg';
sub_filter 'https://texty.org.ua' 'http://texty.org.ua.bro.ygg';
sub_filter '<script' '<!-- <script';
sub_filter '</script>' '</script> -->';
sub_filter 'href="/support/"' 'href="https://texty.org.ua/p/support"';
sub_filter 'href="/' 'href="http://texty.org.ua.bro.ygg/';
sub_filter 'src="/' 'src="http://texty.org.ua.bro.ygg/';
sub_filter 'data-src="/' 'src="http://texty.org.ua.bro.ygg/';
sub_filter "url('/" "url('http://texty.org.ua.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/texty.org.ua.bro.ygg" target="_blank">YGGbro</a></body>';
}
}

17
nginx/yggbro/texty.org.ua/README.md

@ -0,0 +1,17 @@ @@ -0,0 +1,17 @@
# Nginx proxy configuration for /yggbro/texty.org.ua
Current implementation drops all JS and forward links to following locations:
* `http://texty.org.ua` > `/yggbro/texty.org.ua`
## Install
* `ln -s /etc/yggbro/nginx/yggbro/texty.org.ua/server.conf /etc/nginx/sites-enabled/yggbro.texty.org.ua.conf`
* `nginx -t`
* `service nginx reload`
## Uninstall
* `rm /etc/nginx/sites-enabled/yggbro.texty.org.ua.conf`
* `nginx -t`
* `service nginx reload`

36
nginx/yggbro/texty.org.ua/server.conf

@ -0,0 +1,36 @@ @@ -0,0 +1,36 @@
server {
# HTTP/IPv6 only
listen [::]:80;
# Yggdrasil only
allow 0200::/7;
deny all;
location /yggbro/texty.org.ua {
# Forward to server
proxy_pass https://texty.org.ua/;
# 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;
# Replace links
sub_filter_once off;
sub_filter_types *;
sub_filter 'http://texty.org.ua' 'http://[$server_addr]/yggbro/texty.org.ua';
sub_filter 'https://texty.org.ua' 'http://[$server_addr]/yggbro/texty.org.ua';
sub_filter '<script' '<!-- <script';
sub_filter '</script>' '</script> -->';
sub_filter 'href="/support/"' 'href="https://texty.org.ua/p/support"';
sub_filter 'href="/' 'href="http://[$server_addr]/yggbro/texty.org.ua/';
sub_filter 'src="/' 'src="http://[$server_addr]/yggbro/texty.org.ua/';
sub_filter 'data-src="/' 'src="http://[$server_addr]/yggbro/texty.org.ua/';
sub_filter "url('/" "url('http://[$server_addr]/yggbro/texty.org.ua/";
# 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/yggbro/texty.org.ua" target="_blank">YGGbro</a></body>';
}
}
Loading…
Cancel
Save