add portforwarder

This commit is contained in:
2025-03-29 14:46:57 +01:00
parent 53ba3a4dc1
commit 4db755eb43
4 changed files with 63 additions and 9 deletions

View File

@ -262,6 +262,7 @@ in {
"http://127.0.0.1:${builtins.toString config.services.prometheus.exporters.smartctl.port}"
"http://127.0.0.1:${builtins.toString config.services.prometheus.exporters.systemd.port}"
"http://127.0.0.1:${builtins.toString config.services.prometheus.exporters.node.port}"
"http://127.0.0.1:8123"
];
};
};
@ -528,9 +529,12 @@ in {
environment = {
VPN_SERVICE_PROVIDER = "protonvpn";
VPN_TYPE = "wireguard";
VPN_PORT_FORWARDING = "on";
SERVER_COUNTRIES = "Switzerland";
WIREGUARD_ADDRESSES = "10.2.0.2/32";
DNS_ADDRESS = "10.2.0.1";
PORT_FORWARD_ONLY = "on";
VPN_PORT_FORWARDING_UP_COMMAND = ''
/bin/sh -c 'wget -O- --retry-connrefused --post-data "json={\"listen_port\":{{PORTS}}}" http://127.0.0.1:8080/api/v2/app/setPreferences 2>&1'
'';
};
environmentFiles = [
config.sops.secrets."protonvpn_wg_private_key".path
@ -542,12 +546,13 @@ in {
ports = [
"127.0.0.1:8080:8080"
"127.0.0.1:5800:5800"
"127.0.0.1:8123:8123"
];
};
qbittorrent = {
image = "lscr.io/linuxserver/qbittorrent:latest";
autoStart = false;
autoStart = true;
networks = ["container:gluetun"];
environment = {
WEBUI_PORT = "8080";
@ -558,6 +563,18 @@ in {
"/tank/dump/torrent:/downloads"
];
};
qbittorrent-exporter = {
image = "docker.io/esanchezm/prometheus-qbittorrent-exporter";
autoStart = true;
networks = ["container:gluetun"];
dependsOn = ["qbittorrent"];
environment = {
QBITTORRENT_PORT = "8080";
QBITTORRENT_HOST = "127.0.0.1";
EXPORTER_PORT = "8123";
};
};
};
};
};