enable proxyProtocol as default

This commit is contained in:
2023-11-11 00:57:49 +08:00
parent b1e2497054
commit 05cd6dd1c8
5 changed files with 6 additions and 25 deletions

View File

@@ -283,7 +283,7 @@
"anchor.fm" = { upstream = "anchor.fm:443"; proxyProtocol = false; };
"podcasters.spotify.com" = { upstream = "podcasters.spotify.com:443"; proxyProtocol = false; };
"xlog.chn.moe" = { upstream = "cname.xlog.app:443"; proxyProtocol = false; };
"nix-store.chn.moe" = { upstream = "internal.pc.chn.moe"; proxyProtocol = false; };
"nix-store.chn.moe".upstream.address = "internal.pc.chn.moe";
"xn--qbtm095lrg0bfka60z.chn.moe".upstream.address = "internal.pc.chn.moe";
"xn--s8w913fdga.chn.moe".upstream.address = "internal.vps7.chn.moe";
"misskey.chn.moe".upstream.address = "internal.vps7.chn.moe";

View File

@@ -167,15 +167,7 @@ inputs:
(instance: with instance.value;
{
name = hostname;
value =
{
listen.main.proxyProtocol = true;
location."/".proxy =
{
upstream = "http://127.0.0.1:${toString port}";
websocket = true;
};
};
value.location."/".proxy = { upstream = "http://127.0.0.1:${toString port}"; websocket = true; };
})
(attrsToList misskey.instances));
};

View File

@@ -73,7 +73,7 @@ inputs:
type = types.attrsOf (types.submodule { options =
{
http2 = mkOption { type = types.bool; default = true; };
proxyProtocol = mkOption { type = types.bool; default = false; };
proxyProtocol = mkOption { type = types.bool; default = true; };
# if proxyProtocol not enabled, add to transparentProxy only
# if proxyProtocol enabled, add to transparentProxy and streamProxy
addToTransparentProxy = mkOption { type = types.bool; default = true; };

View File

@@ -47,11 +47,7 @@ inputs:
nginx =
{
enable = true;
https."${send.hostname}" =
{
listen.main.proxyProtocol = true;
location."/".proxy = { upstream = "http://127.0.0.1:1443"; websocket = true; };
};
https."${send.hostname}".location."/".proxy = { upstream = "http://127.0.0.1:1443"; websocket = true; };
};
redis.instances.send = { user = "root"; port = 9184; };
};

View File

@@ -102,15 +102,8 @@ inputs:
nginx =
{
enable = true;
https.${synapse.hostname} =
{
listen.main.proxyProtocol = true;
location."/".proxy =
{
upstream = "http://127.0.0.1:${toString synapse.port}";
websocket = true;
};
};
https.${synapse.hostname}.location."/".proxy =
{ upstream = "http://127.0.0.1:${toString synapse.port}"; websocket = true; };
};
};
systemd.services.matrix-synapse.enable = synapse.autoStart;