forked from forgejo/forgejo
[PRIVACY] Add a DNS method to fetch new updates
- Use TXT records in order to determine the latest available version. - This addresses a valid privacy issue, as with HTTP requests the server can keep track(estimated) of how many instances are using Forgejo, with DNS that's basically not possible as the server will never receive any data, as the only ones receiving data are DNS resolvers. (cherry picked from commit0baefb546a
) (cherry picked from commite8ee41880b
) (cherry picked from commit7eca4f3bf1
) (cherry picked from commit5c1567836c
) (cherry picked from commit953afbc67f
) (cherry picked from commitfd9d97ab9f
) (cherry picked from commit40fbd45eff
) (cherry picked from commitc5c904b04b
) (cherry picked from commit48659bb3ab
) (cherry picked from commitb1fccd5093
) (cherry picked from commit5e69573860
)
This commit is contained in:
parent
8a745dd7ea
commit
b4b586f41d
5 changed files with 76 additions and 10 deletions
16
modules/updatechecker/update_checker_test.go
Normal file
16
modules/updatechecker/update_checker_test.go
Normal file
|
@ -0,0 +1,16 @@
|
|||
// Copyright 2023 The Forgejo Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package updatechecker
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func TestDNSUpdate(t *testing.T) {
|
||||
version, err := getVersionDNS("release.forgejo.org")
|
||||
assert.NoError(t, err)
|
||||
assert.NotEmpty(t, version)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue