support both register protocol