Add functions for tcp proxy