我需要从节点推送GCM,我使用node-gcm,但是我收到了ENOTFOUND错误
var gcm = require('node-gcm');
var gcmMessage = new gcm.Message({
collapseKey: 'notify',
delayWhileIdle: false,
timeToLive: 3600,
data: {
title: "Hai",
message: "Message",
}
});
var gcmIds = ['<myid>'];
var sender = new gcm.Sender('<mysender id>',{'proxy':'<proxyip>:8080'});
sender.send(gcmMessage, gcmIds, 4, function(err, ret){
console.log('>>> sendGcm: ', err, ret);
});
我收到错误
sendGcm: { [Error: tunneling socket could not be established, cause=getaddr
info ENOTFOUND] code: 'ECONNRESET' } null