protocol autodetection