English 中文(简体)
Transparent Proxy for Windows XP
原标题:

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...

问题回答

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





相关问题
Why running a service as Local System is bad on windows?

I am trying to find out the difference between difference service account types. I tumbled upon this question. The answer was because it has powerful access to local resources, and Network Service ...

Programmatically detect Windows cluster configuration?

Does anyone know how to programatically detect that a Windows server is part of a cluster? Further, is it possible to detect that the server is the active or passive node? [Edit] And detect it from ...

get file icon for Outlook appointment (.msg)

I ve read Get File Icon used by Shell and the other similar posts - and already use SHFileInfo to get the associated icon for any given extension, and that works great. However, Outlook uses ".msg" ...

Identifying idle state on a windows machine

I know about the GetLastInputInfo method but that would only give me the duration since last user input - keyboard or mouse. If a user input was last received 10 minutes ago, that wouldn t mean the ...

Terminating a thread gracefully not using TerminateThread()

My application creates a thread and that runs in the background all the time. I can only terminate the thread manually, not from within the thread callback function. At the moment I am using ...

热门标签