I2P UNIX sockets

This commit is contained in:
root 2022-10-30 15:01:13 -04:00
parent 602f5b6e43
commit 5f2e2e73f0
4 changed files with 22 additions and 10 deletions

View File

@ -1,4 +1,5 @@
add_header Onion-Location http://0$user.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion$request_uri;
add_header X-I2P-Location http://verncceu2kgz54wi7r5jatgmx2mqtsh3knxhiy4m5shescuqtqfa.b32.i2p/socks/$user$request_uri;
error_log /var/log/nginx/vern.cc-error.log info;

View File

@ -60,7 +60,7 @@ location ~ ^/(~|u/)(?<user>[\w-]+)(?<user_uri>/.*)?$ {
try_files $user_uri $user_uri/index.html $user_uri.html $user_uri/ @extensionless-php;
autoindex on;
autoindex_exact_size off;
subs_filter_types text/html text/css text/xml;
subs_filter_types text/html text/css text/xml application/javascript text/plain;
subs_filter (((file|virtual|src|href)=|url\()["']?)/([^/]) $1/u/$user/$4 r;
location ~ \.php$ {

View File

@ -4,7 +4,7 @@ add_header X-I2P-Location http://vernlebgbpxnln2oluosc4hrnjr7byg2e5pqiwi2phhwmud
subs_filter "yn.vern.cc" "$host";
location / {
proxy_pass http://192.168.122.30:7777/;
proxy_pass http://127.0.0.1:8481/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

View File

@ -22,6 +22,25 @@ server {
# subs_filter "wiki.vern.cc" "vernknid6kpyzaghegtnypzxe2nx643zrfc4jivh2tlna5m5jvcq.b32.i2p"
include common/website.conf;
location ~ ^/socks/(?<user>[\w-]+)(?<user_uri>/.*)?$ {
add_header Onion-Location http://0$user.vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion$request_uri;
add_header X-I2P-Location http://verncceu2kgz54wi7r5jatgmx2mqtsh3knxhiy4m5shescuqtqfa.b32.i2p/socks/$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 $host;
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/$4 r;
error_page 502 =307 http://verncceu2kgz54wi7r5jatgmx2mqtsh3knxhiy4m5shescuqtqfa.b32.i2p;
}
}
server {
@ -191,11 +210,3 @@ server {
listen [::]:11064;
return 200 127.0.0.1;
}
#server {
# listen 127.0.0.1:80;
#
#location /status {
# vhost_traffic_status_display;
# vhost_traffic_status_display_format html;
#}
#}