proxy: rpc command interface, and related stats fixes