summaryrefslogtreecommitdiffstats
path: root/modules-available/webinterface/templates
diff options
context:
space:
mode:
authorSimon Rettberg2026-04-30 11:31:58 +0200
committerSimon Rettberg2026-04-30 11:31:58 +0200
commit6cb052b9c672cc0eff18ea077736bde319e8966d (patch)
tree156540d0169b494f6b6a68f29cd418721e386f0a /modules-available/webinterface/templates
parentstyle: Fix radio/checkbox margin inside input-group-addon (diff)
downloadslx-admin-master.tar.gz
slx-admin-master.tar.xz
slx-admin-master.zip
[webinterface] Show current proxy chain in trusted proxy dialogHEADmaster
Add to list of trusted proxies with a single click.
Diffstat (limited to 'modules-available/webinterface/templates')
-rw-r--r--modules-available/webinterface/templates/trusted-proxies.html21
1 files changed, 21 insertions, 0 deletions
diff --git a/modules-available/webinterface/templates/trusted-proxies.html b/modules-available/webinterface/templates/trusted-proxies.html
index a2461edc..2ce3aa80 100644
--- a/modules-available/webinterface/templates/trusted-proxies.html
+++ b/modules-available/webinterface/templates/trusted-proxies.html
@@ -12,6 +12,27 @@
<textarea class="form-control" name="trusted-proxies-list" id="trusted-proxies-list" rows="10"
placeholder="10.0.0.1 # public proxy&#10;192.168.1.0 # VPN proxy">{{trustedProxiesList}}</textarea>
<p class="help-block">{{lang_trustedProxiesListHelp}}</p>
+ <div class="slx-space"></div>
+ {{#chain.0}}
+ <style>.proxy-addr { text-decoration: underline; cursor: pointer }</style>
+ <script>
+ document.addEventListener('DOMContentLoaded', function(e) {
+ e.preventDefault();
+ $('.proxy-addr').click(function() {
+ const ip = $(this).text();
+ const ta = $('#trusted-proxies-list');
+ if (new RegExp("(^|\r|\n|\s)" + ip.replaceAll('.', '\.') + "($|\r|\n|\s)").test(ta.val())) return;
+ ta.val((ta.val().trim() + "\r\n" + ip).trim());
+ });
+ });
+ </script>
+ <b>{{lang_yourConnectionChain}}</b>:
+ {{client}} <span class="text-muted">({{lang_ipAddressYouQ}})</span>
+ {{#chain}}
+ &rAarr; <a class="proxy-addr">{{.}}</a>
+ {{/chain}}
+ &rAarr; {{server}} <span class="text-muted">({{lang_ipThisServer}})</span>
+ {{/chain.0}}
</div>
<div class="pull-right">