blob: 7ebde2b643ef5bf53581267430d8261d0de9927b (
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
68
69
70
71
72
73
74
75
76
77
|
# 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
$ 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:** Compiled 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 pre-commit hook that compiles all assets automatically:
```#!bash
#!/bin/sh
exec make build
git add -f assets
exit 0
```
## Related
Related projects:
- [go-gopher](https://github.com/prologic/go-gopher)
go-gopher is the Gopher client and server library used by gopherproxy
- [gopherclient](https://github.com/prologic/gopherclient)
gopherclient is a cross-platform QT/QML GUI Gopher Client
using the gopherproxy library as its backend.
## License
MIT
|