How to use Network Extension Relay?

I want to use Network Extension Relay to implement a system-wide proxy. First, I will setup a local http2 proxy and forward to a local http proxy. The problem is

  1. How to implement this http2relayurl link to? Is it a regular http2 proxy protocol?
  2. What should I pass to raw public keys? Is it a bytes like rsa public key, or is .pem, .pub like plain text string? And I will use self signed certificate, will it be a problem?