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

Support for http_proxy #36

Closed
afresh1 opened this issue Mar 9, 2018 · 9 comments · Fixed by #37
Closed

Support for http_proxy #36

afresh1 opened this issue Mar 9, 2018 · 9 comments · Fixed by #37

Comments

@afresh1
Copy link

afresh1 commented Mar 9, 2018

We attempted to use this module, specifically via Bot::Backbone::Service::SlackChat, but our network requires http traffic to Slack to go through our proxy server. As we have been unable to find the time to create a patch for this internally we are hoping someone else will be able to.

AnyEvent::HTTP does have some proxy support which may be a useful reference.

LPW::UserAgent has a lot more code to detect the proxy, which is then used by LWP::Protocol::http.

@plicease
Copy link
Member

plicease commented Mar 9, 2018

I welcome a patch for this. atm I don't have time to do it myself.

@debug-ito
Copy link
Contributor

I'm interested in this issue, because our company also has a proxy in front of the public Internet.

It looks like Mojo has better support for proxies (as usual)

I think AnyEvent in general could use a better tool for proxies. I'm gonna think about it..

@debug-ito
Copy link
Contributor

I just released AnyEvent::Connector.

So, by adding tcp_connect to AE::WS::Client similar to AnyEvent::HTTP, we can use AnyEvent::Connector to handle proxy connection, and AE::WS::Client to handle WebSocket session. Or we can add a more straightforward option to AE::WS::Client for proxy config.

@plicease what do you think about it? If you are busy, I'll make a pull-request.

@plicease
Copy link
Member

I would be thrilled to review a PR👍🏻😀

@debug-ito
Copy link
Contributor

OK, I'll give it a try :)

@plicease
Copy link
Member

plicease commented Apr 4, 2018

@afresh1 I am uploading 0.45_01 with @debug-ito's changes, can you see if that does what you need?

I do not atm have a proxy configured handy to test this, but expect to find some time in the next couple of days before any production release.

@plicease
Copy link
Member

plicease commented Apr 4, 2018

I want to leave this open for now.

@plicease plicease reopened this Apr 4, 2018
@plicease
Copy link
Member

plicease commented Apr 7, 2018

After a few days of cpantesters results, it looks good to me, so I am doing a production release as 0.46. Please let me know if you have any troubles.

@plicease plicease closed this as completed Apr 7, 2018
@afresh1
Copy link
Author

afresh1 commented Apr 10, 2018

I haven't had time to check github this week, but I'll have the folks try this out this week. Thank you so much @debug-ito !

I actually saw this first on mastodon :-)

UPDATE: Took a while, but I did finally get it tested and it seems to be working! Thanks again!
(although Bot::Backbone::Service::SlackChat and AnyEvent::SlackRTM both apparently need to pass through the env_proxy setting for this to work)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants