<feed xmlns='http://www.w3.org/2005/Atom'>
<title>farside/test, branch main</title>
<subtitle>Farside fork</subtitle>
<link rel='alternate' type='text/html' href='https://grim.freemyip.com/cgit/farside/'/>
<entry>
<title>Rewrite project, add daily update of services list</title>
<updated>2025-01-21T20:46:29+00:00</updated>
<author>
<name>Ben Busby</name>
<email>contact@benbusby.com</email>
</author>
<published>2025-01-21T20:46:29+00:00</published>
<link rel='alternate' type='text/html' href='https://grim.freemyip.com/cgit/farside/commit/?id=b5bad4defc6c75b9b969658229ce5fd2f3a46107'/>
<id>b5bad4defc6c75b9b969658229ce5fd2f3a46107</id>
<content type='text'>
The project was rewritten from Elixir to Go, primarily because:

- I don't write Elixir anymore and don't want to maintain a project in a
  language I no longer write
- I already write Go for other projects, including my day job, so it's
  a safer bet for a project that I want to maintain long term
- Go allows me to build portable executables that will make it easier
  for others to run farside on their own machines

The Go version of Farsside also has a built in task to fetch the latest
services{-full}.json file from the repo and ingest it, which makes
running a farside server a lot simpler.

It also automatically fetches the latest instance state from
https://farside.link unless configured as a primary farside node, which
will allow others to use farside without increasing traffic to all
instances that are queried by farside (just to the farside node itself).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The project was rewritten from Elixir to Go, primarily because:

- I don't write Elixir anymore and don't want to maintain a project in a
  language I no longer write
- I already write Go for other projects, including my day job, so it's
  a safer bet for a project that I want to maintain long term
- Go allows me to build portable executables that will make it easier
  for others to run farside on their own machines

The Go version of Farsside also has a built in task to fetch the latest
services{-full}.json file from the repo and ingest it, which makes
running a farside server a lot simpler.

It also automatically fetches the latest instance state from
https://farside.link unless configured as a primary farside node, which
will allow others to use farside without increasing traffic to all
instances that are queried by farside (just to the farside node itself).
</pre>
</div>
</content>
</entry>
<entry>
<title>Skip nitter in tests</title>
<updated>2024-04-19T18:12:43+00:00</updated>
<author>
<name>Ben Busby</name>
<email>contact@benbusby.com</email>
</author>
<published>2024-04-19T18:12:43+00:00</published>
<link rel='alternate' type='text/html' href='https://grim.freemyip.com/cgit/farside/commit/?id=4081ab63ce4a3838bb9dd2110fcda6dc160e4ad6'/>
<id>4081ab63ce4a3838bb9dd2110fcda6dc160e4ad6</id>
<content type='text'>
Nitter has been gone for a while, so it's now excluded from tests
related to redirecting functionality. Since other instances occasionally
pop up still, it's being kept in Farside for now.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Nitter has been gone for a while, so it's now excluded from tests
related to redirecting functionality. Since other instances occasionally
pop up still, it's being kept in Farside for now.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove Redis dep, replace w/ native Elixir lib</title>
<updated>2022-10-31T22:45:31+00:00</updated>
<author>
<name>Ben Busby</name>
<email>contact@benbusby.com</email>
</author>
<published>2022-10-31T22:45:31+00:00</published>
<link rel='alternate' type='text/html' href='https://grim.freemyip.com/cgit/farside/commit/?id=e58d6e23edd2cfc1da7feab3cfc2b09326b73bff'/>
<id>e58d6e23edd2cfc1da7feab3cfc2b09326b73bff</id>
<content type='text'>
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 &lt;mithereal@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 &lt;mithereal@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Make conn values and services path configurable at runtime</title>
<updated>2022-07-27T19:53:33+00:00</updated>
<author>
<name>Ben Busby</name>
<email>contact@benbusby.com</email>
</author>
<published>2022-07-27T19:50:23+00:00</published>
<link rel='alternate' type='text/html' href='https://grim.freemyip.com/cgit/farside/commit/?id=a6dabe8bf308b660f7a26e5d2dc702c69b9b5210'/>
<id>a6dabe8bf308b660f7a26e5d2dc702c69b9b5210</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Auto select frontend for links to "parent" service</title>
<updated>2022-06-09T19:08:01+00:00</updated>
<author>
<name>Ben Busby</name>
<email>contact@benbusby.com</email>
</author>
<published>2022-06-09T19:08:01+00:00</published>
<link rel='alternate' type='text/html' href='https://grim.freemyip.com/cgit/farside/commit/?id=5006b97dfa42f9338bc2ee7080b79d37d4343cfa'/>
<id>5006b97dfa42f9338bc2ee7080b79d37d4343cfa</id>
<content type='text'>
Farside now supports redirecting based on a provided link to a "parent"
service, if such a parent service is supported.

For example, a link such as:

farside.link/https://www.youtube.com/watch?v=dQw4w9WgXcQ

will now redirect to any of the available YouTube related frontends.

This works by matching against a mapping of "parent" service domains
("youtube.com", "reddit.com", etc) to a list of their respective frontend
alternatives (["invidious", "piped"], ["libreddit", "teddit"], etc). A
random element is chosen from this list, and the remainder of Farside's
routing logic proceeds as if the user had chosen the service directly to
begin with.

Closes #37
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Farside now supports redirecting based on a provided link to a "parent"
service, if such a parent service is supported.

For example, a link such as:

farside.link/https://www.youtube.com/watch?v=dQw4w9WgXcQ

will now redirect to any of the available YouTube related frontends.

This works by matching against a mapping of "parent" service domains
("youtube.com", "reddit.com", etc) to a list of their respective frontend
alternatives (["invidious", "piped"], ["libreddit", "teddit"], etc). A
random element is chosen from this list, and the remainder of Farside's
routing logic proceeds as if the user had chosen the service directly to
begin with.

Closes #37
</pre>
</div>
</content>
</entry>
<entry>
<title>Update throttle test to reflect new behavior</title>
<updated>2022-03-18T19:59:35+00:00</updated>
<author>
<name>Ben Busby</name>
<email>contact@benbusby.com</email>
</author>
<published>2022-03-18T19:59:35+00:00</published>
<link rel='alternate' type='text/html' href='https://grim.freemyip.com/cgit/farside/commit/?id=1be19a8a298aa0e25481491304e20322c85c97e7'/>
<id>1be19a8a298aa0e25481491304e20322c85c97e7</id>
<content type='text'>
The "throttling" performed by Farside now redirects to the same instance
as before, rather than outright blocking the connection.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The "throttling" performed by Farside now redirects to the same instance
as before, rather than outright blocking the connection.
</pre>
</div>
</content>
</entry>
<entry>
<title>Replace `poison` dependency w/ `jason`</title>
<updated>2022-02-14T18:21:32+00:00</updated>
<author>
<name>Ben Busby</name>
<email>contact@benbusby.com</email>
</author>
<published>2022-02-14T18:21:32+00:00</published>
<link rel='alternate' type='text/html' href='https://grim.freemyip.com/cgit/farside/commit/?id=5235f5a3bf620a787d0d2ee0021336c893ffa013'/>
<id>5235f5a3bf620a787d0d2ee0021336c893ffa013</id>
<content type='text'>
The dependency took a long time to compile, and was causing problems for
a user who was attempting to build the project.

Since it wasn't a strictly necessary dependency, and `jason` was already
included in the project, all instances of `poison` have been replaced
with `jason`.

The only additional code that this introduced was converting from
generic maps returned by `Jason.decode` into Service structs.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The dependency took a long time to compile, and was causing problems for
a user who was attempting to build the project.

Since it wasn't a strictly necessary dependency, and `jason` was already
included in the project, all instances of `poison` have been replaced
with `jason`.

The only additional code that this introduced was converting from
generic maps returned by `Jason.decode` into Service structs.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix formatting</title>
<updated>2021-11-12T21:40:05+00:00</updated>
<author>
<name>Ben Busby</name>
<email>noreply+git@benbusby.com</email>
</author>
<published>2021-11-12T21:40:05+00:00</published>
<link rel='alternate' type='text/html' href='https://grim.freemyip.com/cgit/farside/commit/?id=fec966ae59af3de1d1098ca11192041402c039cb'/>
<id>fec966ae59af3de1d1098ca11192041402c039cb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Test ip rate limiting / throttling</title>
<updated>2021-11-12T21:37:20+00:00</updated>
<author>
<name>Ben Busby</name>
<email>noreply+git@benbusby.com</email>
</author>
<published>2021-11-12T21:37:20+00:00</published>
<link rel='alternate' type='text/html' href='https://grim.freemyip.com/cgit/farside/commit/?id=3181bdfc80c1e712d84474f849408a6c5c22f20a'/>
<id>3181bdfc80c1e712d84474f849408a6c5c22f20a</id>
<content type='text'>
Tests the throttling feature from the previous commit
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Tests the throttling feature from the previous commit
</pre>
</div>
</content>
</entry>
<entry>
<title>Throttle incoming requests to 1/sec per ip</title>
<updated>2021-11-12T21:34:36+00:00</updated>
<author>
<name>Ben Busby</name>
<email>noreply+git@benbusby.com</email>
</author>
<published>2021-11-12T21:34:36+00:00</published>
<link rel='alternate' type='text/html' href='https://grim.freemyip.com/cgit/farside/commit/?id=2d988a1239bd9988d453df5baba75a610f979eb3'/>
<id>2d988a1239bd9988d453df5baba75a610f979eb3</id>
<content type='text'>
This introduces a way of throttling requests in a way that makes sense
for the purpose of the app. The app only supports redirecting to one
particular service when browsing, which would seldom be required more
than once per second for normal "human" browsing.

Without this, the service could easily be used to DOS multiple instances
at once. That being said, anyone concerned about someone DOS-ing
multiple instances at once should be aware that this would be trivial to
do with a simple bash script. This is simply a preventative measure to
hopefully deter people from trying to attack all public instances of
private frontends using farside.link.

Note that this throttling applies to all routes in the app, including
the homepage. This could be updated to exclude the homepage I guess,
but I'm not really sure what the use case would be for that.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This introduces a way of throttling requests in a way that makes sense
for the purpose of the app. The app only supports redirecting to one
particular service when browsing, which would seldom be required more
than once per second for normal "human" browsing.

Without this, the service could easily be used to DOS multiple instances
at once. That being said, anyone concerned about someone DOS-ing
multiple instances at once should be aware that this would be trivial to
do with a simple bash script. This is simply a preventative measure to
hopefully deter people from trying to attack all public instances of
private frontends using farside.link.

Note that this throttling applies to all routes in the app, including
the homepage. This could be updated to exclude the homepage I guess,
but I'm not really sure what the use case would be for that.
</pre>
</div>
</content>
</entry>
</feed>
