/** * Add the service * @param port > 0 * @return success, false if already registered */ public boolean register(String service, int port) { return register(service, DEFAULT_HOST, port); }
@Override public void startRunning() { super.startRunning(); if (open) _context.portMapper().register(PortMapper.SVC_HTTPS_PROXY, getTunnel().listenHost, getLocalPort()); }
@Override public void startRunning() { super.startRunning(); if (open) _context.portMapper().register(PortMapper.SVC_IRC, getTunnel().listenHost, getLocalPort()); }
/** * Actually start working on incoming connections. * Overridden to start an internal socket too. * */ @Override public void startRunning() { // following are for HTTPResponseOutputStream //_context.statManager().createRateStat("i2ptunnel.httpCompressionRatio", "ratio of compressed size to decompressed size after transfer", "I2PTunnel", new long[] { 60*60*1000 }); //_context.statManager().createRateStat("i2ptunnel.httpCompressed", "compressed size transferred", "I2PTunnel", new long[] { 60*60*1000 }); //_context.statManager().createRateStat("i2ptunnel.httpExpanded", "size transferred after expansion", "I2PTunnel", new long[] { 60*60*1000 }); super.startRunning(); if (open) { this.isr = new InternalSocketRunner(this); this.isr.start(); int port = getLocalPort(); _context.portMapper().register(PortMapper.SVC_HTTP_PROXY, getTunnel().listenHost, port); _context.portMapper().register(PortMapper.SVC_HTTPS_PROXY, getTunnel().listenHost, port); } }
public void run() { I2PAppContext.getGlobalContext().portMapper().register(PortMapper.SVC_SAM_UDP, _host, _port); try { run2(); } finally { I2PAppContext.getGlobalContext().portMapper().unregister(PortMapper.SVC_SAM_UDP); } }
/** * Actually start working on incoming connections. * Overridden to register with port mapper. * * @since 0.9.27 */ @Override public void startRunning() { super.startRunning(); if (open) { I2PSocketAddress addr = pickDestination(); if (addr != null) { String svc = null; String hostname = addr.getHostName(); if ("smtp.postman.i2p".equals(hostname)) { svc = PortMapper.SVC_SMTP; } else if ("pop.postman.i2p".equals(hostname)) { svc = PortMapper.SVC_POP; } if (svc != null) { _isr = new InternalSocketRunner(this); _isr.start(); _context.portMapper().register(svc, getTunnel().listenHost, getLocalPort()); } } } }
pm.register(svc, host, port);
if (_mgr != null) _mgr.register(this); _context.portMapper().register(PortMapper.SVC_BOB, props.getProperty(PROP_BOB_HOST), Integer.parseInt(props.getProperty(PROP_BOB_PORT)));
if (_mgr != null) _mgr.register(this); I2PAppContext.getGlobalContext().portMapper().register(_useSSL ? PortMapper.SVC_SAM_SSL : PortMapper.SVC_SAM, _listenHost != null ? _listenHost : "127.0.0.1", _listenPort);
if (_port > 0) { _context.portMapper().register(portMapperService, _socket.getInetAddress().getHostAddress(), _port);