Comments (6)
Botgram currently doesn't support proxying. But apparently it wouldn't be very difficult to add, using this module. If you want to try it, npm install https-proxy-agent
and then do the following modifications in server.js
:
-var bot = botgram(config.authToken);
+var bot = botgram(config.authToken, { agent: new (require('https-proxy-agent'))(process.env.https_proxy) });
And the following in lib/wizard.js
:
- var bot = botgram(token);
+ var bot = botgram(token, { agent: new (require('https-proxy-agent'))(process.env.https_proxy) });
from shell-bot.
you are a genius!!
It works like a charm!
Thank you so much
from shell-bot.
Glad it worked :)
I'm reopening the issue, since I'd like to incorporate this into the code someday.
from shell-bot.
socks5 proxy:
var bot = botgram(config.authToken,
{agent: new (require('socks5-https-client/lib/Agent'))(
{"socksHost": "proxy_host",
"socksUsername": "user",
"socksPassword": "password",
"socksPort": 1080})
});
from shell-bot.
I'm reopening the issue, since I'd like to incorporate this into the code someday.
from shell-bot.
It'd be ideal if the bot could inherit proxy settings from the https_proxy
environment variable.
My code snippet works for http:
and https:
proxies, but not for SOCKS proxies... I'll try to merge everything when I have time.
from shell-bot.
Related Issues (20)
- Not working after turning vpn on HOT 1
- innerError Error: Cannot find module '../build/Debug/pty.node'
- Support heroku HOT 1
- How to custom output of command /run to style code? HOT 1
- node-pty issue ig
- Help? how to run? not work ! HOT 1
- Keepalive HOT 2
- Spam command outputs
- npm running error
- [Bug]Not working since few day HOT 1
- Multiple Processes HOT 2
- Support Okteto
- Cannot use Conda Env
- [Issue] NPM won't install botgram HOT 1
- [ISSUE] The granted user is lost when the server crashes.
- [ISSUE] PM2 dies with shell-bot
- Multiple session HOT 5
- Invalid token was entered, please try again.
- Help to understand callback
- update shell bot
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shell-bot.