Skip to content

Question: Autodotect SSL connection on same port #174

@RoLex

Description

@RoLex

Hello and thank you for this amazing set of cross platform sockets!

I'm currently working on an ancient TCP based protocol for chat between clients.

Server is running on single port, unlike HTTP vs HTTPS server.

When a client connects, the server speaks first to welcome new user.

Previosly this protocol did not have SSL support, but I would like to add it.

When a client connects using SSL, it talks first with SSL handshake request.

My idea is to wait a second to see if client is talking first, then start SSL handshake. Otherwise talk first to welcome non SSL user.

In Indy for example, this setting is called "bypass". With help of reading buffer in "peek" mode, it is possible to detect such clients.

So my question is simple: Is it possible to autodetect SSL connections on same port?

For example start server as non SSL, then on client connect peek the data, and manually call SSL hanshake if needed.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions