mirrorrequest icon indicating copy to clipboard operation
mirrorrequest copied to clipboard

Winget-pkgs索引

Open stevapple opened this issue 5 years ago • 1 comments

microsoft/winget-pkgs,aka. winget软件仓库。

索引采用HTTP方式,原始构建方式为Azure Pipeline持续集成。

由于国内连接较慢,加上本地缓存超时设置极短,因此认为有必要设置镜像。

stevapple avatar Jul 16 '20 14:07 stevapple

距 open issue 一年了,微软并没有给出官方的镜像工具,也没有第三方源冒出

同时 yaml 中指定的 InstallerUrl 依然是软件官网的链接,对索引进行镜像/反代就和反代 aur 一样,感觉没有啥实际意义或者体验提升

虽然我最近根据 structure of winget source 观察了一下两个 winget 默认源的结构,是可以给出索引的镜像(但是可以预期的是有点麻烦):

winget source list
名称     参数
------------------------------------------------------
winget   https://winget.azureedge.net/cache
newstore https://storeedgefd.dsx.mp.microsoft.com/v9.0

yuanyiwei avatar Jul 28 '21 13:07 yuanyiwei

日前校外访问似乎越发不稳定,考虑到大部分软件(实际上几乎全部未托管在GitHub上的软件)都能直接下载,感觉加速服务还是比较实用的。

stevapple avatar Feb 14 '23 03:02 stevapple

距 open issue 一年了,微软并没有给出官方的镜像工具,也没有第三方源冒出

虽然我最近根据 structure of winget source 观察了一下两个 winget 默认源的结构,是可以给出索引的镜像(但是可以预期的是有点麻烦):

(镜像工具/指南)这一点是不是可以给 https://github.com/microsoft/winget-pkgs 提个 issue?

stevapple avatar Feb 14 '23 03:02 stevapple

看了一下 structure of winget source,似乎如果要做同步的话需要:

不知道可行性如何。至于 stackoverflow 这篇回答里面提到的用 https://github.com/microsoft/winget-cli-restsource/ 的方案,目前不考虑为了 winget 单独开个第三方的服务端程序。

taoky avatar Feb 15 '23 09:02 taoky

  • WinGet 支持 Samba 和 HTTPS 协议,前者适合本地测试或小规模使用,镜像站更适合用 HTTPS,并且可以完全屏蔽 HTTP(客户端添加源时会校验链接格式是否为 \\EXAMPLE\path\to\winget-repohttps://example.com/path/to/winget-repo)。
  • 官方源和客户端支持 ETagIf-Match,但同步到本地的时候这部分信息可能丢失。没有证据表明这是必须的。
  • 官方源和客户端支持 Last-ModifiedIf-Modified-Since,我们在同步的时候可以保留这部分信息。尽管没有证据表明这是必须的,适配应该有助于降低压力、提高用户体验。
  • Content-LengthRange 支持是必须的。客户端可能会发送 HEAD 请求,其中读取的响应头包括 Content-LengthETagLast-Modified,支持重定向。GET 请求会使用 If-MatchIf-Modified-Since 携带 HEAD 返回的 ETag 和修改日期信息,并且可能使用 Range 进行分块。

stevapple avatar Mar 09 '23 09:03 stevapple

https://mirrors.ustc.edu.cn/winget-source/

@stevapple 可以来 https://github.com/ustclug/mirrorhelp/ 写个帮助吗?

taoky avatar Mar 12 '23 11:03 taoky