diff --git a/.github/workflows/update-instances.yml b/.github/workflows/update-instances.yml index 315465a..7f483ac 100644 --- a/.github/workflows/update-instances.yml +++ b/.github/workflows/update-instances.yml @@ -27,31 +27,6 @@ jobs: sed -i 's/\/"/"/g' services-full.json } - function remove_cf_instances() { - rm out.json - file="services-full.json" - - while read -r line; do - if [[ "$line" == "\"https://"* ]]; then - domain=$(echo "$line" | sed -e "s/^\"https:\/\///" -e "s/\",//" -e "s/\"//") - ns=$(dig ns "$domain") - if [[ "$ns" == *"cloudflare"* ]]; then - echo "\"$domain\" using cloudflare, skipping..." - else - echo "$line" >> out.json - fi - else - echo "$line" >> out.json - fi - done <$file - - # Remove any trailing commas from new instance lists - sed -i '' -e ':begin' -e '$!N' -e 's/,\n]/\n]/g' -e 'tbegin' -e 'P' -e 'D' out.json - - cat out.json | jq --indent 2 . > services.json - rm out.json - } - # ============================================================== # Git config # ============================================================== @@ -60,6 +35,22 @@ jobs: git remote set-url origin git@github.com:benbusby/farside.git git checkout main + # ============================================================== + # Bibliogram update + # ============================================================== + curl -s https://bibliogram.art/api/instances | \ + jq '[ + .data | + .[] | + select(.onion_site | not) | + .address + ] | sort' > bibliogram-tmp.json + jq --slurpfile bibliogram bibliogram-tmp.json \ + '( .[] | select(.type == "bibliogram") ) + .instances |= $bibliogram[0]' services-full.json > services-tmp.json + + apply_update + # ============================================================== # searx update # ============================================================== @@ -198,11 +189,6 @@ jobs: # TODO: Update instances for other services # ============================================================== - # ============================================================== - # Remove cloudflare instances - # ============================================================== - remove_cf_instances - # ============================================================== # Push changes # ============================================================== diff --git a/README.md b/README.md index 4d18109..f7771d2 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,26 @@ -![Farside](img/farside.svg) +
+Farside +
+
+ +
[![Latest Release](https://img.shields.io/github/v/release/benbusby/farside?label=Release)](https://github.com/benbusby/farside/releases) [![MIT License](https://img.shields.io/github/license/benbusby/earthbound-themes.svg)](http://opensource.org/licenses/MIT) [![Elixir CI](https://github.com/benbusby/privacy-revolver/actions/workflows/elixir.yml/badge.svg)](https://github.com/benbusby/privacy-revolver/actions/workflows/elixir.yml) + [![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy) + + + + + +
SourceHutGitHub
+ +
+ A redirecting service for FOSS alternative frontends. [Farside](https://farside.link) provides links that automatically redirect to @@ -43,23 +58,80 @@ Farside's links work with the following structure: `farside.link// + + Service + Page + Farside Link + + + Libreddit + /r/popular + https://farside.link/libreddit/r/popular + + + Teddit + /r/popular + https://farside.link/teddit/r/popular + + + Nitter + User Profile + https://farside.link/nitter/josevalim + + + Invidious + Home Page + https://farside.link/invidious + + + Piped + Video Page + https://farside.link/piped/watch?v=eBGIQ7ZuuiU + + + Bibliogram + User Profile + https://farside.link/bibliogram/u/kbdfans + + + Whoogle + Search "Elixir" + https://farside.link/whoogle/search?q=elixir&lang_interface=en + + + SearX + Search "Redis" + https://farside.link/searx/search?q=redis + + + SearXNG + Search "EFF" + https://farside.link/searxng/search?q=EFF + + + SimplyTranslate + Translate "hola" + https://farside.link/simplytranslate/?engine=google&text=hola + + + Lingva + Translate "bonjour" + https://farside.link/lingva/auto/en/bonjour + + + Rimgo + View photo album + https://farside.link/rimgo/a/H8M4rcp + + + Scribe + View Medium post + https://farside.link/scribe/@ftrain/big-data-small-effort-b62607a43a8c + + -This table doesn't include all available services. For a complete list of supported frontends, see: https://farside.link +Note: This table doesn't include all available services. For a complete list of supported frontends, see: https://farside.link Farside also accepts URLs to "parent" services, and will redirect to an appropriate front end service, for example: @@ -138,6 +210,7 @@ goes against what Farside is trying to solve. Use at your own discretion. ### Environment Variables + | Name | Purpose | | -- | -- | | FARSIDE_TEST | If enabled, bypasses the instance availability check and adds all instances to the pool. | @@ -145,3 +218,26 @@ goes against what Farside is trying to solve. Use at your own discretion. | FARSIDE_TIMEOUT | The default timeout to wait for the url (default: `8000`) | | FARSIDE_SERVICES_JSON | The "services" JSON file to use for selecting instances (default: `services.json`) | | FARSIDE_SERVICES_JSON_DATA | The "services" JSON file to use for selecting instances base64 encoded | + + + + + + + + + + + + + + + + + + + + + + +
NamePurpose
FARSIDE_TESTIf enabled, bypasses the instance availability check and adds all instances to the pool.
FARSIDE_PORTThe port to run Farside on (default: `4001`)
FARSIDE_REDIS_PORTThe Redis server port to use (default: `6379`, same as the default for Redis)
FARSIDE_SERVICES_JSONThe "services" JSON file to use for selecting instances (default: `services.json`)
diff --git a/index.eex b/index.eex index a2e3c05..b84636d 100644 --- a/index.eex +++ b/index.eex @@ -18,7 +18,7 @@ border: 1px dashed; } a:link, a:visited { - color: #66397C; + color: #66397C; } @media only screen and (max-width: 1000px) { #child-div { @@ -33,7 +33,7 @@
-

Farside | View on GitHub

+

Farside [SourceHut, GitHub]


Last synced <%= DateTime.truncate(last_updated, :second) %> UTC

diff --git a/lib/farside.ex b/lib/farside.ex index 4b30fff..a14690c 100644 --- a/lib/farside.ex +++ b/lib/farside.ex @@ -15,7 +15,7 @@ defmodule Farside do @gtranslate_regex ~r/translate.google.com|lingva/ @tiktok_regex ~r/tiktok.com|proxitok/ @imdb_regex ~r/imdb.com|libremdb/ - @quora_regex ~r/quora.com|querte/ + @quora_regex ~r/quora.com|quetre/ @parent_services %{ @youtube_regex => ["invidious", "piped"], @@ -29,7 +29,7 @@ defmodule Farside do @gtranslate_regex => ["lingva"], @tiktok_regex => ["proxitok"], @imdb_regex => ["libremdb"], - @quora_regex => ["querte"] + @quora_regex => ["quetre"] } alias Farside.LastUpdated diff --git a/services-full.json b/services-full.json index 69cca5b..bf427b8 100644 --- a/services-full.json +++ b/services-full.json @@ -69,13 +69,19 @@ "test_url": "/u/officialrickastley", "fallback": "https://bibliogram.art", "instances": [ - "https://bibliogram.art", - "https://bibliogram.snopyta.org", - "https://bibliogram.pussthecat.org", + "https://bib.actionsack.com", "https://bibliogram.1d4.us", + "https://bibliogram.art", + "https://bibliogram.froth.zone", + "https://bibliogram.priv.pw", + "https://bibliogram.privacydev.net", + "https://bibliogram.pussthecat.org", + "https://bibliogram.snopyta.org", + "https://ig.beparanoid.de", + "https://ig.funami.tech", + "https://ig.tokhmi.xyz", "https://insta.trom.tf", - "https://bibliogram.hamster.dance", - "https://bib.actionsack.com" + "https://insta.tromdienste.de" ] }, { @@ -132,13 +138,11 @@ "https://nitter.kavin.rocks", "https://nitter.vxempire.xyz", "https://nitter.unixfox.eu", - "https://nitter.domain.glass", "https://nitter.eu", "https://nitter.namazso.eu", "https://nitter.mailstation.de", - "https://nitter.actionsack.com", + "https://n.actionsack.com", "https://nitter.cattube.org", - "https://birdsite.xanny.family", "https://nitter.hu", "https://nitter.exonip.de", "https://twitr.gq", @@ -149,7 +153,6 @@ "https://nitter.grimneko.de", "https://nitter.koyu.space", "https://nitter.ir", - "https://nitter.autarkic.org", "https://n.0x0.st", "https://n.hyperborea.cloud", "https://nitter.ca", @@ -158,7 +161,8 @@ "https://nitter.bus-hit.me", "https://nttr.stream", "https://de.nttr.stream", - "https://n.l5.ca" + "https://n.l5.ca", + "https://unofficialbird.com" ] }, { @@ -170,7 +174,8 @@ "https://scribe.nixnet.services", "https://scribe.citizen4.eu", "https://scribe.bus-hit.me", - "https://scribe.froth.zone" + "https://scribe.froth.zone", + "https://scribe.esmailelbob.xyz" ] }, { @@ -243,17 +248,17 @@ "test_url": "/search?q=<%=query%>", "fallback": "https://searx.be", "instances": [ + "https://anon.sx", "https://dynabyte.ca", + "https://northboot.xyz", "https://search.neet.works", "https://searx.divided-by-zero.eu", "https://searx.gnu.style", - "https://searx.rasp.fr", "https://searx.ru", "https://searx.sp-codes.de", "https://searx.stuehieyr.com", "https://searx.tuxcloud.net", "https://searx.tyil.nl", - "https://searx.webheberg.info", "https://searx.xyz", "https://www.webrats.xyz" ] @@ -274,7 +279,7 @@ "https://s.frlt.one", "https://s.zhaocloud.net", "https://saber.tk", - "https://search.ashs.club", + "https://search.0relay.com", "https://search.bus-hit.me", "https://search.chemicals-in-the-water.eu", "https://search.gcomm.ch", @@ -282,7 +287,6 @@ "https://search.neet.works", "https://search.ononoki.org", "https://search.privacyguides.net", - "https://search.projectsegfau.lt", "https://search.rabbit-company.com", "https://search.sapti.me", "https://search.teamriverbubbles.com", @@ -294,6 +298,7 @@ "https://searx.ebnar.xyz", "https://searx.ericaftereric.top", "https://searx.fmac.xyz", + "https://searx.kujonello.cf", "https://searx.mha.fi", "https://searx.mistli.net", "https://searx.namejeff.xyz", @@ -303,14 +308,16 @@ "https://searx.slipfox.xyz/searx", "https://searx.tiekoetter.com", "https://searx.vimproved.me", - "https://searx.youshitsune.me", "https://searx.zcyph.cc", "https://searxng.tordenskjold.de", "https://searxng.zackptg5.com", "https://serx.ml", + "https://sh0.it", "https://swag.pw", + "https://www.higgssearch.com", "https://www.webrats.xyz", - "https://xcxc.ml" + "https://xcxc.ml", + "https://xo.wtf" ] }, { @@ -365,7 +372,7 @@ ] }, { - "type": "querte", + "type": "quetre", "test_url": "/How-does-the-Z-boson-decay", "fallback": "https://quetre.herokuapp.com", "instances": [ @@ -381,7 +388,7 @@ }, { "type": "libremdb", - "test_url": "/title/tt0133093/", + "test_url": "/title/tt0133093", "fallback": "https://libremdb.herokuapp.com", "instances": [ "https://libremdb.herokuapp.com", diff --git a/services.json b/services.json index 827a61a..ea5ce7d 100644 --- a/services.json +++ b/services.json @@ -12,9 +12,9 @@ "https://reddit.artemislena.eu", "https://libreddit.some-things.org", "https://reddit.stuehieyr.com", - "https://lr.mint.lgbt", "https://libreddit.igna.rocks", "https://libreddit.autarkic.org", + "https://libreddit.flux.industries", "https://libreddit.de", "https://libreddit.bus-hit.me" ] @@ -45,12 +45,16 @@ "test_url": "/u/officialrickastley", "fallback": "https://bibliogram.art", "instances": [ - "https://bibliogram.art", - "https://bibliogram.snopyta.org", - "https://bibliogram.pussthecat.org", "https://bibliogram.1d4.us", + "https://bibliogram.art", + "https://bibliogram.froth.zone", + "https://bibliogram.priv.pw", + "https://bibliogram.privacydev.net", + "https://bibliogram.pussthecat.org", + "https://bibliogram.snopyta.org", + "https://ig.beparanoid.de", "https://insta.trom.tf", - "https://bibliogram.hamster.dance" + "https://insta.tromdienste.de" ] }, { @@ -103,15 +107,16 @@ "https://nitter.cattube.org", "https://twitr.gq", "https://bird.trom.tf", + "https://nitter.it", "https://nitter.grimneko.de", - "https://nitter.autarkic.org", "https://n.0x0.st", "https://n.hyperborea.cloud", "https://nitter.ca", "https://twitter.076.ne.jp", "https://nitter.sethforprivacy.com", "https://nitter.bus-hit.me", - "https://n.l5.ca" + "https://n.l5.ca", + "https://unofficialbird.com" ] }, { @@ -123,7 +128,8 @@ "https://scribe.nixnet.services", "https://scribe.citizen4.eu", "https://scribe.bus-hit.me", - "https://scribe.froth.zone" + "https://scribe.froth.zone", + "https://scribe.esmailelbob.xyz" ] }, { @@ -186,14 +192,13 @@ "test_url": "/search?q=<%=query%>", "fallback": "https://searx.be", "instances": [ + "https://anon.sx", "https://dynabyte.ca", "https://search.neet.works", "https://searx.divided-by-zero.eu", - "https://searx.rasp.fr", "https://searx.ru", "https://searx.sp-codes.de", "https://searx.stuehieyr.com", - "https://searx.tuxcloud.net", "https://searx.tyil.nl", "https://searx.webheberg.info", "https://searx.xyz" @@ -207,10 +212,10 @@ "https://darmarit.org/searx", "https://de.xcxc.ml", "https://jackgoss.xyz", - "https://northboot.xyz", "https://priv.au", "https://s.zhaocloud.net", "https://saber.tk", + "https://search.0relay.com", "https://search.ashs.club", "https://search.bus-hit.me", "https://search.chemicals-in-the-water.eu", @@ -227,13 +232,13 @@ "https://searx.ebnar.xyz", "https://searx.ericaftereric.top", "https://searx.fmac.xyz", + "https://searx.mha.fi", "https://searx.mistli.net", "https://searx.priv.pw", "https://searx.prvcy.eu", "https://searx.sev.monster", "https://searx.slipfox.xyz/searx", "https://searx.tiekoetter.com", - "https://searx.youshitsune.me", "https://searxng.tordenskjold.de", "https://serx.ml", "https://swag.pw", @@ -288,7 +293,7 @@ ] }, { - "type": "querte", + "type": "quetre", "test_url": "/How-does-the-Z-boson-decay", "fallback": "https://quetre.herokuapp.com", "instances": [ @@ -303,7 +308,7 @@ }, { "type": "libremdb", - "test_url": "/title/tt0133093/", + "test_url": "/title/tt0133093", "fallback": "https://libremdb.herokuapp.com", "instances": [ "https://libremdb.herokuapp.com", diff --git a/tools/un-cloudflare.sh b/tools/un-cloudflare.sh index 690dd73..dd5c716 100755 --- a/tools/un-cloudflare.sh +++ b/tools/un-cloudflare.sh @@ -7,9 +7,11 @@ file="services-full.json" while read -r line; do if [[ "$line" == "\"https://"* ]]; then domain=$(echo "$line" | sed -e "s/^\"https:\/\///" -e "s/\",//" -e "s/\"//") - ns=$(dig ns "$domain") + ns=$(dig ns "$domain" || true) if [[ "$ns" == *"cloudflare"* ]]; then echo "\"$domain\" using cloudflare, skipping..." + elif [[ "$ns" != *"NOERROR"* ]]; then + echo "Unable to verify records for \"$domain\", skipping..." else echo "$line" >> out.json fi @@ -19,8 +21,7 @@ while read -r line; do done <$file # Remove any trailing commas from new instance lists -sed -i '' -e ':begin' -e '$!N' -e 's/,\n]/\n]/g' -e 'tbegin' -e 'P' -e 'D' out.json +sed -i -e ':begin' -e '$!N' -e 's/,\n]/\n]/g' -e 'tbegin' -e 'P' -e 'D' out.json cat out.json | jq --indent 2 . > services.json -rm out.json - +rm -f out.json