void Tamir.SharpSsh.jsch.Proxy.connect(jsch::SocketFactory socket_factory, Tamir.SharpSsh.java.String host, int port, int timeout) { ch_e.setCommand(string.Format("nc {0} {1}", host, port)); istr = ch_e.getInputStream(); // 向こう→こっち ostr = ch_e.getOutputStream(); // こっち→向こう ch_e.connect(); }
void Tamir.SharpSsh.jsch.Proxy.connect(jsch::SocketFactory socket_factory, Tamir.SharpSsh.java.String host, int port, int timeout) { System.Console.WriteLine("MyProx.connect(factory,host={0},port={1},timeout={2})", host, port, timeout); ch_e.setCommand(string.Format("nc {0} {1}", host, port)); //istr=new StreamTee("istr",ch_e.getInputStream()); // 向こう→こっち //ostr=new StreamTee("ostr",ch_e.getOutputStream()); // こっち→向こう istr = ch_e.getInputStream(); // 向こう→こっち ostr = ch_e.getOutputStream(); // こっち→向こう ch_e.connect(); }