421 and tor connection

This commit is contained in:
alisceon 2026-05-27 23:17:53 +02:00
parent 553e708795
commit a7683d40fd

View file

@ -69,6 +69,7 @@ in
22 22
80 80
443 443
9001
]; ];
}; };
@ -185,13 +186,48 @@ in
recommendedOptimisation = true; recommendedOptimisation = true;
recommendedProxySettings = true; recommendedProxySettings = true;
recommendedTlsSettings = true; recommendedTlsSettings = true;
virtualHosts.${forgejoDomain} = { virtualHosts = {
forceSSL = true; "_" = {
enableACME = true; default = true;
locations."/" = { rejectSSL = true;
proxyPass = "http://127.0.0.1:3000"; extraConfig = ''
recommendedProxySettings = true; return 421;
'';
}; };
${forgejoDomain} = {
serverName = forgejoDomain;
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://127.0.0.1:3000";
recommendedProxySettings = true;
};
};
};
};
services.tor = {
enable = true;
client.enable = false;
relay = {
enable = true;
role = "relay";
};
settings = {
Nickname = "alisceondotcom";
ORPort = 9001;
DataDirectory = "/var/lib/tor";
ExitRelay = false;
ExitPolicy = [ "reject *:*" ];
RelayBandwidthRate = "2700 KBytes";
RelayBandwidthBurst = "2700 KBytes";
BandwidthRate = "2700 KBytes";
BandwidthBurst = "2700 KBytes";
AccountingStart = "month 1 00:00";
AccountingMax = "7500 GBytes";
DirCache = true;
AvoidDiskWrites = 1;
Sandbox = true;
}; };
}; };