auto

package
v1.1.10 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: BSD-3-Clause Imports: 32 Imported by: 0

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 DefaultAllowedMethods = basicHttp.DefaultAllowedMethods

Functions

func New

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

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