From 1e41e1be13617783ce82ee8eefdb7ee400a62019 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 26 Oct 2022 02:47:04 -0400 Subject: [PATCH] onion mailman, librespeed --- common/lists.conf | 10 ++++++++++ common/mail.conf | 3 +++ common/speedtest.conf | 12 ++++++++++-- conf.d/lists.conf | 32 ++++++++++++++++++++++++++++++++ conf.d/speedtest.conf | 17 +++++++++++++++++ nginx.conf | 2 +- 6 files changed, 73 insertions(+), 3 deletions(-) create mode 100644 common/lists.conf create mode 100644 conf.d/lists.conf create mode 100644 conf.d/speedtest.conf diff --git a/common/lists.conf b/common/lists.conf new file mode 100644 index 0000000..494507d --- /dev/null +++ b/common/lists.conf @@ -0,0 +1,10 @@ +add_header Onion-Location http://lists.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion$request_uri; +add_header X-I2P-Location http://vern7tanh5da42m3nroycnv37kthcs2r5bijb2jt7gh3sj4l2ysq.b32.i2p$request_uri; + +location / { + proxy_pass http://192.168.122.53:8003/; + proxy_redirect off; + proxy_set_header Host "lists.vern.cc"; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; +} diff --git a/common/mail.conf b/common/mail.conf index 303a253..cc0116e 100644 --- a/common/mail.conf +++ b/common/mail.conf @@ -30,15 +30,18 @@ location ^~ /new-admin { location / { include snippets/uwsgi_params; uwsgi_param UWSGI_SCRIPT instance.wsgi:application; + uwsgi_param HTTP_HOST "mail.vern.cc"; uwsgi_pass modoboa; } location ~* ^/autodiscover/autodiscover.xml { include snippets/uwsgi_params; + uwsgi_param HTTP_HOST "mail.vern.cc"; uwsgi_pass automx; } location /mobileconfig { include snippets/uwsgi_params; + uwsgi_param HTTP_HOST "mail.vern.cc"; uwsgi_pass automx; } diff --git a/common/speedtest.conf b/common/speedtest.conf index e2d5e0b..6cd862c 100644 --- a/common/speedtest.conf +++ b/common/speedtest.conf @@ -1,3 +1,11 @@ add_header Onion-Location http://ls.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion$request_uri; -root /var/www/speedtest; -ssi on; +add_header X-I2P-Location http://verncfvtpzdyrq4iy72nsv5tq3tmoxblywsxg25v2eydyao4gkfq.b32.i2p$request_uri; + +location / { + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; +# proxy_set_header Host "ls.vern.cc"; + proxy_pass http://139.144.17.216:8989/; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; +} diff --git a/conf.d/lists.conf b/conf.d/lists.conf new file mode 100644 index 0000000..74a74d9 --- /dev/null +++ b/conf.d/lists.conf @@ -0,0 +1,32 @@ +server { + listen 80; + listen [::]:80; + + server_name lists.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion; + + include common/lists.conf; +} + +server { + listen 11063; + listen [::]:11063; + + server_name vern7tanh5da42m3nroycnv37kthcs2r5bijb2jt7gh3sj4l2ysq.b32.i2p; + + include common/lists.conf; +} + +server { + listen 443 ssl http2; + listen [::]:443 ssl http2; + server_name lists.vern.cc; + include common/lists.conf; + include snippets/lets-encrypt.conf; +} + +server { + listen 80; + listen [::]:80; + return 301 https://$host$request_uri; + server_name lists.vern.cc; +} diff --git a/conf.d/speedtest.conf b/conf.d/speedtest.conf new file mode 100644 index 0000000..1f1d5b4 --- /dev/null +++ b/conf.d/speedtest.conf @@ -0,0 +1,17 @@ +server { + listen 80; + listen [::]:80; + + server_name ls.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion speedtest.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion librespeed.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion; + + include common/speedtest.conf; +} + +server { + listen 11066; + listen [::]:11066; + + server_name verncfvtpzdyrq4iy72nsv5tq3tmoxblywsxg25v2eydyao4gkfq.b32.i2p; + + include common/speedtest.conf; +} diff --git a/nginx.conf b/nginx.conf index 1e5d707..8a5c59b 100644 --- a/nginx.conf +++ b/nginx.conf @@ -2,7 +2,6 @@ user www-data; worker_processes auto; pid /run/nginx.pid; include /etc/nginx/modules-enabled/*.conf; - events { worker_connections 768; # multi_accept on; @@ -12,6 +11,7 @@ http { sendfile on; tcp_nopush on; types_hash_max_size 2048; + variables_hash_max_size 2048; server_names_hash_bucket_size 256; include /etc/nginx/snippets/mime.types; default_type application/octet-stream;