Skip to content

WebSocketClient set ssl and proxy,but cannot use the proxy #1112

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

Closed
ranan05 opened this issue Jan 5, 2021 · 1 comment
Closed

WebSocketClient set ssl and proxy,but cannot use the proxy #1112

ranan05 opened this issue Jan 5, 2021 · 1 comment

Comments

@ranan05
Copy link

ranan05 commented Jan 5, 2021

i read the code of WebSocketClient.class,the method:run() has code blocks:

public void run() {
InputStream istream;
try {
boolean isNewSocket = false;
if (socketFactory != null) {
socket = socketFactory.createSocket();
} else if( socket == null ) {
socket = new Socket( proxy );
isNewSocket = true;
} else if( socket.isClosed() ) {
throw new IOException();
}

i found if i set socketFactory, it won't use the proxy. But wss must set the socketFactory, also it has other method?
thanks

@marci4
Copy link
Collaborator

marci4 commented Jan 5, 2021

See #1070

Best regards,
Marcel

@marci4 marci4 closed this as completed Jan 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants