nxer

package module
v0.0.0-...-f8c261d Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: MIT Imports: 12 Imported by: 0

README

nxer

Package nexer implements functions to get certificate using letsencript and proxy handlers

The package enable us to get TLS certificate automaticaly from letsencript

This package also contains a reverse proxy to redirect requests to services based on the sub domain name and service name enviroment variable(from the .env file)

It is mainly designed to work with services using docker containers.

Documentation

Overview

Package nexer implements functions to get certificate using letsencript and proxy handlers

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLetsEncryptCert

func GetLetsEncryptCert(certManager *autocert.Manager) func(hello *tls.ClientHelloInfo) (*tls.Certificate, error)

GetLetsEncryptCert return a function return a certificate and err

func Getdomains

func Getdomains() []string

Getdomains return list of subdomains, from the enviroment var DOMAIN

func Getservicesmap

func Getservicesmap() map[string]string

Getservicesmap return map of subdomains to services, from enviroment vars DOMAIN and SERVICE

func NewRedirect

func NewRedirect(m map[string]string) func(w http.ResponseWriter, r *http.Request) *httputil.ReverseProxy

NewRedirect return a new proxy handler

Types

This section is empty.

Jump to

Keyboard shortcuts

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