如何使用加密密码或其他方式(客户端)连接到套接字。 [英] How to connect to socket using encrypted password or another way (Client).
问题描述
我的客户端使用以下方式连接到具有IP的服务器:
My client connects to a server with IP, using this way:
public static Socket _clientSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
_clientSocket.Connect(IPAddress.Parse(" 123.123。 123.123","11525)
_clientSocket.Connect(IPAddress.Parse("123.123.123.123"), 11525)
也可以发送加密密码。有没有办法让客户端看不到加密的密码?
推荐答案
源代码无关紧要。我所要做的就是嗅探你的网络并看到同样的事情。所以,你不能阻止别人看到你的加密密码。关于源代码无关紧要。如果你想要真正加密的通信
那么你需要切换到HTTPS或其他东西,但这对TCP服务器不起作用。
It doesn't matter about the source code. All I have to do is sniff your network and see the same thing. So no you cannot prevent someone from seeing your encrypted password. Doesn't matter about the source code. If you want truly encrypted communication then you'd need to switch to HTTPS or something but that isn't going to work for a TCP server.
如果你想限制连接到您的服务器然后为什么不进行IP过滤或什么?这很简单。当然它可能是欺骗性的,但在一个网络上它应该不是问题。
If you want to limit connections to your server then why not just do IP filtering or something? It is pretty straightforward. Of course it can be spoofed but on a single network it shouldn't be an issue.
这篇关于如何使用加密密码或其他方式(客户端)连接到套接字。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!