add encrypt function.
add traffic log.