Package com.subgraph.orchid

Examples of com.subgraph.orchid.HiddenServiceCircuit


    if(!icResult) {
      rendezvous.markForClose();
      return null;
    }
    logger.fine("Processing RV2 for "+ logServiceName());
    HiddenServiceCircuit hsc = rp.processRendezvous2(kex);
    if(hsc == null) {
      rendezvous.markForClose();
    }

    logger.fine("Rendezvous circuit opened for "+ logServiceName());
View Full Code Here


    this.circuitManager = circuitManager;
  }
 
  public Stream getStreamTo(String onion, int port) throws OpenFailedException, InterruptedException, TimeoutException {
    final HiddenService hs = getHiddenServiceForOnion(onion);
    final HiddenServiceCircuit circuit = getCircuitTo(hs);
   
    try {
      return circuit.openStream(port, HS_STREAM_TIMEOUT);
    } catch (StreamConnectFailedException e) {
      throw new OpenFailedException("Failed to open stream to hidden service "+ hs.getOnionAddressForLogging() + " reason "+ e.getReason());
    }
  }
View Full Code Here

    }
  }
 
  private synchronized HiddenServiceCircuit getCircuitTo(HiddenService hs) throws OpenFailedException {
    if(hs.getCircuit() == null) {
      final HiddenServiceCircuit c = openCircuitTo(hs);
      if(c == null) {
        throw new OpenFailedException("Failed to open circuit to "+ hs.getOnionAddressForLogging());
      }
      hs.setCircuit(c);
    }
View Full Code Here

 
  private HiddenServiceCircuit openCircuitTo(HiddenService hs) throws OpenFailedException {
    HSDescriptor descriptor = getDescriptorFor(hs);
   
    for(int i = 0; i < RENDEZVOUS_RETRY_COUNT; i++) {
      final HiddenServiceCircuit c = openRendezvousCircuit(hs, descriptor);
      if(c != null) {
        return c;
      }
    }
    throw new OpenFailedException("Failed to open circuit to "+ hs.getOnionAddressForLogging());
View Full Code Here

TOP

Related Classes of com.subgraph.orchid.HiddenServiceCircuit

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.