Maybe I'm wrong, but there doesn't seem to be any encryption between peers. If this is the case, then it's trivial to determine the public key associated with a given node. A passive observer can look at all incoming and outgoing traffic from a node and de-anonymize rather easily. Simply wait for the node to send out a pubkey object which was not sent in. Similarly, you can look for new getpubkey objects to determine who that node is talking to. Adding simple encryption between peers with Diffie-Hellman key exchange and AES or something similar would solve this problem.