Take the 2-minute tour ×

I have an experimental TCP/IP stack running under Windows XP. This stack bypasses the Windows TCP/IP stack using a LSP and a NDIS IM. I now have a requirement to provide a proxy service for this to support other platforms that want to use the experimental stack. The proxy must be transparent to the clients (no client configuration). I want to run this proxy service in user mode where I have a TCP connection towards the client using normal Windows TCP/IP and a TCP connection the other way through the experimental stack. Once connected this way, the proxy just reads/writes between the two. The problem I am wrestling with is how to take an incoming packet from the client that is destined to some address/port and redirect it to my proxy while still maintaining the knowledge of the original destination address/port, so the proxy can forward the packets to the proper destination. I would appreciate any ideas on this. Thanks...

share|improve this question
add comment

1 Answer

send an array of destinations, reading in reverse chronological[i hope this word works in this context] order. and everytime the message gets read from a node, that node deletes the element at zero and shifts all the other elements forward. . . . this was a fairly simple question i think. . .

in detail: i worked on a similar system at my first job. the sending machine will only know the destination, it gets sent with the destination port and IP. then lets call it a "postman" server checks which servers are available ie. pseudocode: i love coding in python so i hate declaring variables [sorry] i hope you can comprehend

nodes = postman.checkAvailableNodes()\\this will return a matrix with each element containing an ipaddress and available port on whichever available node on the network
\\loop through all available destinations and map a route to the destination server for n in nodes:
nodeArray2 = n[0].checkavailablenodes()
if length(nodeArray2) > 0:
for x in nodeArray2: . . . .

anyways. . .once you get the destination node and port, you add the IPs and port numbers to an array called destinations, which will reduce by one element everytime you pass through a server and eventually you'll reach the server

share|improve this answer
add comment

Your Answer


