New internal proxy handler

Closes #852