Status : Fix proxy access.

This commit is contained in:
Dmitry Voronin 2024-06-23 16:21:40 +03:00
parent 6e0acf9132
commit f1e37c8c3d
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k
22 changed files with 28 additions and 6 deletions

View file

@ -19,6 +19,7 @@ in {
container.config.dns.address
];
};
services.uptime-kuma = {
enable = true;
settings = {

View file

@ -8,14 +8,14 @@
, ... }: {
inherit host;
mkContainer = config: cfg: lib.recursiveUpdate cfg {
mkContainer = config: cfg: lib.recursiveUpdate {
autoStart = true;
hostAddress = host;
localAddress = config.address;
privateNetwork = true;
};
} cfg;
mkContainerConfig = config: cfg: lib.recursiveUpdate cfg {
mkContainerConfig = config: cfg: lib.recursiveUpdate {
nixpkgs.pkgs = lib.mkForce pkgs;
system.stateVersion = const.stateVersion;
@ -29,13 +29,13 @@
useHostResolvConf = lib.mkForce false;
firewall.enable = false;
};
};
} cfg;
mkContainerDir = cfg: dirs: map (path: "d '${cfg.storage}/${path}' 1777 root root - -") dirs;
mkServer = cfg: lib.recursiveUpdate cfg {
mkServer = cfg: lib.recursiveUpdate {
forceSSL = false;
};
} cfg;
attachMedia = type: paths: ro: builtins.listToAttrs (lib.imap0 (i: path:
{
@ -69,6 +69,7 @@
};
ddns = {
address = "10.1.0.31";
port = 53;
storage = "${storage}/ddns";
};
dns = {

View file

@ -7,6 +7,7 @@ in {
location / {
allow ${container.localAccess};
allow ${container.config.status.address};
allow ${container.config.vpn.address};
deny all;
return 301 rtsp://${cfg.address}:${cfg.port}/live/main;

View file

@ -9,6 +9,7 @@ in {
location / {
allow ${container.localAccess};
allow ${container.config.status.address};
allow ${container.config.vpn.address};
deny all;

View file

@ -9,6 +9,7 @@ in {
location ~ ^/(settings/admin|settings/users|settings/apps|login|api) {
allow ${container.localAccess};
allow ${container.config.status.address};
allow ${container.config.vpn.address};
deny all;
proxy_pass http://''$${name}$request_uri;

View file

@ -9,6 +9,7 @@ in {
location / {
allow ${container.localAccess};
allow ${container.config.status.address};
allow ${container.config.vpn.address};
deny all;
proxy_pass http://''$${name}$request_uri;

View file

@ -30,6 +30,7 @@ in {
location / {
# allow ${container.localAccess};
# allow ${container.config.status.address};
# allow ${container.config.vpn.address};
# deny all;
proxy_pass http://''$${name}$request_uri;

View file

@ -9,6 +9,7 @@ in {
location / {
allow ${container.localAccess};
allow ${container.config.status.address};
allow ${container.config.vpn.address};
deny all;
proxy_pass http://''$${name}$request_uri;

View file

@ -9,6 +9,7 @@ in {
location / {
allow ${container.localAccess};
allow ${container.config.status.address};
allow ${container.config.vpn.address};
deny all;
proxy_pass http://''$${name}$request_uri;

View file

@ -9,6 +9,7 @@ in {
location / {
allow ${container.localAccess};
allow ${container.config.status.address};
allow ${container.config.vpn.address};
deny all;

View file

@ -9,6 +9,7 @@ in {
location / {
allow ${container.localAccess};
allow ${container.config.status.address};
allow ${container.config.vpn.address};
deny all;
proxy_pass http://''$${name}$request_uri;

View file

@ -9,6 +9,7 @@ in {
location / {
# allow ${container.localAccess};
# allow ${container.config.status.address};
# allow ${container.config.vpn.address};
# deny all;
add_header X-Forwarded-Proto https;

View file

@ -9,6 +9,7 @@ in {
location / {
allow ${container.localAccess};
allow ${container.config.status.address};
allow ${container.config.vpn.address};
deny all;
proxy_pass http://''$${name}$request_uri;

View file

@ -9,6 +9,7 @@ in {
location / {
allow ${container.localAccess};
allow ${container.config.status.address};
allow ${container.config.vpn.address};
deny all;
proxy_pass http://''$${name}$request_uri;

View file

@ -9,6 +9,7 @@ in {
location / {
allow ${container.localAccess};
allow ${container.config.status.address};
allow ${container.config.vpn.address};
deny all;

View file

@ -9,6 +9,7 @@ in {
location / {
allow ${container.localAccess};
allow ${container.config.status.address};
allow ${container.config.vpn.address};
deny all;
proxy_pass http://''$${name}$request_uri;

View file

@ -9,6 +9,7 @@ in {
location / {
allow ${container.localAccess};
allow ${container.config.status.address};
allow ${container.config.vpn.address};
deny all;
proxy_pass http://''$${name}$request_uri;

View file

@ -9,6 +9,7 @@ in {
location / {
allow ${container.localAccess};
allow ${container.config.status.address};
allow ${container.config.vpn.address};
deny all;
proxy_pass http://''$${name}$request_uri;

View file

@ -9,6 +9,7 @@ in {
location / {
allow ${container.localAccess};
allow ${container.config.status.address};
allow ${container.config.vpn.address};
deny all;
proxy_pass http://''$${name}$request_uri;

View file

@ -9,6 +9,7 @@ in {
location / {
allow ${container.localAccess};
allow ${container.config.status.address};
allow ${container.config.vpn.address};
deny all;
proxy_pass http://''$${name}$request_uri;

View file

@ -9,6 +9,7 @@ in {
location / {
allow ${container.localAccess};
allow ${container.config.status.address};
allow ${container.config.vpn.address};
deny all;
proxy_pass http://''$${name}$request_uri;

View file

@ -9,6 +9,7 @@ in {
location / {
allow ${container.localAccess};
allow ${container.config.status.address};
allow ${container.config.vpn.address};
deny all;