initial commit

This commit is contained in:
pyrschtjag committed 2026-10-02 21:34:01 +04:00
commit 13eace9ce9
219 files changed
+6918

No files matched your search

@@ -0,0 +1,26 @@
{% for item in dnsmasq %}
{% set short_name = item.name.split('.')[0] %}
server {
listen 127.0.0.1:{{ item.backend_port }} ssl ipv6only=off reuseport;
server_name {{ item.name }};
index index.html;
root {{ placeholders[placeholder].root }};
http2 on;
ssl_certificate /etc/letsencrypt/live/{{ item.name }}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/{{ item.name }}/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
client_header_timeout 5m;
keepalive_timeout 5m;
access_log /var/log/nginx/{{ short_name }}_access.log;
error_log /var/log/nginx/{{ short_name }}_error.log;
location {{ xray_xhttp_path }} {
client_max_body_size 0;
grpc_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_body_timeout 5m;
grpc_read_timeout 315;
grpc_send_timeout 5m;
grpc_pass {{ item.socket }};
}
}
{% endfor %}
+42
View File
@@ -0,0 +1,42 @@
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log notice;
pid /run/nginx.pid;
events {
worker_connections 1024;
}
stream {
log_format proxy '$remote_addr [$time_local] $protocol $status $bytes_sent $bytes_received $session_time "$upstream_addr" "$ssl_preread_server_name"';
access_log /var/log/nginx/stream-access.log proxy;
map $ssl_preread_server_name $backend_name {
{% if telemt_host is defined %}
{{ telemt_host }} {{ telemt_host.split('.')[0] }}_backend;
{% endif %}
{% for item in dnsmasq %}
{{ item.name }} {{ item.name.split('.')[0] }}_backend;
{% endfor %}
default "";
}
{% if telemt_host is defined %}
upstream {{ telemt_host.split('.')[0] }}_backend { server 127.0.0.1:{{ telemt_backend_port }}; }
{% endif %}
{% for item in dnsmasq %}
upstream {{ item.name.split('.')[0] }}_backend { server 127.0.0.1:{{ item.backend_port }}; }
{% endfor %}
server {
listen 443;
ssl_preread on;
proxy_pass $backend_name;
}
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
#gzip on;
include /etc/nginx/conf.d/*.conf;
}