mirror of
https://github.com/XTLS/REALITY.git
synced 2025-08-22 14:38:35 +00:00
all: document legacy //go:linkname for final round of modules
Add linknames for most modules with ≥50 dependents. Add linknames for a few other modules that we know are important but are below 50. Remove linknames from badlinkname.go that do not merit inclusion (very small number of dependents). We can add them back later if the need arises. Fixes #67401. (For now.) Change-Id: I1e49fec0292265256044d64b1841d366c4106002 Reviewed-on: https://go-review.googlesource.com/c/go/+/587756 Auto-Submit: Russ Cox <rsc@golang.org> TryBot-Bypass: Russ Cox <rsc@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com>
This commit is contained in:
parent
9dd5b0970c
commit
357fef581a
@ -1,23 +0,0 @@
|
||||
// Copyright 2024 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package reality
|
||||
|
||||
import _ "unsafe"
|
||||
|
||||
// As of Go 1.22, the symbols below are found to be pulled via
|
||||
// linkname in the wild. We provide a push linkname here, to
|
||||
// keep them accessible with pull linknames.
|
||||
// This may change in the future. Please do not depend on them
|
||||
// in new code.
|
||||
|
||||
//go:linkname cipherSuiteTLS13ByID
|
||||
//go:linkname errShutdown
|
||||
|
||||
// The compiler doesn't allow linknames on methods, for good reasons.
|
||||
// We use this trick to push linknames of the methods.
|
||||
// Do not call them in this package.
|
||||
|
||||
//go:linkname badlinkname_halfConn_incSeq crypto/tls.(*halfConn).incSeq
|
||||
func badlinkname_halfConn_incSeq(*halfConn)
|
@ -201,6 +201,7 @@ type cipherSuiteTLS13 struct {
|
||||
// but widely used packages access it using linkname.
|
||||
// Notable members of the hall of shame include:
|
||||
// - github.com/quic-go/quic-go
|
||||
// - github.com/sagernet/quic-go
|
||||
//
|
||||
// Do not remove or change the type signature.
|
||||
// See go.dev/issue/67401.
|
||||
@ -524,6 +525,7 @@ func aeadAESGCM(key, noncePrefix []byte) aead {
|
||||
// but widely used packages access it using linkname.
|
||||
// Notable members of the hall of shame include:
|
||||
// - github.com/xtls/xray-core
|
||||
// - github.com/v2fly/v2ray-core
|
||||
//
|
||||
// Do not remove or change the type signature.
|
||||
// See go.dev/issue/67401.
|
||||
|
@ -61,6 +61,7 @@ func defaultCipherSuites() []uint16 {
|
||||
// but widely used packages access it using linkname.
|
||||
// Notable members of the hall of shame include:
|
||||
// - github.com/quic-go/quic-go
|
||||
// - github.com/sagernet/quic-go
|
||||
//
|
||||
// Do not remove or change the type signature.
|
||||
// See go.dev/issue/67401.
|
||||
@ -76,6 +77,7 @@ var defaultCipherSuitesTLS13 = []uint16{
|
||||
// but widely used packages access it using linkname.
|
||||
// Notable members of the hall of shame include:
|
||||
// - github.com/quic-go/quic-go
|
||||
// - github.com/sagernet/quic-go
|
||||
//
|
||||
// Do not remove or change the type signature.
|
||||
// See go.dev/issue/67401.
|
||||
|
Loading…
Reference in New Issue
Block a user