SSL Wizard: Implement disable-SSL

This commit is contained in:
zzz
2018-05-02 13:39:49 +00:00
parent 1c677cd99b
commit c9a6fab638

View File

@ -303,13 +303,29 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
// rewrite i2ptunnel.config // rewrite i2ptunnel.config
Integer i443 = Integer.valueOf(443); Integer i443 = Integer.valueOf(443);
if (ok && !tgts.containsKey(i443)) { boolean addtgt = ok && !tgts.containsKey(i443) && !action.equals("Disable");
// update table for display boolean deltgt = ok && tgts.containsKey(i443) && action.equals("Disable");
tgts.put(i443, host + ':' + port); if (addtgt || deltgt) {
ports.add(i443); if (addtgt) {
// add ssl config // update table for display
// TODO action = disable tgts.put(i443, host + ':' + port);
custom += " targetForPort.443=" + host + ':' + port; ports.add(i443);
// add ssl config
custom += " targetForPort.443=" + host + ':' + port;
} else {
// update table for display
tgts.remove(i443);
ports.remove(i443);
// remove ssl config
StringBuilder newCust = new StringBuilder(custom.length());
for (int i = 0; i < opts.length; i++) {
String opt = opts[i];
if (opt.startsWith("targetForPort.443="))
continue;
newCust.append(opt).append(' ');
}
custom = newCust.toString().trim();
}
editBean.setNofilter_customOptions(custom); editBean.setNofilter_customOptions(custom);
// copy over existing settings // copy over existing settings
// we only set the applicable server settings // we only set the applicable server settings
@ -666,9 +682,6 @@ input.default { width: 1px; height: 1px; visibility: hidden; }
} }
} catch (IOException ioe) { ioe.printStackTrace(); } } catch (IOException ioe) { ioe.printStackTrace(); }
%> %>
<tr><td colspan="4">
<div class="displayText" tabindex="0" title="<%=intl._t("yyy")%>"></div>
</td></tr>
</table> </table>
</form> </form>
<% <%