blob: 91ea929ee7ae512c33ab501ed81ef7de63c70596 (
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
# September
[](https://github.com/gemrest/september/actions/workflows/check.yaml)
A simple and efficient Gemini-to-HTTP proxy written in Rust.
## Usage
### Docker
```shell
$ docker run -d [ -e ROOT="gemini://fuwn.me" ] [ -e PORT="8080"] [ -e CSS_EXTERNAL="https://example.com/style.css"] fuwn/september:latest
```
### Docker Compose
Edit the `docker-compose.yaml` file to your liking, and then
```shell
$ docker-compose up -d
```
### Executable
```shell
$ [ ROOT="gemini://fuwn.me" ] [ PORT="8080"] [ CSS_EXTERNAL="https://example.com/style.css"] ./september
```
or use a `.env` file
```dotenv
# .env
ROOT=gemini://fuwn.me
PORT=8080
CSS_EXTERNAL=https://example.com/style.css
```
and then
```shell
$ ./september
```
## Configuration
Configuration for September is done solely via environment variables, for
simplicity, and Docker support.
### `PORT`
Bind September to a custom port.
Generally, you shouldn't touch this if you are deploying using Docker.
If no `PORT` is provided or the `PORT` could not be properly parsed as a `u16`;
port `80` will be assumed.
```dotenv
PORT=8080
```
### `ROOT`
The root Gemini capsule to proxy when not visiting a "/proxy" route.
If no `ROOT` is provided, `"gemini://fuwn.me"` will be assumed.
```dotenv
ROOT=gemini://fuwn.me
```
### `CSS_EXTERNAL`
An external CSS file to apply to the HTML response.
If no `CSS_EXTERNAL` is provided, there will be no styling done to the HTML
response.
```dotenv
CSS_EXTERNAL=https://cdnjs.cloudflare.com/ajax/libs/mini.css/3.0.1/mini-default.min.css
```
### `KEEP_GEMINI_EXACT`
Keeps exactly matching URLs as a Gemini URL.
#### Examples
If `KEEP_GEMINI_EXACT` is equal to `KEEP_GEMINI_EXACT=gemini://fuwn.me/gemini`,
all routes will be proxied their "/proxy" equivalent (e.g.,
"https://fuwn.me/proxy/fuwn.me/gopher"), except occurrences of
"gemini://fuwn.me/skills" will be kept as is.
```dotenv
KEEP_GEMINI_EXACT=gemini://fuwn.me/skills
```
### `KEEP_GEMINI_DOMAIN`
Similar to `KEEP_GEMINI_EXACT`, except proxies based on entire domains instead
of exact matches.
```dotenv
KEEP_GEMINI_DOMAIN=fuwn.me
```
### `PROXY_BY_DEFAULT`
Control weather or not all Gemini URLs will be proxied.
Similar to `KEEP_GEMINI_EXACT` and `KEEP_GEMINI_DOMAIN` but global.
Defaults to `true`.
```dotenv
PROXY_BY_DEFAULT=false
```
## Capsules using September
[Add yours!](https://github.com/gemrest/september/edit/main/README.md)
- <https://fuwn.me/>
- <https://gem.rest/>
## License
This project is licensed with the
[GNU General Public License v3.0](https://github.com/gemrest/september/blob/main/LICENSE).
|