More information on this implementation and the rationale behind it will appear in the manual. See future commits. (Note the TODOs; return values aren't quite right here, but that will be handled in the next commit.)
This has some flaws that should be addressed, but those will be detailed in later commits; this works for now.
These require special treatment with proxying.