Merge pull request 'master' (#22) from master into 98

Reviewed-on: #22
This commit is contained in:
Kibi Kelburton
2026-07-26 20:23:11 +00:00
5 changed files with 28 additions and 5 deletions

9
config/tor/torrc Normal file
View File

@@ -0,0 +1,9 @@
# Tor configuration for f0ckm
# Enable SOCKS proxy for internal container & external connections
SocksPort 0.0.0.0:9050
# Tor Hidden Service (v3 Onion Service) configuration
# Tor will automatically generate private keys and hostnames in /var/lib/tor/f0ckm_hs/
HiddenServiceDir /var/lib/tor/f0ckm_hs/
HiddenServicePort 80 f0ckm:1337

View File

@@ -5,6 +5,7 @@
"domain": "example.com", "domain": "example.com",
"regex": "example\\.com" "regex": "example\\.com"
}, },
"onion": "http://your-onion-address.onion",
"socks": "socks5://127.0.0.1:9050", "socks": "socks5://127.0.0.1:9050",
"mail": "admin@example.com", "mail": "admin@example.com",
"maxfilesize": 104857600, "maxfilesize": 104857600,

View File

@@ -52,6 +52,9 @@ services:
ports: ports:
- "9050:9050" - "9050:9050"
- "8118:8118" - "8118:8118"
volumes:
- ./config/tor:/etc/tor:ro
- ./f0ckm-data/tor:/var/lib/tor:Z
networks: networks:
- f0ckm-net - f0ckm-net
restart: always restart: always

View File

@@ -4905,16 +4905,17 @@ span.placeholder {
transition: right 0.3s ease-in-out; transition: right 0.3s ease-in-out;
} }
/* Sidebar hidden — reclaim the full width */
body.sidebar-right-hidden .pagination-container-fluid {
right: 0;
}
/* Modern layout: wider sidebar needs wider offset */ /* Modern layout: wider sidebar needs wider offset */
body.layout-modern .pagination-container-fluid { body.layout-modern .pagination-container-fluid {
right: 400px; right: 400px;
} }
/* Sidebar hidden — reclaim the full width */
body.sidebar-right-hidden .pagination-container-fluid,
body.layout-modern.sidebar-right-hidden .pagination-container-fluid {
right: 0;
}
.bottom-pagination.fixed-pagination { .bottom-pagination.fixed-pagination {
margin: 10px auto; margin: 10px auto;
pointer-events: auto; pointer-events: auto;

View File

@@ -456,6 +456,15 @@ process.on('uncaughtException', err => {
res.setHeader('Permissions-Policy', 'geolocation=(), microphone=(), camera=()'); res.setHeader('Permissions-Policy', 'geolocation=(), microphone=(), camera=()');
// Encourage connection reuse — helps external tools like ShareX avoid repeated TCP/TLS handshakes // Encourage connection reuse — helps external tools like ShareX avoid repeated TCP/TLS handshakes
res.setHeader('Connection', 'keep-alive'); res.setHeader('Connection', 'keep-alive');
// Tor Onion-Location header: advertises .onion service counterpart to Tor Browser users when enabled
if (cfg.websrv?.enable_tor_hs !== false && cfg.main?.onion && !req.headers['host']?.endsWith('.onion')) {
const p = req.url?.pathname || '/';
const s = req.url?.search || '';
const onionHost = cfg.main.onion.replace(/\/+$/, '');
res.setHeader('Onion-Location', `${onionHost}${p}${s}`);
}
if (isSecure) { if (isSecure) {
res.setHeader('Strict-Transport-Security', 'max-age=31536000; includeSubDomains'); res.setHeader('Strict-Transport-Security', 'max-age=31536000; includeSubDomains');
} }