github.com/sagernet/sing@v0.4.0-beta.19.0.20240518125136-f67a0988a636/protocol/http/link.go (about)

     1  package http
     2  
     3  import (
     4  	"bufio"
     5  	"net/http"
     6  	"net/url"
     7  	_ "unsafe" // for linkname
     8  )
     9  
    10  //go:linkname ReadRequest net/http.readRequest
    11  func ReadRequest(b *bufio.Reader) (req *http.Request, err error)
    12  
    13  //go:linkname URLSetPath net/url.(*URL).setPath
    14  func URLSetPath(u *url.URL, p string) error
    15  
    16  //go:linkname ParseBasicAuth net/http.parseBasicAuth
    17  func ParseBasicAuth(auth string) (username, password string, ok bool)