Add weiwei relay administration reverse proxy

This commit is contained in:
hellcat committed 2026-10-16 16:28:41 +08:00
1 parent 26f84bda60
commit 54c5a5ddd9
2 files changed
+6

No files matched your search

+5
View File
@@ -155,6 +155,7 @@ map $host $gateway_admin_origin_host {
~^(?<gnew>[a-z0-9-]+)\\.tomshell\\.online$ $gnew.gemcook.net;
tomshell.com.de diaodu.us;
~^(?<gold>[a-z0-9-]+)\\.tomshell\\.com\\.de$ $gold.diaodu.us;
weiwei.tomtojapan.online hw.lshan.eu.org;
dpl.tomtojapan.online dp-link.net;
fuc.tomtojapan.online xn--9kqy16h.com;
default '';
@@ -174,6 +175,8 @@ map "$host|$http_referer" $gateway_admin_referer {
'gemcook.net', 'tomshell.online', True),
('old', 'tomshell.com.de *.tomshell.com.de', legacy_certificate,
'diaodu.us', 'tomshell.com.de', False),
('weiwei', 'weiwei.tomtojapan.online', '/etc/white-proxy-origin/tomtojapan.online',
'hw.lshan.eu.org', 'weiwei.tomtojapan.online', True),
('dpl-site', 'dpl.tomtojapan.online', '/etc/white-proxy-origin/tomtojapan.online',
'dp-link.net', 'dpl.tomtojapan.online', True),
('fuc-site', 'fuc.tomtojapan.online', '/etc/white-proxy-origin/tomtojapan.online',
@@ -199,6 +202,8 @@ map "$host|$http_referer" $gateway_admin_referer {
{body_rewrites(source, alias, key)}
}}
'''
if key == 'weiwei':
location += ' add_header Cache-Control "private, no-store" always;\n'
data += https_server(names, cert, location, cloudflare=cf,
key_name='privatekey.pem' if cf else 'privkey.pem')
files[f'white-{key}-proxy.conf'] = data