mirror of
https://gitlab.com/ivancmonaco/yags.git
synced 2025-12-28 21:15:21 -03:00
Yet Another Gemini Server - A gemini protocol server
| build | ||
| contracts | ||
| lib | ||
| mocks | ||
| server | ||
| .gitignore | ||
| go.mod | ||
| go.sum | ||
| main.go | ||
| Makefile | ||
| README.md | ||
YAGS
Yet Another Gemini Server
./build/yags --help
Usage of ./build/yags:
--domain string
domain to use - must match certificate's dns SAN (default "localhost")
-root-dir string
root dir for static content (default "/home/arthur/go/proj/yags/static")
--cgi-dir string
root dir for cgi content (default "/home/arthur/go/proj/yags/cgi")
--certificate string
the server's certificate (default "sv.crt")
--key string
the server's public key (default "sv.key")
--enable-logging
enable logging (default true)
--enable-ip-logging
enable IP logging (default false)
--log-file string
log to a file
Example usage
First Generate self signed certificate for your server (replace localhost with your production address):
openssl req \
-new -newkey ec -pkeyopt ec_paramgen_curve:P-256 -nodes \
-x509 -sha256 -days 3650 \
-keyout sv.key -out sv.crt \
-subj "/CN=localhost" \
-addext "subjectAltName=DNS:localhost" \
-addext "basicConstraints=CA:FALSE" \
-addext "keyUsage=digitalSignature" \
-addext "extendedKeyUsage=serverAuth"
chmod 600 sv.key sv.crt
Then run the server:
./yags --domain mydomain.com --root-dir ./static --cgi-dir ./cgi --certificate sv.cert --key sv.key --enable-logging --enable-ip-logging --log-file log.out