microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
23.1k stars 1.44k forks source link

Localise Everything Via a Microsoft Served CDN #258

Open hifocus opened 4 years ago

hifocus commented 4 years ago

Description of the new feature/enhancement

Here's me currently in mainland China trying to install python:

C:\Users\imhx>winget install python
Found Python [Python.Python]
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://www.python.org/ftp/python/3.8.3/python-3.8.3-amd64.exe
  -

Apparently, as affected by the internet censorship in mainland China, locally, nearly all international internet connection is very slow, even when it's not blocked by the government. So although it makes sense to download python through it's official website, may I request to store everything in need when installing a package on a Microsoft Served CDN / Network (npm is a good example; though it does not have nodes in China, many mirrors had been built up so it's pretty accessible), just like the Windows Store (which has decent download speed according to my own experience), as both of them share a similar nature.

Proposed technical implementation details (optional)

I am not sure if, say the python installation through winget will be detecting it's latest version automatically; if so, a script can be written and ran on Microsoft's side, or a CI can be depended to store the latest version of the software, in this case python.

This idea may sound silly but :) there you go!

hifocus commented 4 years ago

In addition, a Microsoft Bot can be ran on the community repo to store everything that's distributable on such Microsoft Network, and convert official download links to Microsoft networked links.

Such as: From https://www.python.org/ftp/python/3.8.3/python-3.8.3-amd64.exe to https://winget.example.com/python/3.8.3/python-3.8.3-amd64.exe

masx200 commented 4 years ago

I support it!

zooba commented 4 years ago

Specifically for the Python installation, you can get it through the Store (and once WinGet supports it, that's where it ought to point by default).

In the past we (I work at Microsoft, though not on WinGet) have tried to mirror Python on our CDN so that it's accessible in China, but the lawyers got involved and we had to take it down. So while we can try again, I wouldn't be too hopeful!

The CDN for python.org is donated by Fastly, so perhaps their coverage is not very good in China?

hifocus commented 4 years ago

Specifically for the Python installation, you can get it through the Store (and once WinGet supports it, that's where it ought to point by default).

In the past we (I work at Microsoft, though not on WinGet) have tried to mirror Python on our CDN so that it's accessible in China, but the lawyers got involved and we had to take it down. So while we can try again, I wouldn't be too hopeful!

The CDN for python.org is donated by Fastly, so perhaps their coverage is not very good in China?

Fastly is partially blocked in China. So you can imagine that.

I don't believe distributing Python installation files in China is illegal? First you can host it at your Azure zones, like Hong Kong or elsewhere; secondly even you do store it in China, I believe it's 100% legal.

Even you distribute government-banned content and make it accessible in China, all the government will be able to do is that simply block the domain. There won't be any lawyers to get involve.

The software-download.microsoft.com domain is accessible in China, and I just want something similar to power winget. That's all.