Compare commits
3 Commits
f5d1c0b27d
...
4bcd168abc
Author | SHA1 | Date |
---|---|---|
nervuri | 4bcd168abc | |
nervuri | b899c240f4 | |
nervuri | 0251e59a10 |
14
.reuse/dep5
14
.reuse/dep5
|
@ -11,22 +11,10 @@ Files: .gitignore
|
|||
Copyright: 2022-2023 nervuri <https://nervuri.net/contact>
|
||||
License: BSD-3-Clause
|
||||
|
||||
Files: *.gmi
|
||||
Files: frontend/*
|
||||
Copyright: 2022-2023 nervuri <https://nervuri.net/contact>
|
||||
License: BSD-3-Clause
|
||||
|
||||
Files: *.tpl
|
||||
Copyright: 2022-2023 nervuri <https://nervuri.net/contact>
|
||||
License: BSD-3-Clause
|
||||
|
||||
Files: style.css
|
||||
Copyright: 2023 nervuri <https://nervuri.net/contact>
|
||||
License: BSD-3-Clause
|
||||
|
||||
Files: script.js
|
||||
Copyright: 2023 nervuri <https://nervuri.net/contact>
|
||||
License: BSD-3-Clause
|
||||
|
||||
Files: clienthello/*.csv
|
||||
Copyright: IANA and IETF
|
||||
License: CC0-1.0
|
||||
|
|
2
NJA3.md
2
NJA3.md
|
@ -93,4 +93,4 @@ On a final note, string-based fingerprinting is fundamentally limited compared t
|
|||
|
||||
## Implementation
|
||||
|
||||
The first implementation is written in Go and can be found [here](https://tildegit.org/nervuri/client-hello-mirror/clienthello/fingerprint.go#L57). This code is part of the TLS Client Hello Mirror, a live instance of which is running at [tlsprivacy.nervuri.net](https://tlsprivacy.nervuri.net/), which will (among other things) generate the NJA3 fingerprint of any HTTPS or [Gemini](https://geminiprotocol.net/) client you connect to it.
|
||||
The first implementation is written in Go and can be found [here](https://tildegit.org/nervuri/client-hello-mirror/src/branch/master/clienthello/fingerprint.go#L69). This code is part of the TLS Client Hello Mirror, a live instance of which is running at [tlsprivacy.nervuri.net](https://tlsprivacy.nervuri.net/), which will (among other things) generate the NJA3 fingerprint of any HTTPS or [Gemini](https://geminiprotocol.net/) client you connect to it.
|
||||
|
|
|
@ -48,11 +48,12 @@ func (m *ClientHelloMsg) ja3() {
|
|||
}
|
||||
for _, e := range m.Extensions {
|
||||
codeGroups[2] += deGREASE16(e.Code, "")
|
||||
if e.Code == extensionSupportedGroups {
|
||||
switch e.Code {
|
||||
case extensionSupportedGroups:
|
||||
for _, g := range e.Data.SupportedGroups {
|
||||
codeGroups[3] += deGREASE16(g.(uint16), "")
|
||||
}
|
||||
} else if e.Code == extensionSupportedPointFormats {
|
||||
case extensionSupportedPointFormats:
|
||||
for _, pf := range e.Data.SupportedPointFormats {
|
||||
codeGroups[4] += toString(pf.(uint8)) + "-"
|
||||
}
|
||||
|
@ -95,27 +96,28 @@ func (m *ClientHelloMsg) nja3() {
|
|||
e.Code = genericGREASECode16
|
||||
}
|
||||
extCodes = append(extCodes, e.Code)
|
||||
if e.Code == extensionSupportedGroups {
|
||||
switch e.Code {
|
||||
case extensionSupportedGroups:
|
||||
for _, g := range e.Data.SupportedGroups {
|
||||
codeGroups[4] += deGREASE16(g.(uint16), genericGreaseString16)
|
||||
}
|
||||
} else if e.Code == extensionSupportedPointFormats {
|
||||
case extensionSupportedPointFormats:
|
||||
for _, pf := range e.Data.SupportedPointFormats {
|
||||
codeGroups[5] += toString(pf.(uint8)) + "-"
|
||||
}
|
||||
} else if e.Code == extensionSupportedVersions {
|
||||
case extensionSupportedVersions:
|
||||
for _, v := range e.Data.SupportedVersions {
|
||||
codeGroups[6] += deGREASE16(v.(uint16), genericGreaseString16)
|
||||
}
|
||||
} else if e.Code == extensionSignatureAlgorithms {
|
||||
case extensionSignatureAlgorithms:
|
||||
for _, sa := range e.Data.SupportedSignatureAlgorithms {
|
||||
codeGroups[7] += deGREASE16(sa.(uint16), genericGreaseString16)
|
||||
}
|
||||
} else if e.Code == extensionPSKModes {
|
||||
case extensionPSKModes:
|
||||
for _, mode := range e.Data.PSKModes {
|
||||
codeGroups[8] += deGREASE8(mode.(uint8), genericGreaseString8)
|
||||
}
|
||||
} else if e.Code == extensionCompressCertificate {
|
||||
case extensionCompressCertificate:
|
||||
for _, algo := range e.Data.CertificateCompressionAlgos {
|
||||
codeGroups[9] += toString(algo.(uint16)) + "-"
|
||||
}
|
||||
|
|
10
server.go
10
server.go
|
@ -54,19 +54,19 @@ func fatalError(err ...any) {
|
|||
logger.Fatal(err...)
|
||||
}
|
||||
|
||||
//go:embed index.html
|
||||
//go:embed frontend/index.html
|
||||
var html string
|
||||
|
||||
//go:embed error.html
|
||||
//go:embed frontend/error.html
|
||||
var htmlError string
|
||||
|
||||
//go:embed style.css
|
||||
//go:embed frontend/style.css
|
||||
var css string
|
||||
|
||||
//go:embed script.js
|
||||
//go:embed frontend/script.js
|
||||
var js string
|
||||
|
||||
//go:embed index.gmi
|
||||
//go:embed frontend/index.gmi
|
||||
var gemtext string
|
||||
|
||||
// Copy the Client Hello message before starting the TLS handshake.
|
||||
|
|
Loading…
Reference in New Issue