aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
blob: 40ed18a8b8423d3bd3f9efbf59213cebad17b1b0 (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

port 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.

port is a fork of [https://github.com/prologic/port](https://github.com/prologic/port).

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


## Requirements

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


## Installation

```#!bash
$ go install git.vulpes.one/Feuerfuchs/port/...
```


## Usage

```#!bash
$ port
```

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:

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

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


## License

MIT