Table of Contents

Class Http01ChallengeService

Namespace
VpnHood.Core.Server
Assembly
VpnHood.Core.Server.dll

Provides a server's HTTP-01 challenge listeners: one on port 80 of each of its addresses, which answers ACME's challenges for the server's certificate and redirects the other requests it accepts to HTTPS.

public class Http01ChallengeService : IDisposable
Inheritance
Http01ChallengeService
Implements
Inherited Members

Constructors

Http01ChallengeService(Http01KeyAuthorizationFunc, bool)

Initializes a new instance of the Http01ChallengeService class, with a port 80 of its own, as one that only answers challenges has.

public Http01ChallengeService(Http01ChallengeHandler.Http01KeyAuthorizationFunc keyAuthorizationFunc, bool throttleRequests = true)

Parameters

keyAuthorizationFunc Http01ChallengeHandler.Http01KeyAuthorizationFunc

The method that gives a challenge token's key authorization.

throttleRequests bool

true, the default, to answer one challenge at a time from each IPv4 address or IPv6 /64, across the process; another that comes meanwhile is not answered as a challenge.

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Remarks

It stops the listeners; calling it again does nothing.

Start(IEnumerable<IPAddress>)

Starts a listener on port 80 of each address, which redirects to HTTPS's own port, 443; the listeners it had stop first.

public int Start(IEnumerable<IPAddress> ipAddresses)

Parameters

ipAddresses IEnumerable<IPAddress>

The addresses.

Returns

int

The number of listeners that started; one that could not is logged.

Exceptions

ObjectDisposedException

The service is disposed.

ArgumentNullException

ipAddresses, or one of its addresses, is null.