Can I create a new proxy?

How can I create a simple proxy server in Java?

  • can it be created without socket programming

  • Answer:

    You probably will need socket programming.  Don't worry though... socket programming is really easy in Java. What you need to do is create a server that binds to a particular port and listens for connections.  When it gets a connection, it should read requests.  When it gets a request, it should parse it to determine which server/port the request is for.  It should then connect to that server, forward the request, wait for a response, and send the response back to the client.

John Kurlak at Quora Visit the source

Was this solution helpful to you?

Other answers

http://examples.oreilly.com/jenut/ProxyServer.javahere's a real simple script from o'reilly for your java proxy server.

Emma Wilson

You could use some existing code for reference. Here's on project: http://www.littleshoot.org/littleproxy/ It uses instead of traditional Java sockets.

Miguel Paraz

Josephus Villarey

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.