code: func NewProxy(frontendAddr, backendAddr net.Addr) (Proxy, error) {
  	switch frontendAddr.(type) {
  	case *net.UDPAddr:
  		return NewUDPProxy(frontendAddr.(*net.UDPAddr), backendAddr.(*net.UDPAddr))
  	case *net.TCPAddr:
  		return NewTCPProxy(frontendAddr.(*net.TCPAddr), backendAddr.(*net.TCPAddr))
  	case *sctp.SCTPAddr:
  		return NewSCTPProxy(frontendAddr.(*sctp.SCTPAddr), backendAddr.(*sctp.SCTPAddr))
  	default:
  		panic("Unsupported protocol")
  	}
  }
docs: // NewProxy creates a Proxy according to the specified frontendAddr and backendAddr.