Changeset 24fd4881 for apps


Ignore:
Timestamp:
Jan 28, 2019 1:31:54 PM (16 months ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
0a8ab441
Parents:
47beb82
Message:

I2PControl:
Disable webapp by default
Add link in Services section of sidebar
Add definition in PortMapper?
Add stub controller for socket implementation, WIP
Javadocs

Location:
apps
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • apps/i2pcontrol/build.xml

    r47beb82 r24fd4881  
    5252    <target name="war" depends="compile" >
    5353        <war destfile="build/jsonrpc.war" webxml="web.xml" >
    54             <classes dir="./build/obj" excludes="net/i2p/i2pcontrol/I2PControlController.class net/i2p/i2pcontrol/HostCheckHandler.class" />
     54            <classes dir="./build/obj" excludes="net/i2p/i2pcontrol/I2PControlController.class net/i2p/i2pcontrol/HostCheckHandler.class net/i2p/i2pcontrol/SocketController*.class" />
    5555            <manifest>
    5656                <attribute name="Implementation-Version" value="${full.version}" />
  • apps/i2pcontrol/java/net/i2p/i2pcontrol/HostCheckHandler.java

    r47beb82 r24fd4881  
    2424 * all the webapps (not just routerconsole).
    2525 * Therefore, this protects all the webapps.
     26 *
     27 * This class is NOT used for the webapp or the bare ServerSocket implementation.
    2628 *
    2729 * @since 0.12 copied from routerconsole
  • apps/i2pcontrol/java/net/i2p/i2pcontrol/I2PControlController.java

    r47beb82 r24fd4881  
    5959 *
    6060 * Usage: I2PControlController -d $PLUGIN [start|stop]
     61 *
     62 * This class is NOT used for the webapp or the bare ServerSocket implementation.
    6163 *
    6264 * @author hottuna
     
    7981    static final String PROP_ALLOWED_HOSTS = "i2pcontrol.allowedhosts";
    8082    private static final String SVC_HTTPS_I2PCONTROL = "https_i2pcontrol";
     83    private static final int DEFAULT_PORT = 7650;
    8184
    8285    /**
     
    208211        _context.portMapper().register(SVC_HTTPS_I2PCONTROL,
    209212                                       _conf.getConf("i2pcontrol.listen.address", "127.0.0.1"),
    210                                        _conf.getConf("i2pcontrol.listen.port", 7650));
     213                                       _conf.getConf("i2pcontrol.listen.port", DEFAULT_PORT));
    211214    }
    212215
     
    219222    private Connector buildDefaultListener(Server server) {
    220223        Connector ssl = buildSslListener(server, _conf.getConf("i2pcontrol.listen.address", "127.0.0.1"),
    221                                  _conf.getConf("i2pcontrol.listen.port", 7650));
     224                                 _conf.getConf("i2pcontrol.listen.port", DEFAULT_PORT));
    222225        return ssl;
    223226    }
  • apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.java

    r47beb82 r24fd4881  
    803803                            rewrite = true;
    804804                        }
     805                    } else if (appName.equals("jsonrpc") && enabled == null) {
     806                        // jsonrpc (i2pcontrol) webapp default is false
     807                        props.setProperty(PREFIX + "jsonrpc" + ENABLED, "false");
     808                        rewrite = true;
    805809                    } else if (! "false".equals(enabled)) {
    806810                        try {
  • apps/routerconsole/java/src/net/i2p/router/web/helpers/SummaryBarRenderer.java

    r47beb82 r24fd4881  
    226226           .append("\">")
    227227           .append(nbsp(_t("Email")))
     228           .append("</a>\n");
     229        }
     230
     231        if (pm.isRegistered(PortMapper.SVC_JSONRPC)) {
     232           buf.append("<a href=\"/jsonrpc/\" target=\"_top\" title=\"")
     233           .append(_t("RPC Service"))
     234           .append("\">")
     235           .append(nbsp(_t("I2PControl")))
    228236           .append("</a>\n");
    229237        }
Note: See TracChangeset for help on using the changeset viewer.