use proxy instead of hosting on hetzner

This commit is contained in:
Gerg-L 2024-08-18 00:20:27 -04:00
parent 3b5678a9ca
commit 579c635521
Signed by: gerg-l
SSH key fingerprint: SHA256:FPYDHIkvMocr4wdmZXpgpJjsb2Tw6rASs2ISPbOb0KI
6 changed files with 68 additions and 116 deletions

29
hosts/proxy/server.nix Normal file
View file

@ -0,0 +1,29 @@
{
networking.firewall.allowedTCPPorts = [
25565
25575
24454
];
services.nginx = {
enable = true;
config = ''
events {
worker_connections 5048;
}
stream {
server {
listen 25565;
listen 25575;
listen 24454;
resolver 8.8.8.8 ipv4=off;
resolver_timeout 15s;
proxy_socket_keepalive on;
proxy_pass ipv6.gerg-l.com:$server_port;
}
}
'';
};
}