auth

package
v0.0.0-...-a7b2fa3 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ServerIP string
	AuthURL  string
)

Functions

func Get

func Get(key string) string

func KeyToHex

func KeyToHex(key string) string

func NewHttpClient

func NewHttpClient() *http.Client

func Request

func Request(method, target string, headers map[string]string, body io.ReadCloser) (int, []byte, error)

Types

type Config

type Config struct {
	ListenPort string `json:"wg_listen_port"`
	PrivateKey string `json:"wg_private_key"`
}

func GetWireguardConfig

func GetWireguardConfig() (*Config, error)

type Peer

type Peer struct {
	Address   string
	PublicKey string
}

func Verify

func Verify(clientPublicKey string) (*Peer, error)

Jump to

Keyboard shortcuts

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