mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2025-03-04 02:14:40 +01:00
Merge branch 'master' of github.com:DNSCrypt/dnscrypt-proxy
* 'master' of github.com:DNSCrypt/dnscrypt-proxy: GitHub Actions: Deprecating save-state and set-output commands (#2295) Nits (#2293) Make CodeQL happy (#2294)
This commit is contained in:
commit
84184bbad8
2 changed files with 4 additions and 4 deletions
2
.github/workflows/releases.yml
vendored
2
.github/workflows/releases.yml
vendored
|
@ -25,7 +25,7 @@ jobs:
|
|||
steps:
|
||||
- name: Get the version
|
||||
id: get_version
|
||||
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
|
||||
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v3
|
||||
|
|
|
@ -503,17 +503,17 @@ func (xTransport *XTransport) Fetch(
|
|||
if xTransport.h3Transport != nil && !hasAltSupport {
|
||||
if alt, found := resp.Header["Alt-Svc"]; found {
|
||||
dlog.Debugf("Alt-Svc [%s]: [%s]", url.Host, alt)
|
||||
altPort := uint16(port)
|
||||
altPort := uint16(port & 0xffff)
|
||||
for i, xalt := range alt {
|
||||
for j, v := range strings.Split(xalt, ";") {
|
||||
if i > 8 || j > 16 {
|
||||
if i >= 8 || j >= 16 {
|
||||
break
|
||||
}
|
||||
v = strings.TrimSpace(v)
|
||||
if strings.HasPrefix(v, "h3=\":") {
|
||||
v = strings.TrimPrefix(v, "h3=\":")
|
||||
v = strings.TrimSuffix(v, "\"")
|
||||
if xAltPort, err := strconv.ParseUint(v, 10, 16); err == nil && xAltPort <= 65536 {
|
||||
if xAltPort, err := strconv.ParseUint(v, 10, 16); err == nil && xAltPort <= 65535 {
|
||||
altPort = uint16(xAltPort)
|
||||
dlog.Debugf("Using HTTP/3 for [%s]", url.Host)
|
||||
break
|
||||
|
|
Loading…
Add table
Reference in a new issue