Add stream type checking in proxy