MyNixOS website logo
Description

proxy gopher over http.

gopher-proxy allows to proxy gopher over HTTP, which is mainly useful for HTTP-ifying a specific gopher space.

A simple invocation looks like this:

gopher-proxy --host example.org --http-port 8080

In this particular example gopher-proxy does the following things:

  • Takes HTTP requests on 127.0.0.1:8080 (to be used by a proxying web server, like nginx), converts those to gopher requests to example.org and returns the gopher responses as HTTP responses

  • Links menu items pointing to external servers to gopher:// URLs (this ensures that only one gopher server is proxied) and recognizes URL links which are converted to normal HTML links

  • Tries to guess the correct mime-type for every gopher-served file (as it is not included in the response) and wraps text files in a HTML container.

  • And generally works hard to offer the best HTTP equivalent of a given gopher space :)

To learn about the other parameters for tweaking the behavior of gopher-proxysee the readme.

gopher-proxy

gopher-proxy is a tiny wai application running on top of warp. It acts as a gopher-over-http proxy for a specific server, e. g. to http-ify a gopher space.

Usage

Example usage:

gopher-proxy --host foo.org --http-port 8080

In this particular example, gopher-proxy would proxy the foo.org gopher server and bind its http service on 127.0.0.1:8080 (to be proxied to by another web server like nginx).

These are all optional flags which allow to change default behavior:

  • --port: The port of the gopher server, defaults to 70
  • --css-path: Use some specific css file instead of the default one.
  • --css-url: The http path of the css file, defaults to /gopher-proxy.css (should be changed, if your gopher server has a file with the same name
  • --base-url: The path of the directory which will appear as root directory of gopher-proxy to the user, defaults to /. Should be changed if you configured your proxying web server to expose gopher-proxy as, say /gopher-space/.
  • --listen-public: If this flag is set, gopher-proxy will accept connections on its public IP address(es).
  • --default-mime-type: Mime type to use if gopher-proxy can't guess it, defaults to "application/octet-stream"
  • --timeout: connection timeout in milliseconds, defaults to 10 seconds.
  • --server-name: The server name of the server to proxy, defaults to the host name. This value is used to detect wether a menu item is pointing to another gopher server than the proxied one. This is particularly useful, if you use e. g. 127.0.0.1 instead of the public host name.
  • --title: Sets the first part of the HTML title-tag, defaults to gopher-proxy.

Things to keep in mind

  • Your gopher server must send UTF-8-encoded gopher responses
  • gopher-proxy might misinterpret certain content, because of the context-sensitive nature of gopher
  • gopher-proxy does not support Gopher+

Roadmap

  • [ ] Add Logging.
Metadata

Version

0.1.1.3

Maintainers (1)

Executables (1)

  • bin/gopher-proxy

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows