Coder Social home page Coder Social logo

Comments (6)

sergeyfrolov avatar sergeyfrolov commented on May 22, 2024 1

I don't think this map will be that large or difficult to maintain going forward: whenever I have to add a new fingerprint to uTLS I always have its ID at hand.

That said, solution you propose also should work. I'll share the code for uTLS codegen with you over email

from utls.

sergeyfrolov avatar sergeyfrolov commented on May 22, 2024

My intuition is that it should be easy to recreate the function, used by https://tlsfingerprint.io, that hashes ClientHello bytes into a hash ID, e.g. 9c673fd64a32c8dc for Chrome 83 (https://tlsfingerprint.io/id/9c673fd64a32c8dc).

Then we can create a map of
9c673fd64a32c8dc -> HelloChrome83
cab2baf994ded9c9 -> also HelloChrome83
0a4a74aeebd1bb66 -> HelloChrome62
bc4c7e42f4961cd7 -> HelloChrome70
6bfedc5d5c740d58 -> HelloFirefox65

This is similar to your Idea 1, but goes through the numeric ID before being converted an utls.ClientHelloID.
The https://tlsfingerprint.io/ website is not required for this functionality, but it will make management and maintenance of those IDs easier.

from utls.

max-b avatar max-b commented on May 22, 2024

That sounds like an interesting option. We were actually curious, is the code used by tlsfingerprint.io open source/available somewhere for us to take a look at? I imagine that it must do some intelligent parsing of fields in order to determine which are significant bytes for hashing.

The https://tlsfingerprint.io/ website is not required for this functionality, but it will make management and maintenance of those IDs easier.

Agreed, though it seems like it would require additional burdens on the websites/your end? Or do you see an approach that wouldn't involve some additional API changes?

from utls.

sergeyfrolov avatar sergeyfrolov commented on May 22, 2024

tlsfingerprint.io code is private for operational reasons, but I am happy to send the parser code to you over e-mail (contact me at [email protected]) or elsewhere. The parser is implemented in Rust, so it would need porting to Golang. It is somewhat intelligent, but not that bad, porting an already existing function sounds to me easier than the alternatives.

Doesn't look like this approach would require any changes to tlsfingerprint.io. It does add an extra function and an extra map to maintain in uTLS, but seems worth it for the more plausible ClientHellos.

from utls.

max-b avatar max-b commented on May 22, 2024

tlsfingerprint.io code is private for operational reasons, but I am happy to send the parser code to you over e-mail (contact me at [email protected]) or elsewhere. The parser is implemented in Rust, so it would need porting to Golang. It is somewhat intelligent, but not that bad, porting an already existing function sounds to me easier than the alternatives.

Great - we're familiar enough with Rust over here that I think we should do just fine with that 😁. I'll send an email shortly - thanks!

Doesn't look like this approach would require any changes to tlsfingerprint.io. It does add an extra function and an extra map to maintain in uTLS, but seems worth it for the more plausible ClientHellos.

Ah ok yeah I think I understand better what you mean. I'll take a look at the tlsfingerprint.io code - I think that should help make sure I'm on the same page as you.

from utls.

max-b avatar max-b commented on May 22, 2024

Received your tls_parser.rs file - thank you!

I'm still at a bit of a loss for what you'd be interested in pulling into utls. It seems as though we'd need to manually maintain a pretty large map of sha hashes->ClientHelloSpecs if we did not want to dynamically generate them.

On the other hand, looking at the code you sent over, it seems fairly straightforwards to create something akin to your ClientHelloFingerprint struct and then translate that into a ClientHelloSpec. I imagine that you are actually doing that somewhere in tlsfingerprint.io when you have the uTLS generated code section?

from utls.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.