Documentation ¶
Overview ¶
Package hsrv - HTTPS Server part of loweffortbotnetcontroller
Index ¶
Constants ¶
View Source
const (
CheckInPattern = "/checkin/{id}"
)
CheckInPattern is the URL pattern used for checkins.
View Source
const Timeout = 2 * time.Second
Timeout is a generic Read and Write timeout for all things HTTP.
Variables ¶
This section is empty.
Functions ¶
func Fingerprint ¶
Fingerprint returns the TLS cert's fingerprint. It does this by listening very briefly for TLS connections, to be as close as possible to how Serve generates a cert. Pass in the same certFile that is passed to Serve.
func Serve ¶
func Serve( ctx context.Context, sl *slog.Logger, addr string, certFile string, filesDir string, idm *idmanager.Manager, checkInDir string, callbackString string, maxBody int64, ) error
Serve serves HTTPS requests on the given address. Requests for /checkin are handled with files in checkInDir as well as with the IDManager. All other requests serve files from filesDir.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.