Changeset 5ca319e for apps


Ignore:
Timestamp:
May 26, 2018 4:05:28 PM (2 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
3f64825
Parents:
f11104e
Message:

/confignet: Reorganize (ticket #2217)

Location:
apps/routerconsole
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • apps/routerconsole/java/src/net/i2p/router/web/helpers/ConfigNetHandler.java

    rf11104e r5ca319e  
    149149    /** @since 0.8.13 */
    150150    public void setDisableUDP(String foo) {
    151         _udpDisabled = true;
     151        _udpDisabled = "disabled".equals(foo);
    152152    }
    153153   
  • apps/routerconsole/java/src/net/i2p/router/web/helpers/ConfigNetHelper.java

    rf11104e r5ca319e  
    162162
    163163    /**
     164     * default true
     165     * @since 0.9.35
     166     */
     167    public String getUdpEnabledChecked() {
     168        if (_context.getBooleanPropertyDefaultTrue(TransportManager.PROP_ENABLE_UDP))
     169            return CHECKED;
     170        return "";
     171    }
     172
     173    /**
    164174     *  This isn't updated for the new statuses, but it's commented out in the jsp.
    165175     *  @deprecated unused, to be fixed if needed
  • apps/routerconsole/jsp/confignet.jsp

    rf11104e r5ca319e  
    2727 <tr>
    2828  <td class="infohelp">
    29  <b><%=intl._t("The default settings will work for most people.")%></b>
    30  <%=intl._t("Changing these settings will restart your router.")%>
     29 <b><%=intl._t("The default settings will work for most people.")%>
     30 <%=intl._t("Changing these settings will restart your router.")%></b>
     31  </td>
     32 </tr>
     33 <tr>
     34  <td class="infohelp">
     35   <b><%=intl._t("Do not reveal your port numbers to anyone, as they can be used to discover your IP address.")%></b>
    3136  </td>
    3237 </tr>
     
    6267 </tr>
    6368 <tr>
    64   <th id="ipchange"><%=intl._t("Action when IP changes")%></th>
    65  </tr>
    66  <tr>
    6769  <td>
    68     <label><input type="checkbox" class="optbox" name="laptop" value="true" <jsp:getProperty name="nethelper" property="laptopChecked" /> >
    69     <%=intl._t("Laptop mode - Change router identity and UDP port when IP changes for enhanced anonymity")%>
    70     (<i><%=intl._t("Experimental")%></i>)</label>
    71   </td>
    72  </tr>
    73  <tr>
    74   <th id="ipv4config"><%=intl._t("IPv4 Configuration")%></th>
    75  </tr>
    76  <tr>
    77   <td>
     70 <b class="suboption"><%=intl._t("IPv4 Configuration")%>:</b><br>
    7871    <label><input type="checkbox" class="optbox" name="IPv4Firewalled" value="true" <jsp:getProperty name="nethelper" property="IPv4FirewalledChecked" /> >
    7972    <%=intl._t("Disable inbound (Firewalled by Carrier-grade NAT or DS-Lite)")%></label>
     
    8174 </tr>
    8275 <tr>
    83   <th id="ipv6config"><%=intl._t("IPv6 Configuration")%></th>
    84  </tr>
    85  <tr>
    8676  <td>
    87     <label><input type="checkbox" class="optbox" name="IPv6Firewalled" value="true" <jsp:getProperty name="nethelper" property="IPv6FirewalledChecked" /> >
    88     <%=intl._t("Disable inbound (Firewalled by Carrier-grade NAT or DS-Lite)")%></label><br>
    89     <label><input type="radio" class="optbox" name="ipv6" value="false" <%=nethelper.getIPv6Checked("false") %> >
    90     <%=intl._t("Disable IPv6")%></label><br>
    91     <label><input type="radio" class="optbox" name="ipv6" value="enable" <%=nethelper.getIPv6Checked("enable") %> >
    92     <%=intl._t("Enable IPv6")%></label><br>
     77 <b class="suboption"><%=intl._t("IPv6 Configuration")%>:</b><br>
    9378    <label><input type="radio" class="optbox" name="ipv6" value="preferIPv4" <%=nethelper.getIPv6Checked("preferIPv4") %> >
    9479    <%=intl._t("Prefer IPv4 over IPv6")%></label><br>
    9580    <label><input type="radio" class="optbox" name="ipv6" value="preferIPv6" <%=nethelper.getIPv6Checked("preferIPv6") %> >
    9681    <%=intl._t("Prefer IPv6 over IPv4")%></label><br>
     82    <label><input type="radio" class="optbox" name="ipv6" value="enable" <%=nethelper.getIPv6Checked("enable") %> >
     83    <%=intl._t("Enable IPv6")%></label><br>
     84    <label><input type="radio" class="optbox" name="ipv6" value="false" <%=nethelper.getIPv6Checked("false") %> >
     85    <%=intl._t("Disable IPv6")%></label><br>
    9786    <label><input type="radio" class="optbox" name="ipv6" value="only" <%=nethelper.getIPv6Checked("only") %> >
    9887    <%=intl._t("Use IPv6 only (disable IPv4)")%>
    99     (<i><%=intl._t("Experimental")%></i>)</label>
     88    <i>(<%=intl._t("Experimental")%>)</i></label><br>
     89    <label><input type="checkbox" class="optbox" name="IPv6Firewalled" value="true" <jsp:getProperty name="nethelper" property="IPv6FirewalledChecked" /> >
     90    <%=intl._t("Disable inbound (Firewalled by Carrier-grade NAT or DS-Lite)")%></label>
     91  </td>
     92 </tr>
     93 <tr>
     94  <td>
     95 <b class="suboption"><%=intl._t("Action when IP changes")%>:</b><br>
     96    <label><input type="checkbox" class="optbox" name="laptop" value="true" <jsp:getProperty name="nethelper" property="laptopChecked" /> >
     97    <%=intl._t("Laptop mode - Change router identity and UDP port when IP changes for enhanced anonymity")%>
     98    <i>(<%=intl._t("Experimental")%>)</i></label>
    10099  </td>
    101100 </tr>
     
    104103 </tr>
    105104 <tr>
    106   <td class="infowarn">
    107    <b><%=intl._t("Do not reveal your port numbers to anyone, as they can be used to discover your IP address.")%></b>
     105  <td>
     106 <b class="suboption"><%=intl._t("UDP port:")%></b><br>
     107 <label><input type="radio" class="optbox" name="disableUDP" value="enabled" <%=nethelper.getUdpEnabledChecked() %> >
     108 <%=intl._t("Specify Port")%>:</label>
     109 <input name ="udpPort" type="text" size="5" maxlength="5" value="<jsp:getProperty name="nethelper" property="configuredUdpPort" />" ><br>
     110 <label><input type="radio" class="optbox" name="disableUDP" value="disabled" <%=nethelper.getUdpDisabledChecked() %> >
     111 <%=intl._t("Completely disable")%> <i><%=intl._t("(select only if behind a firewall that blocks outbound UDP)")%></i></label>
    108112  </td>
    109113 </tr>
    110114 <tr>
     115  <th id="tcpconfig"><%=intl._t("TCP Configuration")%></th>
     116 </tr>
     117 <tr>
    111118  <td>
    112  <b><%=intl._t("UDP port:")%></b>
    113  <input name ="udpPort" type="text" size="5" maxlength="5" value="<jsp:getProperty name="nethelper" property="configuredUdpPort" />" ><br>
    114  <label><input type="checkbox" class="optbox" name="disableUDP" value="disabled" <%=nethelper.getUdpDisabledChecked() %> >
    115  <%=intl._t("Completely disable")%> <i><%=intl._t("(select only if behind a firewall that blocks outbound UDP)")%></i></label>
     119 <b class="suboption"><%=intl._t("Externally reachable TCP port")%>:</b><br>
     120    <label><input type="radio" class="optbox" name="ntcpAutoPort" value="1" <%=nethelper.getTcpAutoPortChecked(1) %> >
     121    <%=intl._t("Specify Port")%>:</label>
     122    <input name ="ntcpport" type="text" size="5" maxlength="5" value="<jsp:getProperty name="nethelper" property="ntcpport" />" ><br>
     123    <label><input type="radio" class="optbox" name="ntcpAutoPort" value="2" <%=nethelper.getTcpAutoPortChecked(2) %> >
     124    <%=intl._t("Use the same port configured for UDP")%>
     125    <i>(<%=intl._t("currently")%> <jsp:getProperty name="nethelper" property="udpPort" />)</i></label>
    116126  </td>
    117  </tr>
    118 <% /********
    119 <!-- let's keep this simple...
    120 <input type="checkbox" class="optbox" name="requireIntroductions" value="true" <jsp:getProperty name="nethelper" property="requireIntroductionsChecked" /> />
    121  Require SSU introductions
    122  <i>(Enable if you cannot open your firewall)</i>
    123  </p><p>
    124  Current External UDP address: <i><jsp:getProperty name="nethelper" property="udpAddress" /></i><br>
    125 -->
    126 *********/ %>
    127  <tr>
    128   <th id="tcpconfig"><%=intl._t("TCP Configuration")%></th>
    129127 </tr>
    130128 <tr>
     
    137135    <label><input type="radio" class="optbox" name="ntcpAutoIP" value="always" <%=nethelper.getTcpAutoIPChecked(3) %> >
    138136    <%=intl._t("Always use auto-detected IP address (Not firewalled)")%></label><br>
    139     <label><input type="radio" class="optbox" name="ntcpAutoIP" value="false" <%=nethelper.getTcpAutoIPChecked(1) %> >
    140     <%=intl._t("Specify hostname or IP")%>:</label>
    141     <input name ="ntcphost" type="text" size="16" value="<jsp:getProperty name="nethelper" property="ntcphostname" />" ><br>
    142137    <label><input type="radio" class="optbox" name="ntcpAutoIP" value="false" <%=nethelper.getTcpAutoIPChecked(0) %> >
    143138    <%=intl._t("Disable inbound (Firewalled)")%></label><br>
    144139    <label><input type="radio" class="optbox" name="ntcpAutoIP" value="disabled" <%=nethelper.getTcpAutoIPChecked(4) %> >
    145     <%=intl._t("Completely disable")%> <i><%=intl._t("(select only if behind a firewall that throttles or blocks outbound TCP)")%></i></label>
    146   </td>
    147  </tr>
    148  <tr>
    149   <th id="externaltcp"><%=intl._t("Externally reachable TCP port")%></th>
    150  </tr>
    151  <tr>
    152   <td>
    153     <label><input type="radio" class="optbox" name="ntcpAutoPort" value="2" <%=nethelper.getTcpAutoPortChecked(2) %> >
    154     <%=intl._t("Use the same port configured for UDP")%>
    155     <i>(<%=intl._t("currently")%> <jsp:getProperty name="nethelper" property="udpPort" />)</i></label><br>
    156     <label><input type="radio" class="optbox" name="ntcpAutoPort" value="1" <%=nethelper.getTcpAutoPortChecked(1) %> >
    157     <%=intl._t("Specify Port")%>:</label>
    158     <input name ="ntcpport" type="text" size="5" maxlength="5" value="<jsp:getProperty name="nethelper" property="ntcpport" />" >
     140    <%=intl._t("Completely disable")%> <i><%=intl._t("(select only if behind a firewall that throttles or blocks outbound TCP)")%></i></label><br>
     141    <label><input type="radio" class="optbox" name="ntcpAutoIP" value="false" <%=nethelper.getTcpAutoIPChecked(1) %> >
     142    <%=intl._t("Specify hostname or IP")%>:</label>
     143    <input name ="ntcphost" type="text" size="16" value="<jsp:getProperty name="nethelper" property="ntcphostname" />" >
    159144  </td>
    160145 </tr>
     
    166151 </tr>
    167152</table>
    168 
    169 <% /********
    170 <!-- let's keep this simple...
    171 <input type="submit" name="recheckReachability" value="Check network reachability..." />
    172 </p>
    173 -->
    174 *********/ %>
    175 <% /********
    176       <!--
    177  <b>Dynamic Router Keys: </b>
    178  <input type="checkbox" class="optbox" name="dynamicKeys" value="true" <jsp:getProperty name="nethelper" property="dynamicKeysChecked" /> /><br>
    179  <p>
    180  This setting causes your router identity to be regenerated every time your IP address
    181  changes. If you have a dynamic IP this option can speed up your reintegration into
    182  the network (since people will have banned your old router identity), and, for
    183  very weak adversaries, help frustrate trivial
    184  <a href="http://www.i2p.net/how_threatmodel#intersection">intersection
    185  attacks</a> against the NetDB.  Your different router identities would only be
    186  'hidden' among other I2P users at your ISP, and further analysis would link
    187  the router identities further.</p>
    188  <p>Note that when I2P detects an IP address change, it will automatically
    189  initiate a restart in order to rekey and to disconnect from peers before they
    190  update their profiles - any long lasting client connections will be disconnected,
    191  though such would likely already be the case anyway, since the IP address changed.
    192  </p>
    193  <br>
    194 -->
    195 *********/ %>
    196153</form></div></body></html>
Note: See TracChangeset for help on using the changeset viewer.