mirror of
https://codeberg.org/muon/home.git
synced 2026-03-09 03:53:11 +00:00
Compare commits
No commits in common. "83f52717dfe1f6c97ae7a4b6bc5c176e98342f37" and "c54a2dd18353449e3ee0a09a8dc07f61fa76e190" have entirely different histories.
83f52717df
...
c54a2dd183
3 changed files with 179 additions and 172 deletions
|
|
@ -75,40 +75,43 @@ in {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
locations."/" = {proxyPass = "http://10.0.0.3:5001";};
|
locations."/" = {proxyPass = "http://10.0.0.3:5001";};
|
||||||
};
|
};
|
||||||
"stream.muon.host" = {
|
"seedbox.muon.host" = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
locations = {
|
locations = {
|
||||||
"/" = {
|
"/" = {
|
||||||
proxyPass = "http://10.0.0.3:3013";
|
proxyPass = "http://10.0.0.3:3013";
|
||||||
};
|
};
|
||||||
"/api/" = {
|
"/api" = {
|
||||||
proxyPass = "http://10.0.0.3:3014";
|
proxyPass = "http://10.0.0.3:3014";
|
||||||
extraConfig =
|
extraConfig =
|
||||||
#sh
|
#sh
|
||||||
''
|
''
|
||||||
|
limit_req zone=api burst=20 nodelay;
|
||||||
|
|
||||||
# CORS headers
|
# CORS headers
|
||||||
# add_header Access-Control-Allow-Origin "*" always;
|
add_header Access-Control-Allow-Origin "*" always;
|
||||||
# add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS" always;
|
add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS" always;
|
||||||
# add_header Access-Control-Allow-Headers "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization" always;
|
add_header Access-Control-Allow-Headers "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization" always;
|
||||||
# add_header Access-Control-Expose-Headers "Content-Length,Content-Range" always;
|
add_header Access-Control-Expose-Headers "Content-Length,Content-Range" always;
|
||||||
|
|
||||||
# Handle preflight requests
|
# Handle preflight requests
|
||||||
# if ($request_method = 'OPTIONS') {
|
if ($request_method = 'OPTIONS') {
|
||||||
# add_header Access-Control-Allow-Origin "*";
|
add_header Access-Control-Allow-Origin "*";
|
||||||
# add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS";
|
add_header Access-Control-Allow-Methods "GET, POST, PUT, DELETE, OPTIONS";
|
||||||
# add_header Access-Control-Allow-Headers "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization";
|
add_header Access-Control-Allow-Headers "DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range,Authorization";
|
||||||
# add_header Content-Type text/plain;
|
add_header Content-Type text/plain;
|
||||||
# add_header Content-Length 0;
|
add_header Content-Length 0;
|
||||||
# return 204;
|
return 204;
|
||||||
# }
|
}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
"/api/stream/" = {
|
"/api/stream" = {
|
||||||
proxyPass = "http://10.0.0.3:3014";
|
proxyPass = "http://10.0.0.3:3014";
|
||||||
extraConfig =
|
extraConfig =
|
||||||
#sh
|
#sh
|
||||||
''
|
''
|
||||||
|
limit_req zone=download burst=10 nodelay;
|
||||||
proxy_set_header Range $http_range;
|
proxy_set_header Range $http_range;
|
||||||
|
|
||||||
# Streaming optimizations
|
# Streaming optimizations
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ in
|
||||||
"10.0.0.${toString wg.id}/24"
|
"10.0.0.${toString wg.id}/24"
|
||||||
"fdc9:281f:04d7:9ee9::${toString wg.id}/64"
|
"fdc9:281f:04d7:9ee9::${toString wg.id}/64"
|
||||||
];
|
];
|
||||||
dns = ["10.0.0.1" "fdc9:281f:04d7:9ee9::1"];
|
# dns = ["10.0.0.1" "fdc9:281f:04d7:9ee9::1"];
|
||||||
mtu = 1500;
|
mtu = 1500;
|
||||||
privateKeyFile = "/home/muon/wireguard-keys/private";
|
privateKeyFile = "/home/muon/wireguard-keys/private";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,9 +17,13 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config =
|
||||||
|
mkIf config.mods.server.nginx.enable {
|
||||||
|
}
|
||||||
|
// mkIf cfg.enable {
|
||||||
networking.firewall = {
|
networking.firewall = {
|
||||||
allowedTCPPorts = [port bport];
|
allowedTCPPorts = [port bport];
|
||||||
|
allowedUDPPorts = [port bport];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Runtime
|
# Runtime
|
||||||
|
|
@ -37,7 +41,7 @@ in
|
||||||
"seedbox-lite_seedbox_data:/app/data:rw"
|
"seedbox-lite_seedbox_data:/app/data:rw"
|
||||||
];
|
];
|
||||||
ports = [
|
ports = [
|
||||||
"${toString bport}:3000/tcp"
|
"${toString bport}:3001/tcp"
|
||||||
];
|
];
|
||||||
log-driver = "journald";
|
log-driver = "journald";
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue