Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Proxy support #7

hgavert opened this Issue · 5 comments

5 participants



Twit is very cool indeed. However, I seem to have a problem in dev environment and I should use http(s) proxies. This doesn't connect and I think it's because the system proxies are not recognized by node.js. Any chance to add support for proxies (maybe optional params through conf)?


can you show me some code so I can get a better idea of what you're trying to do?



I'm really just running your example stream code. This works when I'm at home (no proxies), but when I'm at the office I'm forced to use http/https proxies. So, the stream just seems to sit there, no tweets (I'm not actually tracking "mango") coming out. No errors either. Any ideas where to look? Obviously I'm not 100% sure it's the lack of proxies, but I'm guessing so.

var Twit = require('twit');
var T = new Twit({
consumer_key: 'my_key'
, consumer_secret: 'my_secret'
, access_token: 'my_token'
, access_token_secret: 'my_token_secret'
// filter the twitter public stream by the word 'mango'.
var stream ='statuses/filter', { track: 'mango' })
stream.on('tweet', function (tweet) {
console.log(JSON.stringify(tweet)); //.text


This is not yet ported to the oauth module, due to missing unit-tests and other stuff:

I guess, when that is resolved one way or the other, it will make to twit then. :-)


This still does not work a simple example like that behind a proxy returns

Error: connect ECONNREFUSED
at errnoException (net.js:904:11)
at Object.afterConnect as oncomplete

twit does not work behind a proxy?


Is there any solution to this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.