gopherproxy

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2017 License: MIT Imports: 9 Imported by: 3

README

Gopher (RFC 1436) Web Proxy

Build Status GoDoc Wiki Go Report Card Coverage

gopherproxy is a Gopher (RFC 1436) Web Proxy that acts as a gateway into Gopherspace by proxying standard Web HTTP requests to Gopher requests of the target server.

gopherproxy is written in Go (#golang) using the go-gopher library.

Installation

$ go install github.com/prologic/gopherproxy/...

Docker
$ docker build -t gopherproxy .
$ docker run -p 80:80 gopherproxy -uri floodgap.com

Usage

$ gopherproxy

Then simply visit: http://localhost/gopher.floodgap.com

License

MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListenAndServe

func ListenAndServe(bind, uri string) error

ListenAndServe creates a listening HTTP server bound to the interface specified by bind and sets up a Gopher to HTTP proxy proxying requests as requested and by default will prozy to a Gopher server address specified by uri if no servers is specified by the request.

Types

type Handler

type Handler func(w http.ResponseWriter, req *http.Request)

Handler is an aliased type for the standard HTTP handler functions

func MakeGopherProxyHandler

func MakeGopherProxyHandler(tpl *template.Template, uri string) Handler

MakeGopherProxyHandler returns a Handler that proxies requests to the specified Gopher server as denoated by the first argument to the request path and renders the content using the provided template.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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