开发者

OSX - socket connect redirection

In my application, I want to redirect certain applications connections.

In windows 7, you can modify the host and port used in a TCP/UDP connect call: htt开发者_如何学JAVAp://msdn.microsoft.com/en-us/library/ff571005(v=vs.85).aspx

I was going to look at the tsocks source, however the author says it's not working with asynchronous sockets. It's a rather old project, and was wondering if there's any modern API.

Is there any reliable solution for doing this in OSX lion?

Thanks


Mac OS X, being a BSD-derived system, has ipfw, which is like Linux iptables. It lets you do this kind of thing at the OS level. The command-line tool is already installed on your mac (try man ipfw); Google will help you find graphical front ends for it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜