set buffer-size to 65535
add cookie_rewrite: exact to minimize cookie pollution
refactor to support framed and non-framed replay