The invention provides a method and device for detecting a
protocol agent. The method is characterized by comprising the following steps of: when a TCP (
Transmission Control Protocol) connection is established, receiving a message for responding to
handshake information; according to the message for responding to the
handshake information, judging that the TCP connection is initiated by a detection terminal or a
client terminal; if the message for responding to the
handshake information is initiated by the
client terminal, receiving request information sent by the
client terminal; judging whether the request information is agent request information; if the request information is the agent request information, storing the information of a destination
server requested to be accessed by the client terminal; judging whether a connection is established between the detection terminal and the stored destination
server requesting for accessing; and, if the connection is established between the detection terminal and the stored destination
server requesting for accessing, detecting that the
protocol agent is used. According to the invention, the problems of low efficiency whether the agentprotocol detection is adopted and failure and false alarms can be resolved, and therefore, the effects of high efficiency whether the
protocol agent is adopted and accurate detection result can be achieved.