reprox

package module
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: GPL-3.0 Imports: 9 Imported by: 0

README

reprox

golang GoDoc Go Report Issues Size Tag View examples License


Purpose

//TODO

Installation

You can use Go to install this package for you:

go get -u github.com/mwat56/reprox

Usage

//TODO

Libraries

The following external libraries were used building reprox:

Licence

    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 for details.


GFDL

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.

type TSetup added in v0.3.0

type TSetup struct {
	AccessLog   string // (optional) name of page access logfile
	ErrorLog    string // (optional) name of page error logfile
	BackendList *tBackendServers
}

Application specific configuration

var (

	// application specific configuration
	AppSetup *TSetup
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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