subscribe via proxy in javascript