The Internet users are familiar with the Peer-to-Peer (P2P) application, which brings a lot of convenience as well as problems, especially the pressure on the network generated by the growing traffic and the security issues. In recent years, the classification and identification of P2P traffic is a more popular research area, there have been many mature and effective identification technologies. On the other hand, the anti-identification research for P2P systems is relatively slow. Through the research on the identification technology for the P2P traffic, we put forward a method to improve the anti-identification capabilities of P2P application by changing the packet size of transport layer. Experimental results show that the method makes the P2P application packets highly similar to other protocol traffics in size distribution and improves the protocol obfuscation and the anti-identification ability.