From 005f79c95f6aa0ccb5a1e74338a29a8c460b6614 Mon Sep 17 00:00:00 2001 From: zzz Date: Tue, 12 May 2020 14:07:30 +0000 Subject: [PATCH] i2ptunnel: Disable changing shared client option while running --- apps/i2ptunnel/jsp/editClient.jsi | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/apps/i2ptunnel/jsp/editClient.jsi b/apps/i2ptunnel/jsp/editClient.jsi index 70874a1a6d..533c5a332d 100644 --- a/apps/i2ptunnel/jsp/editClient.jsi +++ b/apps/i2ptunnel/jsp/editClient.jsi @@ -222,13 +222,28 @@ if (!"streamrclient".equals(tunnelType)) { %> - + > <%=intl._t("Shared Client")%> - +<% + String shtitle = canChangePort ? + intl._t("Traffic from all clients with this feature enabled will be routed over the same set of tunnels. This will make profiling the tunnels by an adversary more difficult, but will link the clients together.") : + bStopFirst; + boolean isShared = editBean.isSharedClient(curTunnel); + String shdisabled = canChangePort ? "" : " disabled=\"disabled\" "; +%> + +<% + if (isShared && !canChangePort) { + // disabled checkbox won't come back in the form, stuff it in here + // https://stackoverflow.com/questions/155291/can-html-checkboxes-be-set-to-readonly + %><% + } +%> <%