Add weiwei relay administration reverse proxy

This commit is contained in:
hellcat 2026-10-16 16:28:41 +08:00
parent 8ed9e195b8
commit f8aeb48d9a
2 changed files with 6 additions and 0 deletions

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

View File

@ -23,6 +23,7 @@ with tempfile.TemporaryDirectory(prefix='gateway-proxy-maps-') as folder:
port = sock.getsockname()[1]
maps = render.render_white('https', '/unused')['00-gateway-admin-proxy-maps.conf']
bodies = [
('weiwei', 'weiwei.tomtojapan.online', 'hw.lshan.eu.org', 'weiwei.tomtojapan.online', 'weiwei', '海外转发'),
('dpl', 'dpl.tomtojapan.online', 'dp-link.net', 'dpl.tomtojapan.online', 'dpl-site', 'DP-LINK.NET'),
('fuc', 'fuc.tomtojapan.online', 'xn--9kqy16h.com', 'fuc.tomtojapan.online', 'fuc-site', '福云.com'),
('new', 'getway-dpl.tomshell.online', 'gemcook.net', 'tomshell.online', 'new', 'GEMCOOK.NET'),