diff options
Diffstat (limited to 'modules-available/webinterface/templates')
| -rw-r--r-- | modules-available/webinterface/templates/trusted-proxies.html | 21 |
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 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}} + ⇛ <a class="proxy-addr">{{.}}</a> + {{/chain}} + ⇛ {{server}} <span class="text-muted">({{lang_ipThisServer}})</span> + {{/chain.0}} </div> <div class="pull-right"> |
