Skip to content

ClientHello TLS version 1.0 by default #151

@overflowingd

Description

@overflowingd

Hi all. I'm trying utls and I found that there is no place in code to change an initial TLS version for ClientHello packet.
My Firefox sends TLSv1.3 by default. You can see a screenshot with captured TLS handshake of Firefox and some TLS server.
But utls sends ClientHello with TLSv1.0 constantly.

As I see in the code of the package, there is only one place where TLS version selection occurs:

func (c *Conn) pickTLSVersion(serverHello *serverHelloMsg) error {
	// ...
	c.vers = vers
	c.haveVers = true
	c.in.version = vers
	c.out.version = vers

	return nil
}

So, the package does not mimic the first thing that catches your eye when using Wireshark and I am interested in advice how to set the version when creating a connection.
Thanks.

Firefox 108 TLS handshake + some packets

Firefox version:

$ firefox -v
Mozilla Firefox 108.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions