Changeset 7858dbe


Ignore:
Timestamp:
May 23, 2019 10:41:34 AM (10 months ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
7bdfd07
Parents:
ea5ddfc
Message:

i2ptunnel: Add LS2 option, change to select box

Location:
apps/i2ptunnel
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/ui/GeneralHelper.java

    rea5ddfc r7858dbe  
    565565        if (getEncrypt(tunnel))
    566566            return 1;
    567         if (getProperty(tunnel, "i2cp.leaseSetType", "1").equals("5")) {
     567        String lstype = getProperty(tunnel, "i2cp.leaseSetType", "1");
     568        if (lstype.equals("5")) {
    568569            int rv;
    569570            String authType = getProperty(tunnel, "i2cp.leaseSetAuthType", "0");
     
    584585                rv++;
    585586            return rv;
     587        } else if (lstype.equals("3")) {
     588            return 10;
    586589        }
    587590        return 0;
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/ui/TunnelConfig.java

    rea5ddfc r7858dbe  
    713713                config.put(OPT + "i2cp.leaseSetType", "5");
    714714                config.put(OPT + "i2cp.leaseSetAuthType", "1");
     715                break;
     716   
     717              case 10:  // none (LS2)
     718                config.put(OPT + "i2cp.leaseSetType", "3");
     719                config.remove(OPT + "i2cp.leaseSetSecret");
     720                config.remove(OPT + "i2cp.leaseSetAuthType");
    715721                break;
    716722
  • apps/i2ptunnel/jsp/editServer.jsi

    rea5ddfc r7858dbe  
    438438                   String curEncryptMode = editBean.getEncryptMode(curTunnel);
    439439%>
    440                 <span class="multiOption"><label title="<%=intl._t("Allow all clients to connect to this service")%>"><input value="0" type="radio" name="encryptMode"<%=(curEncryptMode.equals("0") ? " checked=\"checked\"" : "")%> class="tickbox" />
    441                     <%=intl._t("Disable")%></label></span>
    442                 <span class="multiOption"><label title="<%=intl._t("Only clients with the encryption key will be able to connect")%>"><input value="1" type="radio" name="encryptMode"<%=(curEncryptMode.equals("1") ? " checked=\"checked\"" : "")%> class="tickbox" />
    443                     <%=intl._t("Encrypted")%></label></span>
     440                <select id="encryptMode" name="encryptMode">" class="selectbox">
     441                <option title="<%=intl._t("Allow all clients to connect to this service")%>" value="0" <%=(curEncryptMode.equals("0") ? " selected=\"selected\"" : "")%>  />
     442                    <%=intl._t("Disable")%></option>
     443<%
     444                if (editBean.isAdvanced() || curEncryptMode.equals("10")) {
     445%>
     446                <option title="<%=intl._t("Allow all clients to connect to this service")%>" value="10" <%=(curEncryptMode.equals("10") ? " selected=\"selected\"" : "")%>  />
     447                    <%=intl._t("Disable")%> (LS2)</option>
     448<%
     449                } // isAdvanced()
     450%>
     451                <option title="<%=intl._t("Only clients with the encryption key will be able to connect")%>" value="1" <%=(curEncryptMode.equals("1") ? " selected=\"selected\"" : "")%>  />
     452                    <%=intl._t("Encrypted")%></option>
    444453<%
    445454                int curSigType = editBean.getSigType(curTunnel, tunnelType);
     
    447456                if (allowBlinding) {
    448457%>
    449                 <span class="multiOption"><label title="<%=intl._t("Prevents server discovery by floodfills")%>"><input value="2" type="radio" name="encryptMode"<%=(curEncryptMode.equals("2") ? " checked=\"checked\"" : "")%> class="tickbox" />
    450                     <%=intl._t("Blinded")%></label></span>
     458                <option title="<%=intl._t("Prevents server discovery by floodfills")%>" value="2" <%=(curEncryptMode.equals("2") ? " selected=\"selected\"" : "")%> />
     459                    <%=intl._t("Blinded")%></option>
    451460<%
    452461                     if (editBean.isAdvanced()) {
    453462%>
    454                 <span class="multiOption"><label title="<%=intl._t("Only clients with the password will be able to connect")%>"><input value="3" type="radio" name="encryptMode"<%=(curEncryptMode.equals("3") ? " checked=\"checked\"" : "")%> class="tickbox" />
    455                     <%=intl._t("Blinded with lookup password")%></label></span>
     463                <option title="<%=intl._t("Only clients with the password will be able to connect")%>" value="3" <%=(curEncryptMode.equals("3") ? " selected=\"selected\"" : "")%> />
     464                    <%=intl._t("Blinded with lookup password")%></option>
    456465<%
    457466                         // TODO, unimplemented
    458467%>
    459                 <span class="multiOption"><label title="<%=intl._t("Only clients with the encryption key will be able to connect")%>"><input value="4" type="radio" name="encryptMode"<%=(curEncryptMode.equals("4") ? " checked=\"checked\"" : "")%> class="tickbox" />
    460                     <%=intl._t("Blinded with shared key")%></label></span>
    461                 <span class="multiOption"><label title="<%=intl._t("Only clients with the password and key will be able to connect")%>"><input value="5" type="radio" name="encryptMode"<%=(curEncryptMode.equals("5") ? " checked=\"checked\"" : "")%> class="tickbox" />
    462                     <%=intl._t("Blinded with lookup password and shared key")%></label></span>
    463                 <span class="multiOption"><label title="<%=intl._t("Only clients with the encryption key will be able to connect")%>"><input value="6" type="radio" name="encryptMode"<%=(curEncryptMode.equals("6") ? " checked=\"checked\"" : "")%> class="tickbox" />
    464                     <%=intl._t("Blinded with per-user key")%> (PSK)</label></span>
    465                 <span class="multiOption"><label title="<%=intl._t("Only clients with the password and key will be able to connect")%>"><input value="7" type="radio" name="encryptMode"<%=(curEncryptMode.equals("7") ? " checked=\"checked\"" : "")%> class="tickbox" />
    466                     <%=intl._t("Blinded with lookup password and per-user key")%> (PSK)</label></span>
    467                 <span class="multiOption"><label title="<%=intl._t("Only clients with the encryption key will be able to connect")%>"><input value="8" type="radio" name="encryptMode"<%=(curEncryptMode.equals("8") ? " checked=\"checked\"" : "")%> class="tickbox" />
    468                     <%=intl._t("Blinded with per-user key")%> (DH)</label></span>
    469                 <span class="multiOption"><label title="<%=intl._t("Only clients with the password and key will be able to connect")%>"><input value="9" type="radio" name="encryptMode"<%=(curEncryptMode.equals("9") ? " checked=\"checked\"" : "")%> class="tickbox" />
    470                     <%=intl._t("Blinded with lookup password and per-user key")%> (DH)</label></span>
     468                <option title="<%=intl._t("Only clients with the encryption key will be able to connect")%>" value="4" <%=(curEncryptMode.equals("4") ? " selected=\"selected\"" : "")%> />
     469                    <%=intl._t("Blinded with shared key")%></option>
     470                <option title="<%=intl._t("Only clients with the password and key will be able to connect")%>" value="5" <%=(curEncryptMode.equals("5") ? " selected=\"selected\"" : "")%> />
     471                    <%=intl._t("Blinded with lookup password and shared key")%></option>
     472                <option title="<%=intl._t("Only clients with the encryption key will be able to connect")%>" value="6" <%=(curEncryptMode.equals("6") ? " selected=\"selected\"" : "")%> />
     473                    <%=intl._t("Blinded with per-user key")%> (PSK)</option>
     474                <option title="<%=intl._t("Only clients with the password and key will be able to connect")%>" value="7" <%=(curEncryptMode.equals("7") ? " selected=\"selected\"" : "")%> />
     475                    <%=intl._t("Blinded with lookup password and per-user key")%> (PSK)</option>
     476                <option title="<%=intl._t("Only clients with the encryption key will be able to connect")%>" value="8" <%=(curEncryptMode.equals("8") ? " selected=\"selected\"" : "")%> />
     477                    <%=intl._t("Blinded with per-user key")%> (DH)</option>
     478                <option title="<%=intl._t("Only clients with the password and key will be able to connect")%>" value="9" <%=(curEncryptMode.equals("9") ? " selected=\"selected\"" : "")%> />
     479                    <%=intl._t("Blinded with lookup password and per-user key")%> (DH)</option>
    471480<%
    472481                     } // isAdvanced()
    473482                } // allowBlinding
    474483%>
     484                </select>
    475485            </td>
    476486        </tr><tr>
Note: See TracChangeset for help on using the changeset viewer.