gopherproxy

command module
v0.0.0-...-3f53507 Latest Latest
Warning

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

Go to latest
Published: May 11, 2020 License: MIT Imports: 3 Imported by: 0

README

Gopher (RFC 1436) Web Proxy

gopherproxy is a Gopher (RFC 1436) and Gemini (gopher://zaibatsu.circumlunar.space/1/~solderpunk/gemini/docs/) Web Proxy that acts as a gateway into Gopherspace/Geminispace by proxying standard Web HTTP requests to Gopher/Gemini requests of the target server.

gopherproxy is a fork of https://github.com/prologic/gopherproxy.

Demo: https://proxy.vulpes.one/

Requirements

  • libvips: Fast on-demand thumbnail generation

Installation

$ go install git.feuerfuchs.dev/Feuerfuchs/gopherproxy/...

Usage

$ gopherproxy

Arguments:

  • -bind=<ip[:port]>: The interface to bind to (default: "0.0.0.0:8000")
  • -uri=<uri>: The default address to open in the proxy (default: "floodgap.com")
  • -robots-file=<file>: robots.txt file to serve to protect Gopher sites from web crawlers (default: "robots.txt")
  • -robots-debug=<true|false>: Print output about clients ignoring robots.txt (this includes regular browsers) (default: false)
  • -vips-concurrency=<n>: Concurrency level of libvips (i.e. number of worker threads)

Development

For development, the following libraries and programs are required in addition to the previously listed ones:

  • SASS (sassc): Compiling SCSS to CSS
  • TypeScript (tsc): Compiling TypeScript to JavaScript
  • Terser (terser): Minifying JavaScript
  • fonttools (pyftsubset): Minifying fonts

Folder structure:

  • assets: Assets that will be embedded into the executable using packr
  • css: SCSS source files
  • fonts: Fonts that will be minified
  • js: TypeScript source files

I recommend using a git pre-commit hook that compiles all assets automatically:

#!/bin/sh

make build
git add -f assets
exit 0

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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