server

package
v0.0.0-...-f2a809f Latest Latest
Warning

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

Go to latest
Published: May 6, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main(ctx context.Context, cfg Config)

Main is the entry point of server

func OK

func OK(w http.ResponseWriter, r *http.Request)

OK return string "OK" for test and health check

func Proxy

func Proxy(w http.ResponseWriter, r *http.Request)

Proxy handle URL like "/proxy?des=127.0.0.1:3128"

func ProxyMain

func ProxyMain(ctx context.Context, addr string)

Types

type Config

type Config struct {
	WebSocketAddr string
	QuicAddr      string
	ServerKey     string
	ServerCA      string
	RootCA        string

	ProxyEnable bool
	EchoEnable  bool
}

Config for server

Jump to

Keyboard shortcuts

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