auto

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2026 License: BSD-3-Clause Imports: 35 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

HTTP Auto Package

The http-auto package is a part of the Taubyte project, designed to facilitate automatic HTTP service management with features such as domain validation, TLS support, and caching.

Features

  • Automatic Domain Validation: Validates service or alias domains using TLS client hello information.
  • TLS Support: Integrates with ACME for certificate management.
  • Caching: Implements positive and negative caching for domain validation results.

Using a Custom ACME Server (StepCA)

Install StepCA

If you already have StepCA installed, skip this step. Otherwise, follow this simple guide to run a local instance for testing.

  1. Pull the StepCA Docker image:

    docker pull smallstep/step-ca
    
  2. Run the StepCA container:

    docker run -d --name step-ca \
      -v step:/home/step \
      -p 9000:9000 \
      -e DOCKER_STEPCA_INIT_NAME=StepCA \
      -e DOCKER_STEPCA_INIT_DNS_NAMES=localhost \
      smallstep/step-ca
    
  3. Ensure it's running:

    curl http://localhost:9000/health
    
  4. Connect to the container:

    docker exec -it step-ca sh
    
  5. Add an ACME provider:

    step ca provisioner add acme --type ACME
    
  6. Restart the container:

    docker restart step-ca
    
Configure Tau

Edit the configuration file for your setup and add the following:

domains:
    acme:
        url: https://localhost:9000/acme/acme/directory
        ca:
            skip: true

If you want to add a RootCA, use:

domains:
    acme:
        url: https://localhost:9000/acme/acme/directory
        ca:
            root-ca: "/path/to/root/ca/file"
            caa-record: "myca.org"

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PositiveTTL = 1 * time.Hour
	NegativeTTL = 1 * time.Minute
)
View Source
var (
	// WildcardRenewBefore is how long before expiry the wildcard is ordered again.
	WildcardRenewBefore = 30 * 24 * time.Hour
	// WildcardCheckEvery is how often a node reloads or renews the wildcard; WildcardRetry after a failure.
	WildcardCheckEvery = 12 * time.Hour
	WildcardRetry      = 10 * time.Minute
	// WildcardWaitOther is how soon a node looks again while another node orders:
	// the order takes about a minute, and until then this node serves per-host certificates.
	WildcardWaitOther = time.Minute
	// WildcardSettle lets a store write reach every auth node before it is relied on.
	WildcardSettle = 5 * time.Second
)
View Source
var DefaultAllowedMethods = basicHttp.DefaultAllowedMethods

Functions

func New

func New(ctx context.Context, node peer.Node, ops ...options.Option) (service.Service, error)

New is the autocert-managed HTTPS Service constructor. Pure options — no tau config. Config-driven setup lives in services/common.NewHTTPService.

Types

type Service

type Service struct {
	*basicHttp.Service
	// contains filtered or unexported fields
}

func (*Service) Error

func (s *Service) Error() error

func (*Service) GetListenAddress

func (s *Service) GetListenAddress() (*url.URL, error)

func (*Service) SetOption

func (s *Service) SetOption(opt interface{}) error

func (*Service) Start

func (s *Service) Start()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL