Generalized type of runProxy and runProxyK