-
-
Notifications
You must be signed in to change notification settings - Fork 630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an option to the add-on store, allowing users to customize the mirror URL of metadata #14974
Comments
@cary-rowen , in case this takes some time, since they are add-ons not added to the addons.nvda-project.org website, as you may know, websites have been created to fetch/present add-ons available in the store. |
Thanks @nvdaes I can access all services of NVAccess and Github with no problem using VPN. |
Hi @cary-rowen - are you certain of this? The following tool seems to suggest that nvaccess.org can be accessed just fine from China: Other similar tools have confirmed this as well. |
Whether you can successfully access nvaccess.org and github is uncertain, and even if you can access related websites, the access speed is not very satisfactory. If you need to download a large amount of data, it will consume a lot of time |
Hi @seanbudd The following add-on apply this mirror source: |
If NVDA users in China already have to use an add-on to use a mirror for update check, wouldn't adding a general mirror for nvaccess.org be more appropriate than just for the add-on store? It's difficult to say whether supporting mirrors is in scope of NVDA, or should be performed by add-ons only. |
Yes, this is the ideal solution. Rather than asking users to go to a specific site to download a separate mirror add-on, it would be better if there was an option to fill in the mirror URL in NVDA's advanced settings, or somewhere more appropriate. |
It's difficult to say whether supporting mirrors is in scope of NVDA, or should be performed by add-ons only.
While I have no comment on that, I will say that allowing the metadata URL to be
easily changed by an add-on without monkeypatching, could make life easier for
add-on maintainers.
Both in these situations, where China and Iran, to give two examples who have
been known to block all kinds of things in the past, might need add-ons to patch
the URL; and for alternative add-on catalogs.
I would prefer there weren't alternative add-on catalogs, but we know that there
are, for example several with language specific add-ons only in them.
Allowing a catalog specific add-on to easily patch the URL from which data is
fetched, could open certain options.
Either an extensionPoint Filter, or a globally available setter for the URL,
would solve this with minimal maintenance requirements on the NV Access side..
|
This is also nice and will be friendlier for add-on maintainers too. |
Imo, seems reasonable to allow URLS mirroring the whole NV Access data available for users, not just the store, to make easier NVDa updates. This is absolutely needed for user of certain countries. In the other hand, I don"t thing that the fact that different catalogs for add-ons which may not be needed, given the fact that sending add-ons to the store can be done easily, I don"t thing that this should be prioritized at all. This maybe even harmful for gattering stats from NV Access, and may have the effect that catalogs are created to promote certain servers without considering the efforz made for the store. But please don"t think that I"m suggesting that providing a way for users that cannot access data ue to restrictions in countries shouldn"t be prioritized. My concern is about people who may create their own catalogs for their own prestige or benefit, at least hypotetically. This cannot be avoided, but certain policies maybe provided, or at least recommendations to use the NV Access catalog when possible. |
We can improve the API for this in the meantime, before considering including it in NVDA. |
that would be great, thanks |
Hello, Monkey Patching The add-on I developed for this: @seanbudd Thanks |
I think we should create a new centralized class like |
@seanbudd I may tackle that one if you like. I did some work in add-on updater
that might be appropriate to port across for an URLs class.
|
Sure thing @XLTechie - perhaps it should go in |
@seanbudd I was going to do it as its own base module, but if you would rather
it in utils, it doesn't matter to me.
|
I think its own module in utils would be ideal |
Has this been postponed to 2023.3? It means that users in some regions in 2023.2 cannot use the add-on store. |
@cary-rowen asked:
Has this been postponed to 2023.3? It means that users in some regions in 2023.2 cannot use the add-on store.
I'm sorry. I've been too busy with work recently to finish my part of this. I'll
see what I can do in the first half of this week. I had one or two bugs to work
out, but it was close to completion.
|
Unfortunately solving the original issue is a major piece of work and couldn't fit into this development cycle. The current workaround solution for mirrors is handled by add-ons. Some possible workarounds There are also existing website mirrors: |
@seanbudd
Thanks |
Is this an issue because it causes the first attempt to fetch from the NV access server rather than the mirror? |
Yes, that's the problem. |
Could you explain what the behaviour is when monkey patching the add-on? My understanding is that even if the first attempt fails, subsequent fetches to the add-on store should succeed given a monkeypatched mirror |
Hi, @seanbudd There are two possible cases that might occur before the monkey-patching add-on is loaded:
If the first case happens and the monkey-patching add-on loads successfully, NVDA won't try to fetch the metadata again when the user opens the add-on store. Users can see the available add-ons, but they can't download them because the download URL in the cached metadata isn't mirrored. In the second case, if NVDA can't load the metadata during initialization, there's no cache. When the user opens the add-on store, NVDA will use the mirror server to fetch the metadata successfully. Here, the download URL in the metadata is from the mirrored address, not the Github address. This means users can use the add-on store without any problems. It seems to me that this is the problem currently encountered. Thanks |
To handle the first case, you should be able to fix this by monkey patching the cacheHash url. |
oh, Thanks, What is the generation algorithm of this cache hash? How often should I update the cache hash? |
The hash returned by our endpoint matches the latest commit of the views branch https://github.com/nvaccess/addon-datastore/commits/views Ideally, your hash should always return a value different to NV Access's and should be updated whenever we update our hash. You have a few options for generating the hash:
|
Relates to #14974 Summary of the issue: Add-on authors wish to have a stable API so that they can change the base URL of the add-on store. This allows add-ons to use a mirror for the add-on store. Description of user facing changes None Description of development approach Change BASE_URL for the add-on store to be public
Relates to nvaccess#14974 Summary of the issue: Add-on authors wish to have a stable API so that they can change the base URL of the add-on store. This allows add-ons to use a mirror for the add-on store. Description of user facing changes None Description of development approach Change BASE_URL for the add-on store to be public
When adding the mirror URL, an option should be added to set it to the URL to None to disable all telemetry |
Is your feature request related to a problem? Please describe.
In China, due to the government firewall or some other reason, NVDA users cannot use the add-on store, get metadata, and cannot download add-ons.
I don't know of any other potential users in regions that are affected by this.
Describe the solution you'd like
Add an option in NVDA that allows users to set the metadata mirror URL of the add-on store, and the Chinese team can maintain this mirror. Just like it currently does for the add-on updater.
Describe alternatives you've considered
Use Monkey Patch for
getAddonStoreURL
in source/addonStore/network.py.Additional context
None
The text was updated successfully, but these errors were encountered: