map $http_accept_language $lang { default en; ~en en; pt pt-BR; ~es es; ~fr fr; } server { listen 80; listen [::]:80; server_name verncceu2kgz54wi7r5jatgmx2mqtsh3knxhiy4m5shescuqtqfa.b32.i2p; location /.well-known/matrix/server { default_type application/json; add_header Access-Control-Allow-Origin *; return 200 '{"m.server": "verndnomc4cnte4aw7yrfpse33vrw2nlwoxozxmf77zqquk6ea7q.b32.i2p:80"}'; } location /.well-known/matrix/client { default_type application/json; add_header Access-Control-Allow-Origin *; return 200 '{"m.homeserver": {"base_url": "http://verndnomc4cnte4aw7yrfpse33vrw2nlwoxozxmf77zqquk6ea7q.b32.i2p"}, "m.identity_server": { "base_url": "http://vern4l4bo3tzed7niopxkfijgbyod6vc7pmqrhice2mjvjfboqua.b32.i2p" }}'; } location /_matrix { return 301 http://verndnomc4cnte4aw7yrfpse33vrw2nlwoxozxmf77zqquk6ea7q.b32.i2p$request_uri; } subs_filter_types text/html text/css text/xml application/javascript text/plain; subs_filter "wiki.vern.cc" "vernknid6kpyzaghegtnypzxe2nx643zrfc4jivh2tlna5m5jvcq.b32.i2p"; subs_filter "gcdn.vern.cc" "vernlb7gwnsycyt6fw67ak4qx2nn6vimfjxv6xbuwasmb4j6ivva.b32.i2p"; include common/website.conf; location ~ ^/socks/(?[\w-]+)/(?[\w-]+)(?/.*)?$ { add_header Onion-Location http://$site-$user.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion$request_uri; add_header X-I2P-Location http://verncceu2kgz54wi7r5jatgmx2mqtsh3knxhiy4m5shescuqtqfa.b32.i2p/socks/$site/$user$user_uri; error_log /var/log/nginx/vern.cc-error.log info; proxy_pass http://unix:/var/socks/$user.sock:/; proxy_http_version 1.1; proxy_set_header Host $site-$user.vern.cc; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; subs_filter_types text/html text/css text/xml application/javascript text/plain; subs_filter (((file|virtual|src|href)=|url\()["']?)/([^/]) $1/socks/$user/$site/$4 r; error_page 502 =307 http://verncceu2kgz54wi7r5jatgmx2mqtsh3knxhiy4m5shescuqtqfa.b32.i2p; } } server { listen 80; listen [::]:80; server_name vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion www.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion; location /.well-known/matrix/server { default_type application/json; add_header Access-Control-Allow-Origin *; return 200 '{"m.server": "mtrx.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion:80"}'; } location /.well-known/matrix/client { default_type application/json; add_header Access-Control-Allow-Origin *; return 200 '{"m.homeserver": {"base_url": "http://mtrx.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion"}, "m.identity_server": { "base_url": "http://id.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion" }}'; } location /_matrix { return 301 http://mtrx.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion$request_uri; } subs_filter_types text/html text/css text/xml application/javascript text/plain; subs_filter "wiki.vern.cc" "wiki.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion"; subs_filter "gcdn.vern.cc" "gcdn.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion"; include common/website.conf; } server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name www.vern.cc vern.cc; include snippets/lets-encrypt.conf; location /.well-known/matrix/server { default_type application/json; add_header Access-Control-Allow-Origin *; return 200 '{"m.server": "mtrx.vern.cc:443"}'; } location /.well-known/matrix/client { default_type application/json; add_header Access-Control-Allow-Origin *; return 200 '{"m.homeserver": {"base_url": "https://mtrx.vern.cc"}, "m.identity_server": { "base_url": "https://id.vern.cc" }}'; } location /.well-known/host-meta { default_type 'application/xrd+xml'; add_header Access-Control-Allow-Origin '*' always; return 200 ''; } location /.well-known/host-meta.json { default_type 'application/jrd+json'; add_header Access-Control-Allow-Origin '*' always; return 200 '{"links":[{"rel":"urn:xmpp:alt-connections:xbosh","href":"https://vern.cc:5281/http-bind"},{"rel":"urn:xmpp:alt-connections:websocket","href":"wss://vern.cc:5281/xmpp-websocket"}]}'; } include common/website.conf; } server { listen 80; listen [::]:80; # return 301 https://$host$request_uri; return 200 "JgjvzV1cJEz0noDw0I597Euzm2vAu1Ibj_cAmGXKnt0.2r1q1Ilo1S8Gg4uYqfT96sAwG2utxR8e3gCk3tMFGWI"; server_name www.vern.cc vern.cc; } server { listen 80; listen [::]:80; listen 443 ssl http2; listen [::]:443 ssl http2; include snippets/lets-encrypt.conf; server_name blog.vern.cc; return 301 https://vern.cc/blog$request_uri; } server { server_name blog.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion; listen 80; listen [::]:80; return 301 http://vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion/blog$request_uri; add_header Onion-Location http://blog.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion$request_uri; } server { server_name myip.vern.cc; listen 443 ssl http2; listen [::]:443 ssl http2; include snippets/lets-encrypt.conf; default_type text/plain; return 200 "$remote_addr\n"; } server { server_name myip.vern.cc; listen 80; listen [::]:80; default_type text/plain; return 200 "$remote_addr\n"; } server { server_name myip.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion; listen 80; listen [::]:80; default_type text/plain; return 200 "$remote_addr\n"; } server { server_name vernamluei326jvvjdrdcsi5hcbgiig7anytm3xe3c6lj5jvgmba.b32.i2p; listen 11064; listen [::]:11064; default_type text/plain; return 200 "$remote_addr\n"; }