hot fixes to utc-6
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
# Start X server in the background
|
||||
/usr/bin/Xorg :0 -nocursor vt1 -nolisten tcp -keeptty &
|
||||
XPID=$!
|
||||
sleep 2
|
||||
|
||||
# Check if X started
|
||||
if ! kill -0 $XPID 2>/dev/null; then
|
||||
echo 'ERROR: Xorg failed to start'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export DISPLAY=:0
|
||||
export HOME=/home/archipelago
|
||||
|
||||
# Allow archipelago user to connect
|
||||
xhost +SI:localuser:archipelago 2>/dev/null
|
||||
|
||||
# Disable screen blanking
|
||||
xset s off 2>/dev/null
|
||||
xset -dpms 2>/dev/null
|
||||
xset s noblank 2>/dev/null
|
||||
|
||||
# Hide cursor
|
||||
unclutter -idle 3 -root &
|
||||
|
||||
# Run Chromium as archipelago user in a restart loop
|
||||
while true; do
|
||||
sudo -u archipelago env DISPLAY=:0 HOME=/home/archipelago chromium --kiosk --app=http://localhost/kiosk --noerrdialogs --disable-infobars --disable-translate --no-first-run --check-for-update-interval=31536000 --disable-features=TranslateUI --disable-session-crashed-bubble --disable-save-password-bubble --disable-suggestions-service --disable-component-update --disable-gpu --user-data-dir=/home/archipelago/.config/chromium-kiosk
|
||||
sleep 3
|
||||
done
|
||||
|
||||
# Cleanup
|
||||
kill $XPID 2>/dev/null
|
||||
@@ -1,22 +1,17 @@
|
||||
[Unit]
|
||||
Description=Archipelago Kiosk (X11 + Chromium)
|
||||
After=archipelago.service graphical.target
|
||||
After=archipelago.service
|
||||
Wants=archipelago.service
|
||||
ConditionPathExists=/usr/local/bin/archipelago-kiosk-x11
|
||||
ConditionPathExists=/usr/local/bin/archipelago-kiosk-launcher
|
||||
Conflicts=getty@tty1.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=archipelago
|
||||
Environment="HOME=/home/archipelago"
|
||||
Environment="DISPLAY=:0"
|
||||
# Wait for backend before launching UI
|
||||
ExecStartPre=/bin/bash -c 'for i in $(seq 1 30); do curl -sf http://localhost/health >/dev/null 2>&1 && exit 0; sleep 2; done; exit 0'
|
||||
ExecStart=/usr/bin/startx /usr/local/bin/archipelago-kiosk-x11 -- -nocursor vt1
|
||||
ExecStartPre=/bin/bash -c 'for i in $(seq 1 15); do curl -sf http://localhost/health >/dev/null 2>&1 && exit 0; sleep 2; done; exit 0'
|
||||
ExecStart=/usr/local/bin/archipelago-kiosk-launcher
|
||||
TimeoutStartSec=60
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
StandardInput=tty
|
||||
TTYPath=/dev/tty1
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
@@ -20,6 +20,7 @@ server {
|
||||
alias /opt/archipelago/web-ui/aiui/;
|
||||
index index.html;
|
||||
try_files $uri $uri/ =404;
|
||||
add_header Cache-Control "no-cache, no-store, must-revalidate";
|
||||
}
|
||||
|
||||
# AIUI Claude API proxy — requires valid session cookie
|
||||
@@ -411,6 +412,7 @@ server {
|
||||
proxy_pass https://botfights.net/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host botfights.net;
|
||||
proxy_set_header Accept-Encoding "";
|
||||
proxy_ssl_server_name on;
|
||||
proxy_hide_header X-Frame-Options;
|
||||
proxy_hide_header Content-Security-Policy;
|
||||
@@ -418,24 +420,50 @@ server {
|
||||
proxy_hide_header Cross-Origin-Opener-Policy;
|
||||
proxy_hide_header Cross-Origin-Resource-Policy;
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
sub_filter_once off;
|
||||
sub_filter_types text/css application/javascript;
|
||||
sub_filter 'href="/' 'href="/ext/botfights/';
|
||||
sub_filter 'src="/' 'src="/ext/botfights/';
|
||||
sub_filter 'action="/' 'action="/ext/botfights/';
|
||||
sub_filter "href='/" "href='/ext/botfights/";
|
||||
sub_filter "src='/" "src='/ext/botfights/";
|
||||
sub_filter '</head>' '<script src="/nostr-provider.js"></script></head>';
|
||||
}
|
||||
location /ext/484-kitchen/ {
|
||||
proxy_pass https://484.kitchen/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host 484.kitchen;
|
||||
proxy_set_header Accept-Encoding "";
|
||||
proxy_ssl_server_name on;
|
||||
proxy_hide_header X-Frame-Options;
|
||||
proxy_hide_header Content-Security-Policy;
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
sub_filter_once off;
|
||||
sub_filter_types text/css application/javascript;
|
||||
sub_filter 'href="/' 'href="/ext/484-kitchen/';
|
||||
sub_filter 'src="/' 'src="/ext/484-kitchen/';
|
||||
sub_filter 'action="/' 'action="/ext/484-kitchen/';
|
||||
sub_filter "href='/" "href='/ext/484-kitchen/";
|
||||
sub_filter "src='/" "src='/ext/484-kitchen/";
|
||||
sub_filter '</head>' '<script src="/nostr-provider.js"></script></head>';
|
||||
}
|
||||
location /ext/arch-presentation/ {
|
||||
proxy_pass https://present.l484.com/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host present.l484.com;
|
||||
proxy_set_header Accept-Encoding "";
|
||||
proxy_ssl_server_name on;
|
||||
proxy_hide_header X-Frame-Options;
|
||||
proxy_hide_header Content-Security-Policy;
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
sub_filter_once off;
|
||||
sub_filter_types text/css application/javascript;
|
||||
sub_filter 'href="/' 'href="/ext/arch-presentation/';
|
||||
sub_filter 'src="/' 'src="/ext/arch-presentation/';
|
||||
sub_filter 'action="/' 'action="/ext/arch-presentation/';
|
||||
sub_filter "href='/" "href='/ext/arch-presentation/";
|
||||
sub_filter "src='/" "src='/ext/arch-presentation/";
|
||||
sub_filter '</head>' '<script src="/nostr-provider.js"></script></head>';
|
||||
}
|
||||
|
||||
# Proxy WebSocket
|
||||
@@ -477,6 +505,7 @@ server {
|
||||
alias /opt/archipelago/web-ui/aiui/;
|
||||
index index.html;
|
||||
try_files $uri $uri/ =404;
|
||||
add_header Cache-Control "no-cache, no-store, must-revalidate";
|
||||
}
|
||||
location /aiui/api/claude/ {
|
||||
if ($cookie_session = "") {
|
||||
@@ -642,6 +671,7 @@ server {
|
||||
proxy_pass https://botfights.net/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host botfights.net;
|
||||
proxy_set_header Accept-Encoding "";
|
||||
proxy_ssl_server_name on;
|
||||
proxy_hide_header X-Frame-Options;
|
||||
proxy_hide_header Content-Security-Policy;
|
||||
@@ -649,24 +679,50 @@ server {
|
||||
proxy_hide_header Cross-Origin-Opener-Policy;
|
||||
proxy_hide_header Cross-Origin-Resource-Policy;
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
sub_filter_once off;
|
||||
sub_filter_types text/css application/javascript;
|
||||
sub_filter 'href="/' 'href="/ext/botfights/';
|
||||
sub_filter 'src="/' 'src="/ext/botfights/';
|
||||
sub_filter 'action="/' 'action="/ext/botfights/';
|
||||
sub_filter "href='/" "href='/ext/botfights/";
|
||||
sub_filter "src='/" "src='/ext/botfights/";
|
||||
sub_filter '</head>' '<script src="/nostr-provider.js"></script></head>';
|
||||
}
|
||||
location /ext/484-kitchen/ {
|
||||
proxy_pass https://484.kitchen/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host 484.kitchen;
|
||||
proxy_set_header Accept-Encoding "";
|
||||
proxy_ssl_server_name on;
|
||||
proxy_hide_header X-Frame-Options;
|
||||
proxy_hide_header Content-Security-Policy;
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
sub_filter_once off;
|
||||
sub_filter_types text/css application/javascript;
|
||||
sub_filter 'href="/' 'href="/ext/484-kitchen/';
|
||||
sub_filter 'src="/' 'src="/ext/484-kitchen/';
|
||||
sub_filter 'action="/' 'action="/ext/484-kitchen/';
|
||||
sub_filter "href='/" "href='/ext/484-kitchen/";
|
||||
sub_filter "src='/" "src='/ext/484-kitchen/";
|
||||
sub_filter '</head>' '<script src="/nostr-provider.js"></script></head>';
|
||||
}
|
||||
location /ext/arch-presentation/ {
|
||||
proxy_pass https://present.l484.com/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host present.l484.com;
|
||||
proxy_set_header Accept-Encoding "";
|
||||
proxy_ssl_server_name on;
|
||||
proxy_hide_header X-Frame-Options;
|
||||
proxy_hide_header Content-Security-Policy;
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
sub_filter_once off;
|
||||
sub_filter_types text/css application/javascript;
|
||||
sub_filter 'href="/' 'href="/ext/arch-presentation/';
|
||||
sub_filter 'src="/' 'src="/ext/arch-presentation/';
|
||||
sub_filter 'action="/' 'action="/ext/arch-presentation/';
|
||||
sub_filter "href='/" "href='/ext/arch-presentation/";
|
||||
sub_filter "src='/" "src='/ext/arch-presentation/";
|
||||
sub_filter '</head>' '<script src="/nostr-provider.js"></script></head>';
|
||||
}
|
||||
|
||||
location /ws {
|
||||
@@ -679,3 +735,67 @@ server {
|
||||
}
|
||||
}
|
||||
|
||||
# External site reverse proxies — each on its own port so SPAs work at root.
|
||||
# Strips X-Frame-Options to allow iframe embedding from Archipelago UI.
|
||||
# Injects NIP-07 nostr-provider.js for Nostr login integration.
|
||||
server {
|
||||
listen 8901;
|
||||
server_name _;
|
||||
location / {
|
||||
proxy_pass https://botfights.net;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host botfights.net;
|
||||
proxy_set_header Accept-Encoding "";
|
||||
proxy_ssl_server_name on;
|
||||
proxy_hide_header X-Frame-Options;
|
||||
proxy_hide_header Content-Security-Policy;
|
||||
proxy_hide_header Cross-Origin-Embedder-Policy;
|
||||
proxy_hide_header Cross-Origin-Opener-Policy;
|
||||
proxy_hide_header Cross-Origin-Resource-Policy;
|
||||
sub_filter '</head>' '<script src="/nostr-provider.js"></script></head>';
|
||||
sub_filter_once on;
|
||||
}
|
||||
# Serve nostr-provider.js from the main web-ui directory
|
||||
location = /nostr-provider.js {
|
||||
alias /opt/archipelago/web-ui/nostr-provider.js;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 8902;
|
||||
server_name _;
|
||||
location / {
|
||||
proxy_pass https://484.kitchen;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host 484.kitchen;
|
||||
proxy_set_header Accept-Encoding "";
|
||||
proxy_ssl_server_name on;
|
||||
proxy_hide_header X-Frame-Options;
|
||||
proxy_hide_header Content-Security-Policy;
|
||||
sub_filter '</head>' '<script src="/nostr-provider.js"></script></head>';
|
||||
sub_filter_once on;
|
||||
}
|
||||
location = /nostr-provider.js {
|
||||
alias /opt/archipelago/web-ui/nostr-provider.js;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 8903;
|
||||
server_name _;
|
||||
location / {
|
||||
proxy_pass https://present.l484.com;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host present.l484.com;
|
||||
proxy_set_header Accept-Encoding "";
|
||||
proxy_ssl_server_name on;
|
||||
proxy_hide_header X-Frame-Options;
|
||||
proxy_hide_header Content-Security-Policy;
|
||||
sub_filter '</head>' '<script src="/nostr-provider.js"></script></head>';
|
||||
sub_filter_once on;
|
||||
}
|
||||
location = /nostr-provider.js {
|
||||
alias /opt/archipelago/web-ui/nostr-provider.js;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user