Skip to content

Commit 84184bb

Browse files
committed
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)
2 parents f630094 + 3517dec commit 84184bb

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/releases.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
steps:
2626
- name: Get the version
2727
id: get_version
28-
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
28+
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
2929

3030
- name: Set up Go
3131
uses: actions/setup-go@v3

dnscrypt-proxy/xtransport.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -503,17 +503,17 @@ func (xTransport *XTransport) Fetch(
503503
if xTransport.h3Transport != nil && !hasAltSupport {
504504
if alt, found := resp.Header["Alt-Svc"]; found {
505505
dlog.Debugf("Alt-Svc [%s]: [%s]", url.Host, alt)
506-
altPort := uint16(port)
506+
altPort := uint16(port & 0xffff)
507507
for i, xalt := range alt {
508508
for j, v := range strings.Split(xalt, ";") {
509-
if i > 8 || j > 16 {
509+
if i >= 8 || j >= 16 {
510510
break
511511
}
512512
v = strings.TrimSpace(v)
513513
if strings.HasPrefix(v, "h3=\":") {
514514
v = strings.TrimPrefix(v, "h3=\":")
515515
v = strings.TrimSuffix(v, "\"")
516-
if xAltPort, err := strconv.ParseUint(v, 10, 16); err == nil && xAltPort <= 65536 {
516+
if xAltPort, err := strconv.ParseUint(v, 10, 16); err == nil && xAltPort <= 65535 {
517517
altPort = uint16(xAltPort)
518518
dlog.Debugf("Using HTTP/3 for [%s]", url.Host)
519519
break

0 commit comments

Comments
 (0)