开发者

Is it possible to open a 'local machine only' socket on Windows?

I'm wondering whether or not it's possible to configure a TCP socket such that it cannot accept connections from 'off-machine'.

I want to spin up an HTTP server that should only be accessible from clients running on the same machine, and although I can always filter out 'unauthorized' requests from off-machine, I would prefer it if this local-only behaviour were baked-in.

Also, opening a socket on windows triggers a firew开发者_运维知识库all warning and request for the user to block/unblock the port being opened. I'm hoping that a means exists to avoid this message, if the socket can be configured to only accept local connections.


Bind to loopback interface, ip 127.0.0.1.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜