Allow per-repo protocols

Also add an integration test for custom endpoints/protocols.