@Override public boolean activateRequest( InetSocketAddress remote_address ) { ensureActive( "Incoming[" + AddressUtils.getHostAddress( remote_address ) + "]", ACT_INCOMING ); return( true ); }
public static String categoriseAddress( InetSocketAddress isa ) { return( categoriseAddress( AddressUtils.getHostAddress( isa ))); }
String getString() { String str = ""; if ( kids.size() > 0 ){ for ( ActivityNode k: kids ){ ANImpl a = (ANImpl)k; str += (str.length()==0?"":",") + a.getString(); } str = "[" + str + "]"; } return( AddressUtils.getHostAddress( contact.getAddress()) + " - " + str ); } }
private void injectPeers( Download download ) { PeerManager pm = download.getPeerManager(); if ( pm != null ){ for ( InetSocketAddress address: peers_to_inject ){ pm.addPeer( AddressUtils.getHostAddress( address ), address.getPort()); } } }
public boolean performExternalAuthorisation( InetSocketAddress remote_ip, String headers, URL resource, String user, String password ) { if ( headers.toLowerCase( Locale.US ).contains( "x-real-ip")){ // someone messing about return( false ); } headers = headers.trim() + "\r\nX-Real-IP: " + AddressUtils.getHostAddress( remote_ip ) + "\r\n\r\n"; for (int i=0;i<auth_listeners.size();i++){ try{ if ( ((TRTrackerServerAuthenticationListener)auth_listeners.get(i)).authenticate( headers, resource, user, password )){ return( true ); } }catch( Throwable e ){ Debug.printStackTrace( e ); } } return( false ); }
String real_ip_address = AddressUtils.getHostAddress( remote_address ); String client_ip_address = real_ip_address;
String ip = AddressUtils.getHostAddress( notional_address );
String ip = AddressUtils.getHostAddress( notional_address );
active_udp += (active_udp.length()==0?"":",") + AddressUtils.getHostAddress( ad ) + ":" + ad.getPort();
String host = AddressUtils.getHostAddress( address );
public PEPeerTransportProtocol( PEPeerControl _manager, String _peer_source, NetworkConnection _connection, Map _initial_user_data ) { manager = _manager; peer_source = _peer_source; connection = _connection; data = _initial_user_data; incoming = true; is_metadata_download = manager.isMetadataDownload(); diskManager =manager.getDiskManager(); piecePicker =manager.getPiecePicker(); nbPieces =diskManager.getNbPieces(); InetSocketAddress notional_address = _connection.getEndpoint().getNotionalAddress(); ip = AddressUtils.getHostAddress( notional_address ); network = AENetworkClassifier.categoriseAddress( ip ); port = notional_address.getPort(); peer_item_identity = PeerItemFactory.createPeerItem( ip, port, PeerItem.convertSourceID( _peer_source ), PeerItemFactory.HANDSHAKE_TYPE_PLAIN, 0, PeerItemFactory.CRYPTO_LEVEL_1, 0 ); //this will be recreated upon az handshake decode plugin_connection = new ConnectionImpl(connection, incoming); peer_stats = manager.createPeerStats( this ); changePeerState( PEPeer.CONNECTING ); }
Logger.log(new LogEvent(LOGID, "Incoming connection ["+ isa + "] is not encrypted but has been accepted as fallback is enabled" )); }else if( AddressUtils.isLANLocalAddress( AddressUtils.getHostAddress( isa )) == AddressUtils.LAN_LOCAL_YES ) { if (Logger.isEnabled()){ Logger.log(new LogEvent(LOGID, "Incoming connection ["+ isa + "] is not encrypted but has been accepted as lan-local" ));
AddressUtils.getHostAddress( contact.getAddress()), "DHT: Sender stored excessive entries at this node (" + reason + ")", false );
String host_address = AddressUtils.getHostAddress( is_address );