mirror of
https://github.com/oddlama/nix-config.git
synced 2025-10-11 07:10:39 +02:00
feat: add proxy-home vpn to accelerate traffic between local nodes
This commit is contained in:
parent
34fd783e60
commit
b01c521830
22 changed files with 123 additions and 10 deletions
|
@ -9,6 +9,10 @@ in {
|
|||
wireguard.proxy-sentinel = {
|
||||
client.via = "sentinel";
|
||||
firewallRuleForNode.sentinel.allowedTCPPorts = [config.services.grafana.settings.server.http_port];
|
||||
};
|
||||
|
||||
wireguard.proxy-home = {
|
||||
client.via = "ward";
|
||||
firewallRuleForNode.ward-web-proxy.allowedTCPPorts = [config.services.grafana.settings.server.http_port];
|
||||
};
|
||||
|
||||
|
@ -82,7 +86,7 @@ in {
|
|||
nodes.ward-web-proxy = {
|
||||
services.nginx = {
|
||||
upstreams.grafana = {
|
||||
servers."${config.wireguard.proxy-sentinel.ipv4}:${toString config.services.grafana.settings.server.http_port}" = {};
|
||||
servers."${config.wireguard.proxy-home.ipv4}:${toString config.services.grafana.settings.server.http_port}" = {};
|
||||
extraConfig = ''
|
||||
zone grafana 64k;
|
||||
keepalive 2;
|
||||
|
|
|
@ -360,8 +360,9 @@ in {
|
|||
];
|
||||
|
||||
nodes.sentinel = {
|
||||
# Make sure to masquerade 25565 (wan) -> 25565 (proxy-sentinel)
|
||||
# Make sure to masquerade 25566 (wan) -> 25566 (proxy-sentinel)
|
||||
# Rewrite destination addr with dnat on incoming connections
|
||||
# and masquerade responses to make them look like they originate from this host.
|
||||
# - 25565,25566 (wan) -> 25565,25566 (proxy-sentinel)
|
||||
networking.nftables.chains = {
|
||||
postrouting.to-minecraft = {
|
||||
after = ["hook"];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue