master #22
9
config/tor/torrc
Normal file
9
config/tor/torrc
Normal 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
|
||||
@@ -5,6 +5,7 @@
|
||||
"domain": "example.com",
|
||||
"regex": "example\\.com"
|
||||
},
|
||||
"onion": "http://your-onion-address.onion",
|
||||
"socks": "socks5://127.0.0.1:9050",
|
||||
"mail": "admin@example.com",
|
||||
"maxfilesize": 104857600,
|
||||
|
||||
@@ -52,6 +52,9 @@ services:
|
||||
ports:
|
||||
- "9050:9050"
|
||||
- "8118:8118"
|
||||
volumes:
|
||||
- ./config/tor:/etc/tor:ro
|
||||
- ./f0ckm-data/tor:/var/lib/tor:Z
|
||||
networks:
|
||||
- f0ckm-net
|
||||
restart: always
|
||||
|
||||
@@ -4623,16 +4623,17 @@ span.placeholder {
|
||||
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 */
|
||||
body.layout-modern .pagination-container-fluid {
|
||||
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 {
|
||||
margin: 10px auto;
|
||||
pointer-events: auto;
|
||||
|
||||
@@ -456,6 +456,15 @@ process.on('uncaughtException', err => {
|
||||
res.setHeader('Permissions-Policy', 'geolocation=(), microphone=(), camera=()');
|
||||
// Encourage connection reuse — helps external tools like ShareX avoid repeated TCP/TLS handshakes
|
||||
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) {
|
||||
res.setHeader('Strict-Transport-Security', 'max-age=31536000; includeSubDomains');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user