Skip to content
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

Adding various mirror links #278

Closed
DandelionSprout opened this issue Oct 19, 2018 · 20 comments
Closed

Adding various mirror links #278

DandelionSprout opened this issue Oct 19, 2018 · 20 comments
Labels
declined declined enhancement New feature or request

Comments

@DandelionSprout
Copy link

DandelionSprout commented Oct 19, 2018

In light of recent GitHub account problems for CHEF-KOCH and NanoMeow, as well as how I've learned that raw.githubusercontent.com links didn't work in some places (Iran was implied to be an example of that), and in an attempt to reduce the amount of issue reports and r/ublockorigin threads that complain about connection issues, I've partaken in discussions in NanoAdblocker/NanoCore#220, where one of the discussed topics was to keep backups and mirrors of lists, and where I've now taken the initiative to host some mirrors of some of the regional lists. However, as I appear to lack pull request privileges in the uBlock repo, I suppose I'll link here to my suggested edits that are in gorhill/uBlock@master...DandelionSprout:patch-3.

This issue (Pull?) aims to test out four different approaches to mirrors and alternate links: GitCDN (A raw file fetcher that @jspenguin2017 and farroukhi have adopted), Repo.or.cz (A small-time Czech git host that I've used with fair success), NotABug.org (A git host that is somewhat more secure than Repo.or.cz as far as edit credentials go, and which have been used by the LVT list), and others' GitHub mirroring of non-GitHub lists (in case the sources' domains run into problems with server admins, domain bills, or certificates).

If some or all of these approaches don't run into any problems, then these kinds of backup links could be rolled out big time, and could even grow to include jsDelivr and UNPKG, which Jspenguin2017 has taken a liking to.

@uBlock-user uBlock-user added the enhancement New feature or request label Oct 19, 2018
@jspenguin2017
Copy link

jspenguin2017 commented Oct 19, 2018

I think we should first agree on which mirror to use. repo.or.cz should be fine for backing up repositories (and commit histories), but not so much as content server. If ever a fail over happen, it will bring down their servers pretty quickly.

@DandelionSprout
Copy link
Author

You have a good point, but that's in part why I thought of this pull as a test of sorts. I could've attempted to make both repo.or.cz and notabug.com mirrors for every one of the 14 regional lists that both were GitHub-only and which had permissive licences, but I thought it'd be better to see how some examples of them would fare in everyday use before I'd do it on a large scale.

@DandelionSprout
Copy link
Author

DandelionSprout commented Oct 19, 2018

I've also prioritised the links in a set order, based on source originality, update frequencies, server uptimes, and server capacities.

Self-hosted sites > GitHub > GitCDN > NotABug > Repo.or.cz

@jspenguin2017
Copy link

jspenguin2017 commented Oct 19, 2018

I would vote for Filter Source > GitCDN > jsDelivr > UNPKG > GitHub > GitLab. I can set up a repository that mirrors all filters defined in assets.json and dual push to GitHub and GitLab.

@DandelionSprout
Copy link
Author

DandelionSprout commented Oct 19, 2018

If I'm not getting things completely wrong here, then GitCDN is just some kind of file fetcher from GitHub repos, as opposed to a true file host.

I'm unable to figure out how to host files on jsDelivr and UNPKG, but I see no reason why we can't interpolate these two suggestion trails into something á la Self-hosted sites > GitHub > GitCDN > GitLab > jsDelivr > NotABug > UNPKG > Repo.or.cz.

@DandelionSprout
Copy link
Author

Ah, now I saw your addition of Filter Source >. Now I understand your stance properly. I could be in for Filter Source > GitCDN > jsDelivr > UNPKG > GitHub > GitLab > NotABug > Repo.or.cz.

@DandelionSprout
Copy link
Author

DandelionSprout commented Oct 19, 2018

I also suppose that it'd be easy-peasy to e.g. take your GitHub-GitLab supermirror once you've made it, and then mirror it on NotABug. But that's a scenario that I think would be better to decide upon once that supermirror has been made.

@jspenguin2017
Copy link

I might have to publish the repository to NPM before jsDelivr and UNPKG will work.

Having many mirrors is good, but we don't want assets.json to become too bloated though. I think 3~4 mirrors are enough, we can always add more if needed. We'll see what gorhill thinks about this.

@MartinKolarik
Copy link

I might have to publish the repository to NPM before jsDelivr and UNPKG will work.

jsDelivr works with GitHub too and can handle any amount of traffic. Let me know if you decide to use it and need any help.

@jspenguin2017
Copy link

@MartinKolarik I can't seem to get it to serve tip of master tree. It says:

Couldn't find the requested release version latest.

@MartinKolarik
Copy link

MartinKolarik commented Oct 19, 2018

That's not supported yet but might be soon. Right now you have to make GitHub releases (or just git tags) for the "latest version" links to work, or use a commit sha in the URL (which I guess wouldn't work in this case because clients wouldn't know what's the latest commit).

@MartinKolarik
Copy link

@jspenguin2017 serving from master is possible now: https://cdn.jsdelivr.net/gh/uBlockOrigin/uAssets/

@jspenguin2017
Copy link

jspenguin2017 commented Oct 31, 2018

@MartinKolarik Oh, that's great! How long is the file cached for?

@MartinKolarik
Copy link

MartinKolarik commented Oct 31, 2018

On the CDN it's 12 hours, on clients 7 days but that can be bypassed by adding a query string. There's also an API for purging the CDN cache if you need more frequent updates.

@DandelionSprout
Copy link
Author

Just a quick headsup, even if this issue report may otherwise have fizzled out into nothing:

I hereby declare that NotABug is not the best of places to host a repo mirror. https://notabug.org/DandelionSprout/FilterMirrorRepo2 have been showing a 500 error for the past two months, after NotABug's mirror capabilities as a whole just randomly broke one day and doesn't seem to have been properly fixed since.

@jspenguin2017
Copy link

@DandelionSprout Can this be related? Is NotABug using an up to date fork of Gogs? gogs/gogs#5469

@DandelionSprout
Copy link
Author

I have a hard time telling whether a remote command execution issue could cause 500 errors, but what I can confirm, is that NotABug is in fact not using an up-to-date version of Gogs (Compare the file update dates in https://notabug.org/hp/gogs to https://github.com/gogs/gogs), and that the 500's began showing up within mere weeks of gogs/gogs#5469 being reported.

@jspenguin2017
Copy link

Remote code execution (RCE) can result in complete server takeover, which can basically cause every imaginable issues.

@uBlock-user uBlock-user added something to address something to address and removed enhancement New feature or request labels Feb 10, 2019
@h1z1
Copy link

h1z1 commented Feb 17, 2019

ipfs could be an option for this. Cloudflare as a bonus runs a gateway.

@gorhill
Copy link
Member

gorhill commented May 18, 2019

Closing because no clear, specific actionable items. If there is any current, existing issue with a specific filter list, please open an issue for that one case. I will not add mirror URL for a list unless there is an existing issue for that list.

@gorhill gorhill closed this as completed May 18, 2019
@gorhill gorhill added declined declined and removed something to address something to address labels May 18, 2019
@uBlock-user uBlock-user added the enhancement New feature or request label May 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
declined declined enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants