Commit Graph

38 Commits

Author SHA1 Message Date
Ben Busby 7693a6b063
Add env var for toggling cron task on/off
FARSIDE_CRON allows turning on/off the scheduled instance availability
check that occurs every 5 minutes by setting the variable to 1 (on) or 0
(off). The default behavior is "on".
2023-07-17 17:46:39 -06:00
Ben Busby 9eb11ed264
Allow compiling to standalone binary via bakeware
This introduces a simple way of compiling Farside to a somewhat portable,
standalone binary. The resulting binary isn't completely portable since it
depends on the C runtime of the host system. As a result, it's advised to use
systems with older library versions when compiling for true portability.

Closes #50

Co-authored-by: Jason Clark <mithereal@gmail.com>
2023-03-22 11:56:22 -06:00
Ben Busby e58d6e23ed
Remove Redis dep, replace w/ native Elixir lib
This removes the dependency on Redis for core app functionality. Rather
than using the key/value store provided by Redis, Farside now uses a
key/val store provided by [cubdb](https://github.com/lucaong/cubdb) for
identical functionality but without reliance on a non-Elixir service.

This solution was chosen instead of ets, because storing instance data
in memory leads to a period of broken functionality whenever the app
restarts and hasn't re-populated instance data yet. It was also chosen
instead of dets, because the documentation for dets was pretty hard to
understand at first glance.

Tests and the CI build were updated to reflect the removed dependency on
Redis.

New environment variable `FARSIDE_DATA_DIR` can be used to point to a
directory where the instance data can be stored by cubdb.

Co-authored-by: Jason Clark <mithereal@gmail.com>
2022-10-31 16:45:31 -06:00
notarun 36162de575
Fix `packages.debian.org` readme link [skip ci] (#65) 2022-09-30 14:20:57 -06:00
Ben Busby a0a3f01847
Include link to browser extension setup in readme 2022-09-22 14:35:40 -06:00
Ben Busby 0b2e554deb
Remove bibliogram from readme [skip ci] 2022-09-15 11:20:53 -06:00
Ben Busby 768351cfc3
Add sr.ht link to index list view, update instance list 2022-08-03 10:58:22 -06:00
Ben Busby 80698331cb
Fix readme logo spacing [skip ci] 2022-08-02 13:33:20 -06:00
Ben Busby 3be0c1b992
Remove leftover markdown table in readme [skip ci] 2022-08-02 13:26:22 -06:00
Ben Busby ddd89ac8e8
Use html tables in readme [skip ci]
Sourcehut doesn't support markdown table formatting, but does support
html tables.
2022-08-02 13:25:12 -06:00
uranuspucksaxophone 7b36eaac59
Center README.md logo and badges [skip ci] (#56) 2022-08-02 09:20:26 -06:00
Ben Busby 3597799cf3
Add note about Cloudflare to readme [skip ci] 2022-07-27 15:46:07 -06:00
Ben Busby a6dabe8bf3
Make conn values and services path configurable at runtime
Connection values (such as redis server port and the port to run farside
on) as well as the services json file to use can now be set via
environment variables:

FARSIDE_PORT sets the port for Farside to run on
FARSIDE_REDIS_PORT sets the redis server port for Farside to use
FARSIDE_SERVICES_JSON sets the services json file for Farside to use

This partially addresses the move towards de-listing Cloudflare
instances by default by allowing different services json files to be
used with different redis servers.

See #43
2022-07-27 13:53:33 -06:00
Ben Busby 58e9fa572a
Add note to demo table in readme
The demo table doesn't include all available services that are supported by
Farside, and likely shouldn't anyways since it already clutters up the readme a
bit. The existing demos should give a good enough idea of how Farside works and
how to use it.
2022-06-21 16:17:39 -06:00
Ben Busby 4590170a61
Include new URL functionality in readme 2022-06-09 17:11:09 -06:00
invokah c1ed4ff60d
Add required debian package to README [skip ci] (#35)
Add a required package (erlang dev) for debian people hoping to run farside
themselves
2022-05-18 16:55:23 -06:00
Ben Busby 20347822da
Support SearXNG
Added a new seperate service for only redirecting to SearXNG instances.
Note that plain "searx" redirects will use both SearX and SearXNG
instances for those who don't have a preference between the two.

Closes #23
2022-03-18 13:28:45 -06:00
Ben Busby 9e0b026e47
Add Scribe to examples in readme
Closes #22
2022-03-14 12:15:19 -06:00
Ben Busby 51aba2ad78
Remove redis config file from command in readme
Specifying the default redis.conf file is not required, and should be excluded
from the project documentation.
2022-02-14 10:40:46 -07:00
Ben Busby 932f3bbcab
Preserve redirect with `/_/` path prefix (#13)
This adds a straightforward way of preserving Farside's redirecting
behavior in the user's browser history. That way if an instance becomes
unavailable between the 5 min scans, the user can opt to navigate back
one page and be taken to a new instance.

This is accomplished using a single line of JS, and could potentially
work as the default behavior of Farside (with the current default
behavior requiring a path prefix instead). This should be revisited down
the road when more people are using this service.
2022-01-27 11:57:41 -07:00
Ben Busby ae5d4a4c03
Support imgur alternatives
- Imgin (only one instance)
  - https://git.voidnet.tech/kev/imgin/
- Rimgo
  - https://codeberg.org/video-prize-ranch/rimgo

Closes #11
2022-01-26 09:59:32 -07:00
Ben Busby 1fb9051ae1
Broaden HTTPoison status code inspection
Rather than enforcing a 200 status code, the instance query is deemed a
success if the status code is <400. Various services return 200-399
status codes that don't necessarily indicate an error, but may have to
do with how the instance was configured.
2021-12-28 12:33:04 -07:00
Ben Busby bf20703ee0
Set `lang_interface=en` param in whoogle demo
Should avoid issues where the default configured language for a particular
instance isn't english (which is the assumed language in the demo).
2021-12-21 00:01:36 -07:00
Ben Busby 0745b814a5
Support lingva translate service
https://github.com/TheDavidDelta/lingva-translate
2021-12-17 09:45:06 -07:00
Ben Busby 720b049838
Clarify demo links in readme 2021-12-16 09:24:14 -07:00
Ben Busby 5dda963b29
Add piped instance, update demos in readme 2021-12-16 09:21:38 -07:00
Ben Busby 1092350fcd
Remove `FARSIDE_NO_ROUTER` env var
The FARSIDE_NO_ROUTER variable wasn't terribly useful after refactoring
the app to include the update routine internally (rather than available
externally as an elixir script).

Now the only supported environment variable is FARSIDE_TEST, which is
still useful for tests and quick validation of functionality.
2021-12-09 15:33:58 -07:00
Ben Busby ff97d258f0
Use quantum core for update scheduling
Rather than requiring a traditional crontab install, the app now
leverages quantum-core (link below) to schedule the instance update/sync
task every 5 minutes. Some updates as a result:

  - The new job is scheduled at runtime in server.ex.
  - The update.exs script was refactored to be compiled along with the
    rest of the app as instances.ex.
  - Scheduler and Server modules were added for creating and executing
    the new update task
  - All shell scripts were removed, as they are no longer needed

https://github.com/quantum-elixir/quantum-core
2021-11-24 09:35:21 -07:00
Ben Busby d4581797e7
Allow bypassing app router with `FARSIDE_NO_ROUTER`
Setting the aforementioned env var skips creation of the app router,
which is useful for running update.exs when the main app is already
running (otherwise there's a port conflict).
2021-11-15 20:09:34 -07:00
Ben Busby 5904c7cce4
Add searx example to demo table 2021-11-15 19:07:06 -07:00
Ben Busby d35c358d80
Add Whoogle example to demo table in readme 2021-11-15 17:41:33 -07:00
Ben Busby c627f4d402
Update readme
Expanded readme to include a demo, a "how it works" section, and a general
overview of Farside's purpose.
2021-11-12 18:51:50 -07:00
Ben Busby 1ea7fdd2ec
Convert logo to SVG 2021-11-12 17:04:34 -07:00
Ben Busby 1908c56ec6
Update README.md 2021-11-08 17:32:55 -07:00
Ben Busby 2fec7e77a2
Add readme banner 2021-11-08 17:30:45 -07:00
Ben Busby 8042dcad0c
Refactor project to new name
The name of the project is being refactored from Privacy Revolver to
Farside. The reasoning behind this is:
1. A shorter name is easier to remember
2. It can stand for "FOSS alternative redirecting service" (which I know
doesn't encapsulate all letters from "farside", but it's close enough).

This commit also includes improvements to the update script for
determining how far along the script is.
2021-11-07 12:29:06 -07:00
Ben Busby a209ce2b13
Add CI status to readme, update description 2021-10-26 21:26:09 -06:00
Ben Busby be9606094c
Initial commit 2021-10-21 15:50:04 -06:00