Quote
"proxy to spec" -> i just want to forward traffic, one ip to one ip, one port to one port. btw, specing is illegal if you look at jsp rules
Spec is short for specification which means there is a whole proxy binary protocol that you need to follow in order to forward and relay traffic packets (I don't know how this violates jsp rules?). You don't just connect and go whilly nilly sending shit. It's okay though for someone who needs something for work but doesn't take the time to learn what they are using by stealing others work I don't blame you.
For you're knowledge here is a wiki entry with all four proxy protocols (http, socks4, socks4a, socks5):
http://en.wikipedia.org/wiki/SOCKSQuote
topic can be closed, i'll rewrite the code since none of the experts here knows an easier solution
I told you how to fix it. It is one line of code, you just can't program worth shit.
Code
accept(listensocket);
closesocket(Listensocket); //close the listening socket after accepting a socket. This will allow a second application to start listening on the source port.
Quote (Minkomonster @ Feb 24 2014 12:24pm)
You don't understand the difference between a source port and a destination port. Your browser can request two different source ports and create two separate sockets that connect to a server address on port 80 for http. The server has an application that listens to port 80 and just takes the request and processes it.
This is different then what you are expecting. You for some reason expect your browser is creating a single socket and forwarding all http traffic through it?
Meh, I'd hate to be his company who is paying him to "write a proxy for work." He might as well download SQUID or some other Linux based proxy if he is just going to rip peoples work and call it his own, at least then it would be stable and not shit.
This post was edited by AbDuCt on Feb 24 2014 01:31pm