Skip to content

Commit

Permalink
Merge branch 'UGREEN-DEV' into UGREEN
Browse files Browse the repository at this point in the history
  • Loading branch information
onlyLTY committed Oct 30, 2024
2 parents 9a8dd31 + a62f796 commit ba2d0db
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion fn_version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.0.5-FNOS
v2.0.8-FNOS
6 changes: 3 additions & 3 deletions internal/module/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const ChallengeHeader = "WWW-Authenticate"
const (
DefaultRegistryDomain = "docker.io"
DefaultRegistryHost = "index.docker.io"
DefaultAcceleratorHost = "qazxsw.msaber.fun"
DefaultAcceleratorHost = "docker.ketches.cn"
)

func GetToken(image types.Image, registryAuth string) (string, error) {
Expand Down Expand Up @@ -172,7 +172,7 @@ func GetRegistryAddress(imageRef string) (string, error) {
}

func checkHost(host string) bool {
URL := "https://" + host
URL := "https://" + host + "/v2/"
// 创建带有超时设置的 http.Client
client := http.Client{
Timeout: 5 * time.Second,
Expand All @@ -191,7 +191,7 @@ func checkHost(host string) bool {
}(resp.Body)

// 检查 HTTP 响应状态码
if resp.StatusCode == http.StatusOK {
if resp.StatusCode == http.StatusOK || resp.StatusCode == http.StatusUnauthorized {
return true
}

Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.0.7-UGREEN
v2.0.8-UGREEN

0 comments on commit ba2d0db

Please sign in to comment.