Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for Proxy Support for Incoming Webhooks (feature request) #636

Closed
4 of 9 tasks
romanbalayan opened this issue Sep 18, 2018 · 1 comment
Closed
4 of 9 tasks
Labels
enhancement M-T: A feature request for new functionality good first issue

Comments

@romanbalayan
Copy link
Contributor

Description

It seems that the current version latest version (v4.6.0) does not support using of proxy for Incoming Webhooks, unlike Web API Client and RTM API Client. It seems to me that it should be possible to have the same implementation as with Web API and RTM API client, wherein a custom agent as a parameter of the constructor function as such:

using tunnel

const tunnel = require('tunnel');
const { IncomingWebhook } = require('@slack/client');

const webhookUrl = process.env.webhook_url;
const proxyUrl = process.env.http_proxy;
const proxyPort = process.env.http_proxy_port;

const agent = tunnel.httpsOverHttp({
    proxy: {
        host: proxyUrl,
        port: proxyPort,
    },
});

//Pass agent as argument on constructor
const incomingWebhook = new IncomingWebhook(webhookUrl, { agent: agent });

or using https-proxy-agent

const HttpsProxyAgent = require('https-proxy-agent');
const { IncomingWebhook } = require('@slack/client');

const webhookUrl = process.env.webhook_url;
const proxyUrl = process.env.http_proxy;

//Pass agent as argument on constructor
const incomingWebhook = new IncomingWebhook(webhookUrl, { agent: new HttpsProxyAgent(proxyUrl) });

What type of issue is this? (place an x in one of the [ ])

  • bug
  • enhancement (feature request)
  • question
  • documentation related
  • testing related
  • discussion

Requirements (place an x in each of the [ ])

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.
@aoberoi
Copy link
Contributor

aoberoi commented Sep 18, 2018

This would totally be a great addition. At the moment, the core maintainers don’t see enhancements to IncomingWebhook as a priority, but PRs for this functionality would be happily accepted.

@aoberoi aoberoi added good first issue enhancement M-T: A feature request for new functionality labels Sep 18, 2018
@romanbalayan romanbalayan mentioned this issue Sep 21, 2018
2 tasks
@aoberoi aoberoi closed this as completed Oct 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement M-T: A feature request for new functionality good first issue
Projects
None yet
Development

No branches or pull requests

2 participants