Add weiwei relay administration reverse proxy
This commit is contained in:
parent
26f84bda60
commit
54c5a5ddd9
@ -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
|
||||
|
||||
@ -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'),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user