aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
blob: 1898572eef3a6854c9fde078b8331514e05daec2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Gopher (RFC 1436) Web Proxy

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 a fork of [https://github.com/prologic/gopherproxy](https://github.com/prologic/gopherproxy).

Demo: https://gopher.feuerfuchs.dev/


## Requirements

- **libvips:** Fast on-demand thumbnail generation


## Installation

```#!bash
$ go install git.feuerfuchs.dev/Feuerfuchs/gopherproxy/...
```


## Usage

```#!bash
$ 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)


## 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
- **UglifyJS (uglifyjs):** 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:

```#!bash
#!/bin/sh

make build
git add -f assets
exit 0
```


## License

MIT