Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProxyItem ¶
type ProxyItem struct { ServerName []string `json:"servername" yaml:"servername"` //Locations []locationConfig "json:locations" Locations []struct { Path string `json:"path" yaml:"path"` Endpoint string `json:"endpoint" yaml:"endpoint"` } `json:"locations" yaml:"locations"` TLS bool `json:"tls" yaml:"tls"` Cert string `json:"cert" yaml:"cert"` Key string `json:"certkey" yaml:"certkey"` }
ProxyItem grupo de dominios com mesmo certificado TLS e paths
type ReverseProxy ¶
type ReverseProxy struct { Log *monologger.Log Config ServerConfig DebugMode bool Addr string Srv *http.Server TLS bool }
ReverseProxy distribui requisicoes de acordo com os paths
func (*ReverseProxy) Listen ¶
func (r *ReverseProxy) Listen()
Listen aguarda clientes, precisa ser configurado com Setup
func (*ReverseProxy) LoadConfig ¶
func (r *ReverseProxy) LoadConfig(configYaml io.ReadCloser) error
LoadConfig carrega config
func (*ReverseProxy) ServeHTTP ¶
func (r *ReverseProxy) ServeHTTP(res http.ResponseWriter, req *http.Request)
func (*ReverseProxy) StartHTTPSServer ¶
func (r *ReverseProxy) StartHTTPSServer() error
StartHTTPSServer https server
type ServerConfig ¶
type ServerConfig struct {
List []ProxyItem `json:"proxy" yaml:"proxy"`
}
ServerConfig representa arquivo de configuracao
Click to show internal directories.
Click to hide internal directories.