aboutsummaryrefslogtreecommitdiff
path: root/README.rst
blob: 0693d4288edc57de3b2d932a744525d2daa9bea9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Capybara
========

This is an `HTTP <https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol>`__
to `Gemini <https://gemini.circumlunar.space/>`__ proxy designed to provide
service for a single domain, i.e. to make your Gemini site available over HTTP.
It can proxy to any domain in order to facilitate linking to the rest of
Geminispace, but it defaults to a specific domain.

Usage
-----

.. code-block:: shell

  $ go build
  $ ./capybara [-b 127.0.0.1:8080] [-s style.css] [-e style.css] gemini://fuwn.space

-b
~~

The -b argument is optional and allows you to bind to an arbitrary address; by
default Capybara will bind to :code:`:8080`. You should set up some external
reverse proxy like nginx to forward traffic to this port and add TLS.

-s
~~

The -s argument is optional and allows you to specify a custom CSS filename.
The given file will be loaded from the local disk and placed in a
:code:`<style>` block. By default Capybara will serve its built-in style.

-e
~~

The -e argument is optional and allows you to specify a custom CSS URL. If
provided, the style.css given will be treated as a link to be put in the href
of a :code:`<link rel="stylesheet"...>` instead of being placed inline with the
body in a :code:`<style>` block like with the -s flag. The given stylesheet can
be a relative link, for instance :code:`-e /main.css` will serve
:code:`main.css` from the root of the proxied Gemini capsule.

Docker
------

.. code-block:: shell

  $ docker run -d -e ROOT='gemini://fuwn.space' [-e BIND='127.0.0.1:8080'] [-e CSS='style.css'] [-e CSS_EXTERNAL='style.css'] fuwn/capybara

Docker Compose
--------------

Edit the :code:`docker-compose.yml` file to your liking, then...

.. code-block:: shell

  $ docker-compose up -d

License
~~~~~~~

`GNU General Public License v3.0 <./LICENSE>`__