you will have to access it through your Java application itself. Is this still acceptable for your requirements?
you need to use two socketServer 1 on 80 port and another one socketServer 2 as a proxy port (customizable; example 3000).
Well, yes. Even in a single file it doesnt matter. What the main concern is that this pc used, is connected to internet.
And the Internet Option is using Proxy Server to be enabled... and it's bind to 127.0.0.1
Which means the proxy is himself (127.0.0.1:3000)
But remember the inputstream and outputstream need to be coupled with those socketservet running without end.
1) Initiate serverSocket
2) iterate looping without end, do accepting input
3) create the socket receiving the input request
4) read in the buffer-in from socket received, get the destination address
5) pass the address obtained (http://something.com) to url object
6) make HttpURLConnection supplied by url object created previously
7) write the buffer out from the buffer-out