secretshop/README.md

97 lines
3.8 KiB
Markdown
Raw Permalink Normal View History

2020-02-21 21:13:54 +00:00
# SecretShop: a small Gemini server.
2020-02-13 01:29:32 +00:00
2022-05-17 16:21:04 +00:00
## NOTE
I haven't worked on this in a while and it may not be up to date with the Gemini spec.
2020-02-21 21:13:54 +00:00
## Features
2020-02-19 20:26:46 +00:00
* Multi-site hosting
2020-02-20 22:03:34 +00:00
* Also supports simple Gopher hosting
2020-02-13 01:52:11 +00:00
* Fully compliant with Jetforce diagnostics
* Client Certificates
2020-02-13 01:52:11 +00:00
* Probably won't kill your computer
2020-02-13 01:29:32 +00:00
2020-05-15 00:34:07 +00:00
## Where to get it
git clone https://git.saintnet.tech/stryan/secretshop.git
I also release binaries at https://build.opensuse.org/project/show/home:stryan
2020-05-15 01:17:26 +00:00
The release tab also has pre-generated archives if you don't want to run master.
2020-02-21 21:13:54 +00:00
## Configuration
2020-02-13 01:29:32 +00:00
SecretShop looks in it's current running directory and /etc/secretshop for it's config file.
Configuration is in a file labeled "config.yaml" in one of the above directories. See the sample config for more details.
A standard file looks like such:
2020-02-13 01:29:32 +00:00
2020-02-21 21:13:54 +00:00
---
2020-02-22 21:17:38 +00:00
port: 1965
2020-02-21 21:13:54 +00:00
active_capsules:
- localhost
localhost:
Hostname: "localhost"
Port: "1965"
RootDir: "/var/gemini"
CGIDir: "/var/gemini/cgi"
KeyFile: "localhost.key"
CertFile: "localhost.crt"
AccessControl:
Identified:
- /id
Known:
- /known
Trusted:
- /private
Whitelist: "whitelist"
2020-06-09 16:38:00 +00:00
Lang: "en"
Where each "active_capsule" is a virtual Gemini capsule. SecretShop supports virtual Gemini capsules all listening on port 1965.
By default, a capsule requires the Hostname, Root Directory, Keyfile, and CertFile to start properly. The capsule also needs to be listed in the "active_capsules" list.
Each capsule can optionally have a "AccessControl" section for use with client certificates. AccessControl is broken up into three zones:
Identified: Requires a client to present a certificate of some kind to access. Currently not validate certificate. Response code 60
Known: Reserved for transient certificates; currently not fully implemented. Reponse code 61
Trusted: Requires a client to present a certificate who's fingerprint matches an entry in the Whitelist file. Currently checks validity dates and the fingerprint. Response codes 62-65
2020-02-13 01:29:32 +00:00
For the Trusted zone, a Whitelist section must exist, with a path leading to the whitelist file. The whitelist file is a text file containing Certificate fingerprints, one for line. This is used
to authenticate client certificates.
If you want full logging (i.e. you're not using systemd, rsyslog, something that auto adds timestamps and program names etc) you can add the "full_logging: true" option.
2020-02-22 21:17:38 +00:00
2020-06-09 16:38:00 +00:00
SecretShop supports specifying what language a Gemini capsule uses for content. See section 5.2 of the Gemini spec for more details. This is set per vhost.
2020-02-21 21:13:54 +00:00
## Building
2020-04-27 20:02:23 +00:00
Build Dependencies: go1.14
2020-02-21 21:13:54 +00:00
Running "make" should work for any given x86 machine.
If you're planning on running this on a Raspberry Pi or other ARM machine try
env GOOS=linux GOARCH=arm GOARM=5 make
## Installation
Running "make install" will install to /usr//bin by default and will attempt to install the systemd service file
2020-02-21 21:10:08 +00:00
2020-02-21 21:13:54 +00:00
## Uninstall
Run "make uninstall".
2020-02-21 21:10:08 +00:00
2020-02-21 21:13:54 +00:00
## Running
Either run the executable directly or use the Systemd unit file.
2020-04-27 20:01:08 +00:00
## Caveats
2020-05-14 22:17:44 +00:00
Currently does not support transient certificates
Only handles whitelisting for certificate authorization
2020-05-14 23:49:10 +00:00
## Licensing
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.