Intercepting and modifying WebSockets