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

does not receive messages behind corporate proxy #18

Open
kel50 opened this issue May 7, 2019 · 3 comments
Open

does not receive messages behind corporate proxy #18

kel50 opened this issue May 7, 2019 · 3 comments

Comments

@kel50
Copy link

kel50 commented May 7, 2019

Unfortunately the backend does not work behind a corporate proxy. The last log message is Tested current Errbot version and it is 5.2.0.
Incoming messages are not recognized and logged.

[...]
2019-05-07 16:41:58,535 DEBUG    errbot.backends.CiscoWebexTeams Done! I'm connected as {botname}@webex.bot
[...]
2019-05-07 16:41:58,767 DEBUG    root                      Opening websocket connection to wss://mercury-connection-a.wbx2.com/v1/apps/wx2/registrations/{id}/messages
2019-05-07 16:41:58,973 DEBUG    urllib3.connectionpool    http://{myproxyname}:8080 "GET http://version.errbot.io/?errbot=6.0.0&python=3.7.2 HTTP/1.1" 200 5
2019-05-07 16:41:58,974 DEBUG    errbot.plugins.VersionChecker Tested current Errbot version and it is 5.2.0

When I run it without proxy, the websocket connects just fine and the bot receives messages and works as expected.

2019-05-07 16:49:40,362 DEBUG    root                      Opening websocket connection to wss://mercury-connection-a.wbx2.com/v1/apps/wx2/registrations/{id}/messages
2019-05-07 16:49:40,505 DEBUG    websockets.protocol       client - state = CONNECTING
2019-05-07 16:49:40,529 DEBUG    urllib3.connectionpool    http://version.errbot.io:80 "GET /?errbot=6.0.0&python=3.7.2 HTTP/1.1" 200 5
2019-05-07 16:49:40,530 DEBUG    errbot.plugins.VersionChecker Tested current Errbot version and it is 5.2.0
2019-05-07 16:49:40,765 DEBUG    websockets.protocol       client - event = connection_made(<asyncio.sslproto._SSLProtocolTransport object at 0x10bfd26a0>)
2019-05-07 16:49:40,893 DEBUG    websockets.protocol       client - state = OPEN
2019-05-07 16:49:40,894 INFO     root                      WebSocket Opened

Is there a way to pass a proxies parameter to the backend like the Slack backend does?
I'd like to run errbot at my company and this is the only thing that keeps me from doing it.

I tested some basic stuff using the webexteamssdk module and it works just fine behind a proxy, so I think the issue is about websockets.

@marksull
Copy link
Owner

marksull commented May 8, 2019

Unfortunately, Python3 Websockets implementation doesn't support proxy yet (The pull request python-websockets/websockets#422 has been sitting there for almost a year).

Looking at the slack client, I see version 2 of their client switched to AIOHTTP specifically for SSL/Proxy support (https://github.com/slackapi/python-slackclient#advanced-options) so I guess I might have to do the same.

@kel50
Copy link
Author

kel50 commented May 8, 2019

Using AIOHTTP seems like a viable solution. I don't think that websockets will support proxies anytime soon.

@Loffe
Copy link

Loffe commented Apr 21, 2020

I found this fork of websockets mdymike/websockets@e3236e0 support proxy support and got it to work with this webex-teams backend 😄

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

No branches or pull requests

3 participants