forked from I2P_Developers/i2p.i2p
Remove outproxy hook in context, use ClientAppManager:
- Add clientAppManager() to I2PAppContext so it can be used there - Add routerAppManager() to RouterContext for convenience inside router Start of SSL support in I2PTunnelHTTPClient - Add initialSocketData support back to I2PTunnelOutproxyRunner - Works for orchid (and in-net?) - TODO Doesn't work for in-net proxy - Need separate config for SSL proxy
This commit is contained in:
@@ -8,6 +8,7 @@ import java.util.concurrent.CopyOnWriteArraySet;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
|
||||
import net.i2p.I2PAppContext;
|
||||
import net.i2p.app.ClientAppManager;
|
||||
import net.i2p.data.Hash;
|
||||
import net.i2p.data.RouterInfo;
|
||||
import net.i2p.internal.InternalClientManager;
|
||||
@@ -586,7 +587,18 @@ public class RouterContext extends I2PAppContext {
|
||||
* @return the manager
|
||||
* @since 0.9.4
|
||||
*/
|
||||
public RouterAppManager clientAppManager() {
|
||||
@Override
|
||||
public ClientAppManager clientAppManager() {
|
||||
return _appManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* The RouterAppManager.
|
||||
* For convenience, same as clientAppManager(), no cast required
|
||||
* @return the manager
|
||||
* @since 0.9.11
|
||||
*/
|
||||
public RouterAppManager routerAppManager() {
|
||||
return _appManager;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -267,13 +267,13 @@ public class LoadClientAppsJob extends JobImpl {
|
||||
Class<?> cls = Class.forName(_className, true, _cl);
|
||||
if (isRouterApp(cls)) {
|
||||
Constructor<?> con = cls.getConstructor(RouterContext.class, ClientAppManager.class, String[].class);
|
||||
RouterAppManager mgr = _ctx.clientAppManager();
|
||||
RouterAppManager mgr = _ctx.routerAppManager();
|
||||
Object[] conArgs = new Object[] {_ctx, _ctx.clientAppManager(), _args};
|
||||
RouterApp app = (RouterApp) con.newInstance(conArgs);
|
||||
mgr.addAndStart(app, _args);
|
||||
} else if (isClientApp(cls)) {
|
||||
Constructor<?> con = cls.getConstructor(I2PAppContext.class, ClientAppManager.class, String[].class);
|
||||
RouterAppManager mgr = _ctx.clientAppManager();
|
||||
RouterAppManager mgr = _ctx.routerAppManager();
|
||||
Object[] conArgs = new Object[] {_ctx, _ctx.clientAppManager(), _args};
|
||||
ClientApp app = (ClientApp) con.newInstance(conArgs);
|
||||
mgr.addAndStart(app, _args);
|
||||
|
||||
Reference in New Issue
Block a user