Package codec as duplex to match future tls version [ci skip]