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

Upgrade Tyrus WebSocket client library (used in Socket Mode client ) to v2 #972

Open
gillbates opened this issue Apr 17, 2022 · 4 comments
Labels
dependencies Pull requests that update a dependency file enhancement M-T: A feature request for new functionality project:slack-api-client project:slack-api-client
Milestone

Comments

@gillbates
Copy link

(Describe your issue and goal here)

Reproducible in:

mvn dependency:tree | grep com.slack.api
gradle dependencies | grep com.slack.api
java -version
sw_vers && uname -v # or `ver`

The Slack SDK version

    implementation 'com.slack.api:bolt-socket-mode:1.21.1'
    implementation "javax.websocket:javax.websocket-api:1.1"
    implementation "org.glassfish.tyrus.bundles:tyrus-standalone-client:1.17"

Java Runtime version

openjdk version "17.0.1" 2021-10-19 LTS
OpenJDK Runtime Environment Zulu17.30+15-CA (build 17.0.1+12-LTS)
OpenJDK 64-Bit Server VM Zulu17.30+15-CA (build 17.0.1+12-LTS, mixed mode, sharing)

OS info

ProductName:	macOS
ProductVersion:	12.3.1
BuildVersion:	21E258
Darwin Kernel Version 21.4.0: Fri Mar 18 00:46:32 PDT 2022; root:xnu-8020.101.4~15/RELEASE_ARM64_T6000

Steps to reproduce:

 AppConfig appConfig = AppConfig.builder().singleTeamBotToken(mainApp.botOauthToken).build();

        appConfig.getSlack().getConfig().setProxyUrl("http://localhost:7890/");

        mainApp.app = new App(appConfig);
        SocketModeApp socketModeApp = new SocketModeApp(mainApp.appToken, SocketModeClient.Backend.Tyrus, mainApp.app);

Expected result:

can we support socks5 proxy for both slack http api and websocket api

Actual result:

Apr 17, 2022 10:06:30 PM org.glassfish.tyrus.container.grizzly.client.GrizzlyClientSocket addProxies
INFO: Socks proxy is not supported, please file new issue at https://java.net/jira/browse/TYRUS. Proxy 'SOCKS @ 127.0.0.1/<unresolved>:7890' will be ignored.
@seratch seratch changed the title can we update the tyrus to support socks5 proxy for websocket? Upgrade Tyrus WebSocket client library (used in Socket Mode client ) to v2 Apr 18, 2022
@seratch seratch added this to the 2.0.0 milestone Apr 18, 2022
@seratch seratch added enhancement M-T: A feature request for new functionality project:slack-api-client project:slack-api-client dependencies Pull requests that update a dependency file and removed untriaged labels Apr 18, 2022
@seratch
Copy link
Member

seratch commented Apr 18, 2022

HI @gillbates, thanks for writing in!

We are planning to upgrade to Tyrus v2 in the next major version: #919 That being said, this SDK's v2 won't come in the short term (at least, we are not planning to work on it this year).

If this issue is urgent for you, please consider implementing your own SocketModeClientTyrusImpl for now.

@gillbates
Copy link
Author

HI @gillbates, thanks for writing in!

We are planning to upgrade to Tyrus v2 in the next major version: #919 That being said, this SDK's v2 won't come in the short term (at least, we are not planning to work on it this year).

If this issue is urgent for you, please consider implementing your own SocketModeClientTyrusImpl for now.

Hi @seratch

thx for the clarify.
Tyrus 1.7 is really buggy and very outdated.

Currently there are lot of needs for proxy support for both http api and websockets.
Maybe we could provide an official workround?

@seratch
Copy link
Member

seratch commented Apr 18, 2022

If I understand correctly, Tyrus v2 does not support SOCKS proxies out-of-the-box too. The logging part is still the same: https://github.com/eclipse-ee4j/tyrus/blob/2.0.2/containers/grizzly-client/src/main/java/org/glassfish/tyrus/container/grizzly/client/GrizzlyClientSocket.java#L594-L598

Currently, this SDK supports only HTTP proxy and many of the use cases that we are aware have been covered by that. That being said, when any of the underlying WebSocket libraries support SOCKS5 proxies, we can provide tools for the use cases.

As for the oldness of Tyrus v1.17, indeed the version was released in 2020. The Tyrus team released v1.18 a few months ago but this project haven't upgraded the depending version yet. We will specify v1.18 instead since the next release. Also, if we see more demands on Tyrus v2 support in prior to this SDK's v2 release, we may consider adding a separate optional module for it (like we do for Jetty v11 supports).

https://search.maven.org/artifact/org.glassfish.tyrus/tyrus-client

Thanks again for sharing this and it'd be appreciated if you could understand this.

@Rajkumar0718
Copy link

Hai , i am connect websocket throw tyrus-standalone-client version 1.19 for chrome version 109.0.5414.119-1 it working fine ,but now chrome version is upgraded to 112 .i can't able to connect to browser . so i used tyrus-standalone-client version 2.1.3 it throws a handshake error. why ?what is the reason?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement M-T: A feature request for new functionality project:slack-api-client project:slack-api-client
Projects
None yet
Development

No branches or pull requests

3 participants