Client support for connecting to HTTPS
See original GitHub issueHi,
I am attempting to connect via the python Socket.IO client to a an HTTPS Socket.IO JavaScript server. When connecting via an HTTP link it works fine, but HTTPS returns “connection refused by server”. The equivalent JavaScript client code however is able to connect to HTTPS, so I do not believe the issue is server side.
Here is my python-socketio client code
import socketio
sio = socketio.Client();
@sio.event
def connect():
print('connection established')
@sio.event
def disconnect():
print('disconnected from server')
sio.connect('https://myUrl.com')
sio.wait()
And here is the equivalent functioning JavaScript code
const io = require('socket.io-client');
const socket = io.connect('https://myUrl.com', {
secure: true,
reconnect: true,
rejectUnauthorized: false});
socket.on('connect', function() {
console.log("the client connected");
});
socket.on('disconnect', function() {
console.log("the client disconnected");
});
socket.on('test', function(data) {
console.log(data)
});
Is there an equivalent to the io.connect options being passed through in JavaScript that needs to be enabled on the python equivalent?
Thanks!
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Setting Up a Client to Consume a Web Service Over an SSL ...
There are some additional steps that need to be performed when setting up a client application to consume a Web service over a...
Read more >Enabling HTTPS on your servers - web.dev
If you have been using distinct IP addresses for each hostname, you can easily support both HTTP and HTTPS for all clients.
Read more >C HTTP/HTTPS Support
C HTTP/HTTPS Support ... Message Queue includes support for Java clients to communicate with a message broker by means of the HTTP or...
Read more >Securing Connections for Client and Server - MariaDB
See Secure Connections Overview to determine how to check whether a server was compiled with TLS support.
Read more >HTTPS Client Authentication (The Java EE 6 Tutorial, Volume I)
HTTPS Client Authentication is a more secure method of authentication than either basic or form-based authentication. It uses HTTP over SSL (HTTPS), in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It seems that the dependency python-engineio add an option ssl_verify at commit 51da0bed3c93c41b980bb565560c7233da3501f5 . Currently the last version of the library is python-engineio==3.9.3 and the change is not added yet.
It works right now if update script python-engineio/engineio/client.py for this version and connect using:
Correct. Next version of python-engineio will support a disable SSL verification option. Coming out later today.