Package com.trilead.ssh2

Examples of com.trilead.ssh2.HTTPProxyData


      Connection conn = new Connection(hostname);

      /* We want to connect through a HTTP proxy */
     
      conn.setProxyData(new HTTPProxyData(proxyHost, proxyPort));
     
      // if the proxy requires basic authentication:
      // conn.setProxyData(new HTTPProxyData(proxyHost, proxyPort, "username", "secret"));
     
      /* Now connect (through the proxy) */
 
View Full Code Here


    try {
      isConnected = false;
      this.setSshConnection(new Connection(objCO.getHost().Value(), objCO.getPort().value()));

      if (objCO.getProxy_host().IsNotEmpty()) {
        HTTPProxyData objProxy = null;
        if (objCO.getProxy_user().IsEmpty()) {
          objProxy = new HTTPProxyData(objCO.getProxy_host().Value(), objCO.getProxy_port().value());
        }
        else {
          objProxy = new HTTPProxyData(objCO.getProxy_host().Value(), objCO.getProxy_port().value(), objCO.getProxy_user().Value(),
              objCO.getProxy_password().Value());
        }
        this.getSshConnection().setProxyData(objProxy);
      }
      this.getSshConnection().connect();
View Full Code Here

      return;
    }

    if (proxyData instanceof HTTPProxyData)
    {
      HTTPProxyData pd = (HTTPProxyData) proxyData;

      /* At the moment, we only support HTTP proxies */

      InetAddress addr = createInetAddress(pd.proxyHost);
      sock.connect(new InetSocketAddress(addr, pd.proxyPort), connectTimeout);
View Full Code Here

      return;
    }

    if (proxyData instanceof HTTPProxyData)
    {
      HTTPProxyData pd = (HTTPProxyData) proxyData;

      /* At the moment, we only support HTTP proxies */

      InetAddress addr = createInetAddress(pd.proxyHost);
      sock.connect(new InetSocketAddress(addr, pd.proxyPort), connectTimeout);
View Full Code Here

      return s;
    }

    if (proxyData instanceof HTTPProxyData)
    {
      HTTPProxyData pd = (HTTPProxyData) proxyData;

      /* At the moment, we only support HTTP proxies */

      InetAddress addr = createInetAddress(pd.proxyHost);
      Socket s = new Socket();
View Full Code Here

   */
  protected Connection getBaseAuthentication() throws Exception {

    try { // to connect and authenticate
      boolean isAuthenticated = false;
      this.setSshConnection(new Connection(this.host, this.port));

      if (proxyHost != null && this.proxyHost.length() > 0) {
        if (this.proxyUser != null && this.proxyUser.length() > 0) {
          this.getSshConnection().setProxyData(new HTTPProxyData(this.proxyHost, this.proxyPort));
        }
View Full Code Here

    @SuppressWarnings("unused")
    final String conMethodName = conClassName + "::Connect";

    try {
      isConnected = false;
      this.setSshConnection(new Connection(pstrHostName, pintPortNumber));

    }
    catch (Exception e) {
      if (this.getSshConnection() != null)
        try {
View Full Code Here

    try {
      isConnected = false;
      String strHostName = objCO.getHost().Value();
      int intPortNo = objCO.getPort().value();
      this.setSshConnection(new Connection(strHostName, intPortNo));

      if (objCO.getProxy_host().IsNotEmpty()) {
        HTTPProxyData objProxy = null;
        if (objCO.getProxy_user().IsEmpty()) {
          objProxy = new HTTPProxyData(objCO.getProxy_host().Value(), objCO.getProxy_port().value());
View Full Code Here

     */
    public Connection getBaseAuthentication() throws Exception {
       
        try { // to connect and authenticate
            boolean isAuthenticated = false;
            this.setSshConnection(new Connection(this.getHost(), this.getPort()));
               
            if (this.getProxyHost() != null && this.getProxyHost().length() > 0) {
                if (this.getProxyUser() != null && this.getProxyUser().length() > 0) {
                    this.getSshConnection().setProxyData(new HTTPProxyData(this.getProxyHost(), this.getProxyPort()));
                } else {
View Full Code Here

    }
   
    public void connect() throws Exception{
      try { // to connect and authenticate
            boolean isAuthenticated = false;
            sshConnection = new Connection(this.getHost(), this.getPort());
               
            if (this.getProxyHost() != null && this.getProxyHost().length() > 0) {
                if (this.getProxyUser() != null && this.getProxyUser().length() > 0) {                   
                    sshConnection.setProxyData(new HTTPProxyData(this.getProxyHost(), this.getProxyPort(), this.getProxyUser(), this.getProxyPassword()));
                } else {
View Full Code Here

TOP

Related Classes of com.trilead.ssh2.HTTPProxyData

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.