Proxy
Opened this issue · 5 comments
misterjt commented
Is it possible to use proxy with you library?
I mean connect to instagram server through proxy server via HTTPS.
Volox commented
+1 I have the same problem. Also using the request
lib makes it simple see ttezel/twit#7
misterjt commented
@Volox https://nodejs.org/api/https.html#https_class_https_agent
And pass it as agent
option in this lib.
Volox commented
Sorry @misterjt but i cannot figure out how to use an Agent
to set a proxy. The only thing i found is node-https-proxy-agent.
misterjt commented
@Volox it's right. Set up the node-https-proxy-agent object and pass it like
function getAPI(token){
var temp_ip='127.0.0.1';
var temp_proxy=temp_ip+':7459';
var api= require('instagram-node').instagram({
sign_request:{client_secret:clientSecret,ip:temp_ip},
agent:new HttpsProxyAgent(temp_proxy)
});
api.use({access_token:token});
return api;
}
this is real code from my project.