mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-06-17 16:44:29 +03:00
Update sing-box core, refactor MASQUE, update XHTTP
This commit is contained in:
@@ -267,8 +267,8 @@ type realityVerifier struct {
|
||||
}
|
||||
|
||||
func (c *realityVerifier) VerifyPeerCertificate(rawCerts [][]byte, verifiedChains [][]*x509.Certificate) error {
|
||||
p, _ := reflect.TypeOf(c.Conn).Elem().FieldByName("peerCertificates")
|
||||
certs := *(*([]*x509.Certificate))(unsafe.Pointer(uintptr(unsafe.Pointer(c.Conn)) + p.Offset))
|
||||
p, _ := reflect.TypeFor[utls.Conn]().FieldByName("peerCertificates")
|
||||
certs := *(*([]*x509.Certificate))(unsafe.Add(unsafe.Pointer(c.Conn), p.Offset))
|
||||
if pub, ok := certs[0].PublicKey.(ed25519.PublicKey); ok {
|
||||
h := hmac.New(sha512.New, c.authKey)
|
||||
h.Write(pub)
|
||||
|
||||
Reference in New Issue
Block a user