Bunkum.Protocols.Gemini 4.5.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package Bunkum.Protocols.Gemini --version 4.5.2
                    
NuGet\Install-Package Bunkum.Protocols.Gemini -Version 4.5.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Bunkum.Protocols.Gemini" Version="4.5.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Bunkum.Protocols.Gemini" Version="4.5.2" />
                    
Directory.Packages.props
<PackageReference Include="Bunkum.Protocols.Gemini" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Bunkum.Protocols.Gemini --version 4.5.2
                    
#r "nuget: Bunkum.Protocols.Gemini, 4.5.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Bunkum.Protocols.Gemini&version=4.5.2
                    
Install as a Cake Addin
#tool nuget:?package=Bunkum.Protocols.Gemini&version=4.5.2
                    
Install as a Cake Tool

Bunkum.Protocols.Gemini

Gemini protocol support for Bunkum

Usage

using Bunkum.Core;
using Bunkum.Protocols.Gemini;

BunkumServer server = new BunkumGeminiServer(null, new LoggerConfiguration
{
    Behaviour = new QueueLoggingBehaviour(),
    #if DEBUG
    MaxLevel = LogLevel.Trace,
    #else
    MaxLevel = LogLevel.Info,
    #endif
});

server.Initialize = s =>
{
    s.DiscoverEndpointsFromAssembly(Assembly.GetExecutingAssembly());
};

server.Start();
await Task.Delay(-1);

Generating an SSL/TLS certificate

Gemini does not support unencrypted transport by design. To test locally, you must create a certificate. Bunkum cannot create one for you, but common tools like OpenSSL can do this for you.

Linux

First, create a private key/certificate pair. Change "localhost" to your FQDN if you'd like to use a self-signed certificate externally.

openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes -subj "/CN=localhost"

Then, convert your pair to a .pfx file that Bunkum can use:

openssl pkcs12 -export -out cert.pfx -inkey key.pem -in cert.pem

Hopefully, you should now have a file named cert.pfx that Bunkum can use.

Windows

TODO

Configuration

The BunkumGeminiServer allows a SSL configuration in the constructor. If one is not provided, it will default to creating a json config named geminissl.json instead:

{
  "Version": 1,
  "SslCertificate": "cert.pfx",
  "CertificatePassword": "password here or null"
}

Version refers to the configuration schema version, do not modify this.

SslCertificate points to the path of your certificate.

CertificatePassword can either be the password as a string or simply null in the case of no password.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Bunkum.Protocols.Gemini:

Package Downloads
Bunkum.Serialization.GopherToGemini

Allows serialization of Gophermaps in Gemini for Bunkum servers

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.9.0 135 6/25/2025
4.8.1 116 7/30/2024
4.8.0 96 7/30/2024
4.7.1 118 7/28/2024
4.7.0 132 7/17/2024
4.6.0 126 7/11/2024
4.5.6 146 6/14/2024
4.5.5 149 5/23/2024
4.5.4 132 5/13/2024
4.5.3 127 5/13/2024
4.5.2 157 5/7/2024
4.5.1 134 4/30/2024
4.5.0 150 4/24/2024
4.4.5 175 2/19/2024
4.4.4 170 2/5/2024
4.4.3 237 12/4/2023
4.4.2 162 12/3/2023
4.4.1 169 11/26/2023
4.4.0 158 11/25/2023
4.3.3 197 10/28/2023
4.3.2 162 10/27/2023
4.3.1 179 10/22/2023
4.3.0 175 10/22/2023