A wise redirecting gateway for numerous frontend companies
Contents
#About
A redirecting service for FOSS different frontends.
Farside gives hyperlinks that routinely redirect to
working cases of privacy-oriented different frontends, resembling Nitter,
Libreddit, and so on. This permits for customers to have extra dependable entry to the
accessible public cases for a selected service, whereas additionally serving to to
distribute visitors extra evenly throughout all cases and keep away from efficiency
bottlenecks and rate-limiting.
Farside additionally integrates easily with fundamental redirector extensions in most
browsers. For an easy instance setup,
refer to the wiki.
#Demo
Farside’s hyperlinks work with the next construction: farside.hyperlink/<service>/<path>
For instance:
Be aware: This desk would not embody all accessible companies. For an entire listing of supported frontends, see: https://farside.link
Farside additionally accepts URLs to “mum or dad” companies, and can redirect to an applicable entrance finish service, for instance:
#How It Works
The app runs with an internally scheduled cron job that queries all cases
for companies outlined in services.json each 5 minutes. For
every occasion, so long as the occasion takes <5 seconds to reply and returns
a profitable response code, the occasion is added to a listing of obtainable
cases for that exact service. If not, it’s discarded till the subsequent
replace interval.
Farside’s routing could be very minimal, with solely the next routes:
/
- The app dwelling web page, displaying all stay cases for each service
/:service/*glob
- The primary endpoint for redirecting a person to a working occasion of a
explicit service with the desired path - Ex:
/libreddit/r/well-liked
would navigate to<libreddit occasion URL>/r/well-liked
- If the service supplied is definitely a URL to a “mum or dad” service
(i.e. “youtube.com” as an alternative of “piped” or “invidious”), Farside
will decide the right frontend to make use of for the desired URL.
- If the service supplied is definitely a URL to a “mum or dad” service
- Be aware {that a} path is just not required.
/libreddit
for instance will nonetheless
redirect the person to a working libreddit occasion
- The primary endpoint for redirecting a person to a working occasion of a
/_/:service/*glob
- Achieves the identical redirect as the principle
/:service/*glob
endpoint, however
preserves a brief touchdown web page within the browser’s historical past to permit rapidly
leaping between cases by navigating again. - Ex:
/_/nitter
-> nitter occasion A -> (navigate again one web page) -> nitter
occasion B -> … - Be aware: Makes use of Javascript to protect the web page in historical past
- Achieves the identical redirect as the principle
When a service is requested with the /:service/...
endpoint, Farside requests
the listing of working cases from the db and returns a random one from the listing
and provides that occasion as a brand new entry within the db to take away from subsequent
requests for that service. For instance:
A person navigates to /nitter
and is redirected to nitter.web
. The following person
to request /nitter
shall be assured to not be directed to nitter.web
, and
will as an alternative be redirected to a separate (random) working occasion. That
occasion will now take the place of nitter.web
because the “reserved” occasion, and
nitter.web
shall be returned to the listing of obtainable Nitter cases.
This “reserving” of beforehand chosen cases is carried out in an try to
guarantee higher distribution of visitors to accessible cases for every service.
Farside additionally has built-in IP ratelimiting for all requests, implementing just one
request per second per IP.
#Relating to Cloudflare
Cases for every supported service which might be deployed behind Cloudflare are
not included when utilizing farside.link. If you need
to additionally entry cases that use Cloudflare (along with cases that do
not), you may both use cf.farside.link as an alternative, or
deploy your individual occasion of Farside and set
FARSIDE_SERVICES_JSON=services-full.json
when operating.
Should you do determine to make use of cf.farside.link or use the
full occasion listing supplied by services-full.json
, please remember that
Cloudflare takes steps to dam web site guests utilizing Tor (and a few VPNs), and
that their mission to centralize your entire net behind their service finally
goes towards what Farside is making an attempt to resolve. Use at your individual discretion.
#Improvement
To run Farside with out compiling, you may carry out the next steps:
- Set up dependencies:
combine deps.get
- Initialize db contents:
FARSIDE_CRON=0 combine run -e Farside.Cases.sync
- Run Farside:
combine run --no-halt
#Compiling
You possibly can create a standalone Farside app utilizing the steps beneath. Within the instance, the
Farside executable is copied to /usr/native/bin
, however might be moved to any most well-liked
vacation spot. Be aware that the executable nonetheless is dependent upon the C runtime of the machine
it’s constructed on, so in order for you a extra moveable binary, you must construct Farside on a
system with older library variations.
MIX_ENV=cli && combine deps.get && combine launch
cp _build/cli/rel/bakeware/farside /usr/native/bin
sudo chmod +x /usr/native/bin/farside
farside
#Setting Variables
Identify | Goal |
FARSIDE_TEST | If enabled, bypasses the occasion availability test and provides all cases to the pool. |
FARSIDE_PORT | The port to run Farside on (default: `4001`) |
FARSIDE_DATA_DIR | The trail to the listing to make use of for storing occasion information (default: `/tmp`) |
FARSIDE_SERVICES_JSON | The JSON file to make use of for choosing cases (default: `companies.json`) |
FARSIDE_CRON | Set to 0 to deactivate the scheduled occasion availability test (default on). |