java - simple forward proxy for any protocol -


i wanting develop centralized java server accepts multiple connections type of network traffic ie ftp, http, https, rdp, etc. goal forward off expected destination , return response requester. have no idea start because information finding related forwarding java servlet requests , info on forwarding http. there anyway forward off, or require handling every protocol differently?

public void run () {     inetsocketaddress address = (inetsocketaddress)this.socket.getremotesocketaddress();     try {         inputstreamreader isr = new inputstreamreader(this.socket.getinputstream());         bufferedreader br = new bufferedreader(isr);         outputstream os = this.socket.getoutputstream();         string ipaddress = address.gethostname();         log.d("client","a client has connected from: "+ipaddress);          //todo forward client inputstream destination      } catch (exception e) {         e.printstacktrace();     } {         try{             this.socket.close();         } catch (exception e) {}     } } 

every protocol different, unless want to, , can, force them 1 straightjacket http's connect verb. have research proxy protocols intended clients capable of using.

more should looking @ using socks, in existing implementation.


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -