Package nu.fw.jeti.plugins.filetransfer.socks5

Examples of nu.fw.jeti.plugins.filetransfer.socks5.ReceiveSocks5


      {
        return data;
      }
    });
    backend.addExtensionHandler("http://jabber.org/protocol/ibb",new IBBHandler());
    backend.addExtensionHandler("http://jabber.org/protocol/bytestreams",new Socks5Handler());
    Socks5Send.initProxies(backend);
        backend.getMain().getOnlinePanel().setTransferHandler(new FileTransferhandler());
    }
View Full Code Here


                }
            }
            if("http://jabber.org/protocol/ibb".equals(streamMethod)) {
                streamSend = new IBBSend(file,backend,this,to,id);
            } else if("http://jabber.org/protocol/bytestreams".equals(streamMethod)) {
                streamSend = new Socks5Send(file,backend,this,to,id);
            } else {
                Popups.messagePopup(I18N.gettext("filetransfer.Problem_during_file_transfer,_transfer_aborted"),I18N.gettext("filetransfer.File_Transfer"));
                this.dispose();
                return;
            }
View Full Code Here

           ss = new ServerSocket(port);
              // while(true){
                Socket s = ss.accept();
                System.out.println("Accepted from:"+s.getInetAddress().getHostName()+":"
                                    +s.getPort());
                proxyServer = new ProxyServer(new ServerAuthenticatorNone(),s,file,digest,Socks5Send.this);
              //}
            }catch(IOException ioe){
              ioe.printStackTrace();
            }
            finally
View Full Code Here

           ss = new ServerSocket(port);
              // while(true){
                Socket s = ss.accept();
                System.out.println("Accepted from:"+s.getInetAddress().getHostName()+":"
                                    +s.getPort());
                proxyServer = new ProxyServer(new ServerAuthenticatorNone(),s,file,digest,Socks5Send.this);
              //}
            }catch(IOException ioe){
              ioe.printStackTrace();
            }
            finally
View Full Code Here

          //TODO stringprep
         
          String digest =Plugin.sha(sid,backend.getMyJID(),targetJID);
                 
         
          final SocksSocket s = new SocksSocket(new Socks5Proxy(streamHost.getHost(),streamHost.getPort()),digest,0);
    //      TODO get sid?
          final StreamHost chosenStreamHost = streamHost;
          backend.send(new InfoQuery(streamHostID,"set",backend.getIdentifier(),
          new Socks5Extension(sid,targetJID)),new IQResultListener()
          {
View Full Code Here

               
       
        try{
          //Proxy p = new Socks5Proxy("192.168.10.2",5080);
          //TODO add timeout 
          s = new SocksSocket(new Socks5Proxy(streamHost.getHost(),streamHost.getPort()),digest,0);
  //        check if connection is open
          backend.send(new InfoQuery(iq.getFrom(),"result",iq.getID(),
                new Socks5Extension(streamHost.getJID(),null)));
          break;
        }
View Full Code Here

          //TODO stringprep
         
          String digest =Plugin.sha(sid,backend.getMyJID(),targetJID);
                 
         
          final SocksSocket s = new SocksSocket(new Socks5Proxy(streamHost.getHost(),streamHost.getPort()),digest,0);
    //      TODO get sid?
          final StreamHost chosenStreamHost = streamHost;
          backend.send(new InfoQuery(streamHostID,"set",backend.getIdentifier(),
          new Socks5Extension(sid,targetJID)),new IQResultListener()
          {
View Full Code Here

   
//      TODO stringprep
    String digest =Plugin.sha(s5.getSid(),iq.getFrom(),backend.getMyJID());
   
 
    SocksSocket s=null
    if(s5.hasStreamHosts())
    {
      for(Iterator i=s5.getStreamHosts();i.hasNext();)
      {
     
        StreamHost streamHost = (StreamHost)i.next();
               
       
        try{
          //Proxy p = new Socks5Proxy("192.168.10.2",5080);
          //TODO add timeout 
          s = new SocksSocket(new Socks5Proxy(streamHost.getHost(),streamHost.getPort()),digest,0);
  //        check if connection is open
          backend.send(new InfoQuery(iq.getFrom(),"result",iq.getID(),
                new Socks5Extension(streamHost.getJID(),null)));
          break;
        }
        catch (IOException e2)
        {
          //e2.printStackTrace();
          System.out.println(e2.getMessage());
          continue;
        }
      }
    }
   
    if(s==null)
    {
      sendError();
      Popups.messagePopup(I18N.gettext("filetransfer.Problem_during_file_transfer,_transfer_aborted"),I18N.gettext("filetransfer.File_Transfer"));
      getFileWindow.stopDownloading();
      return;
    }
   
    InputStream in=null;
    OutputStream out=getFileWindow.getOutputStream();
    in = s.getInputStream()
 
      if(in!=null)
      { 
        if(out!=null)
        { 
View Full Code Here

TOP

Related Classes of nu.fw.jeti.plugins.filetransfer.socks5.ReceiveSocks5

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.