{"action":"created","issue":{"url":"https://api.github.com/repos/sockjs/sockjs-client/issues/414","repository_url":"https://api.github.com/repos/sockjs/sockjs-client","labels_url":"https://api.github.com/repos/sockjs/sockjs-client/issues/414/labels{/name}","comments_url":"https://api.github.com/repos/sockjs/sockjs-client/issues/414/comments","events_url":"https://api.github.com/repos/sockjs/sockjs-client/issues/414/events","html_url":"https://github.com/sockjs/sockjs-client/issues/414","id":277558572,"number":414,"title":"electron-net-module injection","user":{"login":"sgeisbacher","id":16902398,"avatar_url":"https://avatars3.githubusercontent.com/u/16902398?v=4","gravatar_id":"","url":"https://api.github.com/users/sgeisbacher","html_url":"https://github.com/sgeisbacher","followers_url":"https://api.github.com/users/sgeisbacher/followers","following_url":"https://api.github.com/users/sgeisbacher/following{/other_user}","gists_url":"https://api.github.com/users/sgeisbacher/gists{/gist_id}","starred_url":"https://api.github.com/users/sgeisbacher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgeisbacher/subscriptions","organizations_url":"https://api.github.com/users/sgeisbacher/orgs","repos_url":"https://api.github.com/users/sgeisbacher/repos","events_url":"https://api.github.com/users/sgeisbacher/events{/privacy}","received_events_url":"https://api.github.com/users/sgeisbacher/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-11-28T22:19:12Z","updated_at":"2017-12-06T16:49:48Z","closed_at":null,"author_association":"NONE","body":"as i want sockjs to use the electron-net-module (which fully supports cross-platform system-proxy etc via libchromium) in an electron-desktop-app, i want to be able to inject it into https://github.com/sockjs/sockjs-client/blob/master/lib/transport/driver/xhr.js#L31. the electron-net-module (https://electronjs.org/docs/api/net) is a drop-in-replacement of node's http-module.\r\n\r\ni have already tried to pass it through, but there are two call-paths to lib/transport/driver/xhr.js. first for the /info - handshake-request and second for the streaming-request. but that would mean to pass that electron-net-module through about 20 methods at the end.\r\n\r\nan other option would be (and i already successfully tested it) is to create a common config.js-file within sockjs which is set in main.js with the passed options to SockJS-constructor and to require it whereever it is needed (in this case in xhr.js).\r\n\r\ni would add this feature and create a pullrequest if you are interested to add it, and if you could give me some feedback to my proposals above or probably you have a much better idea to manage this 😅 .  thx"},"comment":{"url":"https://api.github.com/repos/sockjs/sockjs-client/issues/comments/349701474","html_url":"https://github.com/sockjs/sockjs-client/issues/414#issuecomment-349701474","issue_url":"https://api.github.com/repos/sockjs/sockjs-client/issues/414","id":349701474,"user":{"login":"brycekahle","id":1010430,"avatar_url":"https://avatars1.githubusercontent.com/u/1010430?v=4","gravatar_id":"","url":"https://api.github.com/users/brycekahle","html_url":"https://github.com/brycekahle","followers_url":"https://api.github.com/users/brycekahle/followers","following_url":"https://api.github.com/users/brycekahle/following{/other_user}","gists_url":"https://api.github.com/users/brycekahle/gists{/gist_id}","starred_url":"https://api.github.com/users/brycekahle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brycekahle/subscriptions","organizations_url":"https://api.github.com/users/brycekahle/orgs","repos_url":"https://api.github.com/users/brycekahle/repos","events_url":"https://api.github.com/users/brycekahle/events{/privacy}","received_events_url":"https://api.github.com/users/brycekahle/received_events","type":"User","site_admin":false},"created_at":"2017-12-06T16:49:47Z","updated_at":"2017-12-06T16:49:47Z","author_association":"CONTRIBUTOR","body":"You should be able to fork and use browserify to build a version that injects the `electron-net` module for `http` and `https` via the `browser` field of `package.json`. See https://github.com/sockjs/sockjs-client/blob/master/package.json#L7-L13\r\n\r\n"}}
{"actor":{"display_login":"brycekahle"}}