Changeset 5ecae1a


Ignore:
Timestamp:
Oct 25, 2017 9:32:07 AM (3 years ago)
Author:
str4d <str4d@…>
Branches:
master
Children:
b54a5c5
Parents:
0e5b46e7
Message:

I2PTunnel: Add hostname / destination (b32) info to server section on index page

For parity with client tunnels section

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/EditBean.java

    r0e5b46e7 r5ecae1a  
    6262        int port = _helper.getTargetPort(tunnel);
    6363        return port > 0 ? "" + port : "";
    64     }
    65 
    66     public String getSpoofedHost(int tunnel) {
    67         return DataHelper.escapeHTML(_helper.getSpoofedHost(tunnel));
    6864    }
    6965
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/web/IndexBean.java

    r0e5b46e7 r5ecae1a  
    543543    }
    544544
     545    /**
     546     * @since 0.9.32 moved from EditBean
     547     */
     548    public String getSpoofedHost(int tunnel) {
     549        return DataHelper.escapeHTML(_helper.getSpoofedHost(tunnel));
     550    }
     551
    545552    ///
    546553    /// bean props for form submission
  • apps/i2ptunnel/jsp/index.jsp

    r0e5b46e7 r5ecae1a  
    2323<head>
    2424    <title><%=intl._t("Hidden Services Manager")%></title>
    25    
     25
    2626    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    2727    <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
    2828    <link href="/themes/console/images/favicon.ico" type="image/x-icon" rel="shortcut icon" />
    29    
     29
    3030    <% if (indexBean.allowCSS()) {
    3131  %><link rel="icon" href="<%=indexBean.getTheme()%>images/favicon.ico" />
     
    8080
    8181<div class="panel" id="servers">
    82    
     82
    8383    <h2><%=intl._t("I2P Hidden Services")%></h2>
    8484
     
    9696        for (int curServer = 0; curServer < indexBean.getTunnelCount(); curServer++) {
    9797            if (indexBean.isClient(curServer)) continue;
    98            
    9998      %>
    10099
     
    167166        </td>
    168167    </tr>
     168
     169    <tr>
     170        <td class="tunnelDestination" colspan="6">
     171            <span class="tunnelDestinationLabel">
     172         <%
     173                String name = indexBean.getSpoofedHost(curServer);
     174                    if (name == null || name.equals("")) {
     175                        name = indexBean.getTunnelName(curServer);
     176                        out.write("<b>");
     177                        out.write(intl._t("Destination"));
     178                        out.write(":</b></span> ");
     179                        out.write(indexBean.getDestHashBase32(curServer));
     180                   } else {
     181                       out.write("<b>");
     182                       out.write(intl._t("Hostname"));
     183                       out.write(":</b></span> ");
     184                       out.write(name);
     185                   }
     186          %>
     187        </td>
     188    </tr>
     189
    169190    <tr>
    170191        <td class="tunnelDescription" colspan="6">
     
    212233        for (int curClient = 0; curClient < indexBean.getTunnelCount(); curClient++) {
    213234            if (!indexBean.isClient(curClient)) continue;
    214       %>       
     235      %>
    215236
    216237
  • history.txt

    r0e5b46e7 r5ecae1a  
    2323   - Homepage: Add 'Customize Sidebar' link to signpost the feature now that
    2424     there are more optional sections available (ticket #1996)
     25 * I2PTunnel: Add hostname / destination (b32) information to server section on
     26   index page (for parity with client tunnels section)
    2527
    26282017-10-11 zzz
Note: See TracChangeset for help on using the changeset viewer.