Documentation ¶
Overview ¶
Copyright © 2024 M.Watermann, 10247 Berlin, Germany
All rights reserved EMail : <support@mwat.de>
Package `reprox` implements a hostname based reverse proxy server.
Copyright © 2024 M.Watermann, 10247 Berlin, Germany All rights reserved EMail : <support@mwat.de>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
You should have received a copy of the GNU General Public License along with this program. If not, see the [GNU General Public License](http://www.gnu.org/licenses/gpl.html) for details.
Copyright © 2024 M.Watermann, 10247 Berlin, Germany
All rights reserved EMail : <support@mwat.de>
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TProxyHandler ¶
type TProxyHandler struct {
// contains filtered or unexported fields
}
Page handler for proxy requests:
func NewProxyHandler ¶
func NewProxyHandler() *TProxyHandler
`NewProxyHandler()` creates a new instance of TProxyHandler. It initialises the internal backendServers map with the list of available servers.
Returns: - *TProxyHandler: A pointer to a new instance of TProxyHandler.
func (*TProxyHandler) ServeHTTP ¶
func (ph *TProxyHandler) ServeHTTP(aWriter http.ResponseWriter, aRequest *http.Request)
`ServeHTTP()` is the main entry point for the reverse proxy server. It handles incoming HTTP requests and forwards them to the appropriate backend server.
Parameters: - `aWriter`: The `ResponseWriter` to write HTTP response headers and body. - `aRequest`: The Request struct containing all the details of the incoming HTTP request.