No description
Find a file
Cass Mitchell 5756025300 Add robots
2026-03-31 22:59:08 -04:00
.github/workflows Add deploy workflow 2022-07-07 16:27:11 -04:00
bin Remove jquery, switch to Symfony 2022-10-29 12:44:03 -04:00
config Bump symfony 2025-11-14 15:32:00 -05:00
public Add robots 2026-03-31 22:59:08 -04:00
scripts Add docker setup 2019-04-22 12:18:41 -04:00
src Disallow indexing 2026-03-31 22:48:07 -04:00
templates Disallow indexing 2026-03-31 22:48:07 -04:00
.env Remove jquery, switch to Symfony 2022-10-29 12:44:03 -04:00
.gitignore Remove jquery, switch to Symfony 2022-10-29 12:44:03 -04:00
build.sh Remove CSS framework code, use CSS grid 2019-04-26 15:12:51 -04:00
composer.json Bump symfony 2025-11-14 15:32:00 -05:00
composer.lock Bump symfony 2025-11-14 15:32:00 -05:00
config.php.example Cleanup code formatting 2019-04-25 16:45:31 -04:00
config.rb move to foundation 2013-03-15 12:45:25 -04:00
docker-compose.yml Cleanup some deprecations 2025-12-13 22:21:36 -05:00
Dockerfile Bump PHP 2024-09-06 08:32:55 -04:00
favicon.ico icon 2013-06-04 20:48:11 -04:00
LICENSE.txt Bump license 2019-05-01 08:39:11 -04:00
php-debugging.ini Add docker setup 2019-04-22 12:18:41 -04:00
phpunit.xml.dist bump library versions 2013-02-15 20:29:21 -05:00
README.md Update readme 2019-05-01 08:44:45 -04:00
symfony.lock Bump symfony 2025-11-14 15:32:00 -05:00

gophper-proxy

gophper-proxy is a simple web proxy for gopher servers. It should run on any modernish PHP server, and most of the processing is actually done in javascript for maximum portability. There's also a docker setup which can run anywhere that docker works.

Features

  • It runs on PHP using [Slim][slim], which is a nifty lightweight application framework.
  • It caches requests for faster response times.
  • All of the rendering happens in the browser, which means someone could easily write a different backend.
  • If the user accesses a binary file, they can download it. If they click on an image, they can see it in the browser.
  • You can restrict it to a single gopher server, so you can integrate it into your project without any fears of someone using your proxy for naughty tricks.

Using Docker

The docker image is built from a PHP/apache image, so running it is pretty simple. Something like this should work:

docker build -t gophper-proxy .
docker run -it --rm --name my-running-app gophper-proxy

There are a few environment variables you can use to configure the proxy:

  • GOPHER_TITLE: The title which will be used when outputting pages
  • START_REQUEST: An initial server to load requests from. If not specified, a stock intro page is used. Example: gopherpedia.com:70
  • RESTRICT_TO_MATCH: A filter to restrict which pages can be served. For example, to restrict to a single server you could use something like /gopherpedia.com/
  • ALLOW_ALL_PORTS: true or false. Should the proxy allow ports other than 70? Setting this to true is a security risk.

Here's a sample `docker-compose.yml' file if that's helpful for you:

version: "3.5"

services:
  web:
    image: muffinista/gopher-proxy
    networks:
      - external_network
    env_file: .env
    environment:
      docker: "true"
      production: "false"
    volumes:
      - .:/var/www/html #:cached
      - ./logs:/var/www/logs:cached
    ports:
      - 80:80
networks:
  external_network:

Running Natively

  • Copy the code to your web tree
  • Set any environment variables that are needed (see above)
  • Copy config.php.example to config.php, and double-check the variables for anything you might need to set. In particular, you need to create a cache directory and make sure it is writable.

Contributing

Fixes and contributions are happily accepted. Please fork the code and submit a pull request.

See LICENSE.txt

http://muffinlabs.com