diff options
author | Volpeon <git@volpeon.ink> | 2021-07-24 09:46:59 +0200 |
---|---|---|
committer | Volpeon <git@volpeon.ink> | 2021-07-24 09:46:59 +0200 |
commit | 38485ede265d22e11a316b4d66de1bf0feb945be (patch) | |
tree | 72388107a2bfe9e8e972feccd4f9c7d542d37b60 | |
parent | Add underline to nav protocol (diff) | |
download | gopherproxy-38485ede265d22e11a316b4d66de1bf0feb945be.tar.gz gopherproxy-38485ede265d22e11a316b4d66de1bf0feb945be.tar.bz2 gopherproxy-38485ede265d22e11a316b4d66de1bf0feb945be.zip |
-rw-r--r-- | .gitignore | 2 | ||||
-rw-r--r-- | Dockerfile | 10 | ||||
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | README.md | 8 | ||||
-rw-r--r-- | cmd/gopherproxy/main.go (renamed from cmd/port/main.go) | 6 | ||||
-rw-r--r-- | go.mod | 2 | ||||
-rw-r--r-- | internal/gopherproxy/gemini.go (renamed from internal/port/gemini.go) | 4 | ||||
-rw-r--r-- | internal/gopherproxy/gopher.go (renamed from internal/port/gopher.go) | 4 | ||||
-rw-r--r-- | internal/gopherproxy/main.go (renamed from internal/port/main.go) | 2 | ||||
-rw-r--r-- | internal/gopherproxy/tpl/_fonts.html (renamed from internal/port/tpl/_fonts.html) | 0 | ||||
-rw-r--r-- | internal/gopherproxy/tpl/_modals.html (renamed from internal/port/tpl/_modals.html) | 0 | ||||
-rw-r--r-- | internal/gopherproxy/tpl/gemini.html (renamed from internal/port/tpl/gemini.html) | 0 | ||||
-rw-r--r-- | internal/gopherproxy/tpl/gopher.html (renamed from internal/port/tpl/gopher.html) | 0 | ||||
-rw-r--r-- | internal/gopherproxy/tpl/startpage.html (renamed from internal/port/tpl/startpage.html) | 0 | ||||
-rwxr-xr-x | port.bin | bin | 0 -> 13478712 bytes |
15 files changed, 21 insertions, 21 deletions
@@ -3,6 +3,6 @@ dist | |||
3 | *.bak | 3 | *.bak |
4 | coverage.txt | 4 | coverage.txt |
5 | 5 | ||
6 | port.bin | 6 | gopherproxy.bin |
7 | 7 | ||
8 | .vscode | 8 | .vscode |
@@ -2,16 +2,16 @@ FROM golang:alpine | |||
2 | 2 | ||
3 | EXPOSE 80/tcp | 3 | EXPOSE 80/tcp |
4 | 4 | ||
5 | ENTRYPOINT ["port"] | 5 | ENTRYPOINT ["gopherproxy"] |
6 | 6 | ||
7 | RUN \ | 7 | RUN \ |
8 | apk add --update git && \ | 8 | apk add --update git && \ |
9 | rm -rf /var/cache/apk/* | 9 | rm -rf /var/cache/apk/* |
10 | 10 | ||
11 | RUN mkdir -p /go/src/git.vulpes.one/Feuerfuchs/port | 11 | RUN mkdir -p /go/src/git.vulpes.one/gopherproxy |
12 | WORKDIR /go/src/git.vulpes.one/Feuerfuchs/port | 12 | WORKDIR /go/src/git.vulpes.one/gopherproxy |
13 | 13 | ||
14 | COPY . /go/src/git.vulpes.one/Feuerfuchs/port | 14 | COPY . /go/src/git.vulpes.one/gopherproxy |
15 | 15 | ||
16 | RUN go get -v -d | 16 | RUN go get -v -d |
17 | RUN go install -v git.vulpes.one/Feuerfuchs/port/... | 17 | RUN go install -v git.vulpes.one/gopherproxy/... |
@@ -3,7 +3,7 @@ | |||
3 | all: dev | 3 | all: dev |
4 | 4 | ||
5 | dev: build | 5 | dev: build |
6 | ./port.bin -bind 127.0.0.1:8000 | 6 | ./gopherproxy.bin -bind 127.0.0.1:8000 |
7 | 7 | ||
8 | build: clean | 8 | build: clean |
9 | sassc -t compressed css/main.scss assets/style.css | 9 | sassc -t compressed css/main.scss assets/style.css |
@@ -12,7 +12,7 @@ build: clean | |||
12 | #pyftsubset fonts/iosevka-fixed-ss03-regular.ttf "*" --name-IDs+=0,4,6 --flavor='woff2' --output-file='assets/iosevka-fixed-ss03-regular.woff2' | 12 | #pyftsubset fonts/iosevka-fixed-ss03-regular.ttf "*" --name-IDs+=0,4,6 --flavor='woff2' --output-file='assets/iosevka-fixed-ss03-regular.woff2' |
13 | #pyftsubset fonts/iosevka-fixed-ss03-bold.ttf "*" --name-IDs+=0,4,6 --flavor='woff' --with-zopfli --output-file='assets/iosevka-fixed-ss03-bold.woff' | 13 | #pyftsubset fonts/iosevka-fixed-ss03-bold.ttf "*" --name-IDs+=0,4,6 --flavor='woff' --with-zopfli --output-file='assets/iosevka-fixed-ss03-bold.woff' |
14 | #pyftsubset fonts/iosevka-fixed-ss03-bold.ttf "*" --name-IDs+=0,4,6 --flavor='woff2' --output-file='assets/iosevka-fixed-ss03-bold.woff2' | 14 | #pyftsubset fonts/iosevka-fixed-ss03-bold.ttf "*" --name-IDs+=0,4,6 --flavor='woff2' --output-file='assets/iosevka-fixed-ss03-bold.woff2' |
15 | go build -o ./port.bin ./cmd/port | 15 | go build -o ./gopherproxy.bin ./cmd/gopherproxy |
16 | 16 | ||
17 | profile: | 17 | profile: |
18 | @go test -cpuprofile cpu.prof -memprofile mem.prof -v -bench . | 18 | @go test -cpuprofile cpu.prof -memprofile mem.prof -v -bench . |
@@ -1,8 +1,8 @@ | |||
1 | # Gopher (RFC 1436) Web Proxy | 1 | # Gopher (RFC 1436) Web Proxy |
2 | 2 | ||
3 | 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. | 3 | 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. |
4 | 4 | ||
5 | port is a fork of [https://github.com/prologic/port](https://github.com/prologic/port). | 5 | gopherproxy is a fork of [https://github.com/prologic/gopherproxy](https://github.com/prologic/gopherproxy). |
6 | 6 | ||
7 | Demo: https://proxy.vulpes.one/ | 7 | Demo: https://proxy.vulpes.one/ |
8 | 8 | ||
@@ -15,14 +15,14 @@ Demo: https://proxy.vulpes.one/ | |||
15 | ## Installation | 15 | ## Installation |
16 | 16 | ||
17 | ```#!bash | 17 | ```#!bash |
18 | $ go install git.vulpes.one/Feuerfuchs/port/... | 18 | $ go install git.vulpes.one/gopherproxy/... |
19 | ``` | 19 | ``` |
20 | 20 | ||
21 | 21 | ||
22 | ## Usage | 22 | ## Usage |
23 | 23 | ||
24 | ```#!bash | 24 | ```#!bash |
25 | $ port | 25 | $ gopherproxy |
26 | ``` | 26 | ``` |
27 | 27 | ||
28 | Arguments: | 28 | Arguments: |
diff --git a/cmd/port/main.go b/cmd/gopherproxy/main.go index 6cdccc6..1b69671 100644 --- a/cmd/port/main.go +++ b/cmd/gopherproxy/main.go | |||
@@ -4,7 +4,7 @@ import ( | |||
4 | "flag" | 4 | "flag" |
5 | "log" | 5 | "log" |
6 | 6 | ||
7 | port "git.vulpes.one/Feuerfuchs/port/internal/port" | 7 | gopherproxy "git.vulpes.one/gopherproxy/internal/gopherproxy" |
8 | ) | 8 | ) |
9 | 9 | ||
10 | var ( | 10 | var ( |
@@ -20,6 +20,6 @@ var ( | |||
20 | func main() { | 20 | func main() { |
21 | flag.Parse() | 21 | flag.Parse() |
22 | 22 | ||
23 | // Use a config struct | 23 | // Use a gopherproxy struct |
24 | log.Fatal(port.ListenAndServe(*bind, *startpagefile, *robotsfile, *robotsdebug, *vipsconcurrency)) | 24 | log.Fatal(gopherproxy.ListenAndServe(*bind, *startpagefile, *robotsfile, *robotsdebug, *vipsconcurrency)) |
25 | } | 25 | } |
@@ -1,4 +1,4 @@ | |||
1 | module git.vulpes.one/Feuerfuchs/port | 1 | module git.vulpes.one/gopherproxy |
2 | 2 | ||
3 | require ( | 3 | require ( |
4 | github.com/NYTimes/gziphandler v1.1.1 | 4 | github.com/NYTimes/gziphandler v1.1.1 |
diff --git a/internal/port/gemini.go b/internal/gopherproxy/gemini.go index f574816..89d820c 100644 --- a/internal/port/gemini.go +++ b/internal/gopherproxy/gemini.go | |||
@@ -1,4 +1,4 @@ | |||
1 | package port | 1 | package gopherproxy |
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | "bytes" | 4 | "bytes" |
@@ -14,7 +14,7 @@ import ( | |||
14 | "golang.org/x/net/html/charset" | 14 | "golang.org/x/net/html/charset" |
15 | "golang.org/x/text/transform" | 15 | "golang.org/x/text/transform" |
16 | 16 | ||
17 | "git.vulpes.one/Feuerfuchs/port/pkg/libgemini" | 17 | "git.vulpes.one/gopherproxy/pkg/libgemini" |
18 | 18 | ||
19 | "github.com/temoto/robotstxt" | 19 | "github.com/temoto/robotstxt" |
20 | ) | 20 | ) |
diff --git a/internal/port/gopher.go b/internal/gopherproxy/gopher.go index fc7b754..5f4b39f 100644 --- a/internal/port/gopher.go +++ b/internal/gopherproxy/gopher.go | |||
@@ -1,4 +1,4 @@ | |||
1 | package port | 1 | package gopherproxy |
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | "bytes" | 4 | "bytes" |
@@ -11,7 +11,7 @@ import ( | |||
11 | "net/url" | 11 | "net/url" |
12 | "strings" | 12 | "strings" |
13 | 13 | ||
14 | "git.vulpes.one/Feuerfuchs/port/pkg/libgopher" | 14 | "git.vulpes.one/gopherproxy/pkg/libgopher" |
15 | 15 | ||
16 | "github.com/davidbyttow/govips/pkg/vips" | 16 | "github.com/davidbyttow/govips/pkg/vips" |
17 | "github.com/temoto/robotstxt" | 17 | "github.com/temoto/robotstxt" |
diff --git a/internal/port/main.go b/internal/gopherproxy/main.go index 5fb3dae..33230c1 100644 --- a/internal/port/main.go +++ b/internal/gopherproxy/main.go | |||
@@ -1,4 +1,4 @@ | |||
1 | package port | 1 | package gopherproxy |
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | "crypto/md5" | 4 | "crypto/md5" |
diff --git a/internal/port/tpl/_fonts.html b/internal/gopherproxy/tpl/_fonts.html index a947222..a947222 100644 --- a/internal/port/tpl/_fonts.html +++ b/internal/gopherproxy/tpl/_fonts.html | |||
diff --git a/internal/port/tpl/_modals.html b/internal/gopherproxy/tpl/_modals.html index 3bbdef2..3bbdef2 100644 --- a/internal/port/tpl/_modals.html +++ b/internal/gopherproxy/tpl/_modals.html | |||
diff --git a/internal/port/tpl/gemini.html b/internal/gopherproxy/tpl/gemini.html index 8d20da1..8d20da1 100644 --- a/internal/port/tpl/gemini.html +++ b/internal/gopherproxy/tpl/gemini.html | |||
diff --git a/internal/port/tpl/gopher.html b/internal/gopherproxy/tpl/gopher.html index 6eb607c..6eb607c 100644 --- a/internal/port/tpl/gopher.html +++ b/internal/gopherproxy/tpl/gopher.html | |||
diff --git a/internal/port/tpl/startpage.html b/internal/gopherproxy/tpl/startpage.html index 772ac90..772ac90 100644 --- a/internal/port/tpl/startpage.html +++ b/internal/gopherproxy/tpl/startpage.html | |||
diff --git a/port.bin b/port.bin new file mode 100755 index 0000000..eff9e5d --- /dev/null +++ b/port.bin | |||
Binary files differ | |||