7 Commits

Author SHA1 Message Date
Antoni Sawicki
6b372aca23 update readme 2026-03-18 01:44:32 -07:00
Antoni Sawicki
9d21aa5ce1 update readme 2026-03-18 01:38:35 -07:00
Antoni Sawicki
365a786a42 move screenshot 2026-03-18 01:27:20 -07:00
Antoni Sawicki
007ea7b655 fix goreleaser 2026-03-18 01:22:31 -07:00
Antoni Sawicki
007f7f87d6 add dockerfiler for goreleaser 2026-03-18 01:18:13 -07:00
Antoni Sawicki
fb712136b5 add goreleaser 2026-03-18 01:16:39 -07:00
Antoni Sawicki
89426c969d update mod 2026-03-18 01:16:30 -07:00
5 changed files with 121 additions and 14 deletions

97
.goreleaser.yml Normal file
View File

@@ -0,0 +1,97 @@
version: 2
project_name: wrp
before:
hooks:
- go mod tidy
builds:
- main: .
binary: wrp
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- freebsd
- openbsd
- windows
goarch:
- amd64
- arm64
- arm
goarm:
- "7"
ignore:
- goos: darwin
goarch: arm
- goos: windows
goarch: arm
ldflags:
- -s -w
archives:
- formats:
- tar.gz
format_overrides:
- goos: windows
formats:
- zip
dockers:
- image_templates:
- "tenox7/wrp:{{ .Tag }}-amd64"
- "tenox7/wrp:latest-amd64"
use: buildx
goarch: amd64
dockerfile: Dockerfile.goreleaser
build_flag_templates:
- "--platform=linux/amd64"
- image_templates:
- "tenox7/wrp:{{ .Tag }}-arm64"
- "tenox7/wrp:latest-arm64"
use: buildx
goarch: arm64
dockerfile: Dockerfile.goreleaser
build_flag_templates:
- "--platform=linux/arm64"
docker_manifests:
- name_template: "tenox7/wrp:{{ .Tag }}"
image_templates:
- "tenox7/wrp:{{ .Tag }}-amd64"
- "tenox7/wrp:{{ .Tag }}-arm64"
- name_template: "tenox7/wrp:latest"
image_templates:
- "tenox7/wrp:latest-amd64"
- "tenox7/wrp:latest-arm64"
nfpms:
- package_name: wrp
vendor: Antoni Sawicki
homepage: https://github.com/tenox7/wrp
maintainer: Antoni Sawicki <as@tenoware.com>
description: Web Rendering Proxy
license: Apache-2.0
formats:
- deb
- rpm
- apk
checksum:
name_template: "checksums.txt"
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
release:
github:
owner: tenox7
name: wrp

5
Dockerfile.goreleaser Normal file
View File

@@ -0,0 +1,5 @@
FROM chromedp/headless-shell
COPY wrp /wrp
ENTRYPOINT ["/wrp"]
ENV PATH="/headless-shell:${PATH}"
LABEL maintainer="as@tenoware.com"

View File

@@ -24,5 +24,8 @@ docker-push:
docker-clean:
docker buildx prune -a -f
release:
export GITHUB_TOKEN=$$(gh auth token) && goreleaser release --clean
clean:
rm -rf wrp-* wrp

View File

@@ -2,23 +2,25 @@
A browser-in-browser proxy server that allows to use historical / vintage web browsers on the modern web.
![Internet Explorer 1.5 doing Gmail](wrp.png)
## Modes of operation
### Access
### Access Types
- Browser in browser, navigate to the address of WRP and use built-in web form to naviate.
- HTTP proxy mode which offers more seamless, but also limited use.
- Browser-in-browser, navigate to the address of WRP and use the built-in web form to browse web.
- HTTP proxy mode which offers more seamless, but also limited use. Semi compatible with https://.
### Rende modes
- ISMAP "graphical" mode, renders web page in to a GIF/PNG/JPG image with clickable imagemap.
- Simple HTML mode converts pages into simplified HTML for old browsers.
![Internet Explorer 1.5 doing Gmail](wrp.png)
Different modes have different uses. ISMAP mode will be better for flashy modern web. Simple HTML mode will be better for reading articles or documentation.
## Usage Instructions
* [Download a WRP binary](https://github.com/tenox7/wrp/releases/) run it on a machine that will become your WRP gateway/server. This should be modern hardware and OS. Google Chrome / Chromium Browser is required to be preinstalled. Do not try to run WRP on an old machine like Windows XP or 98.
* [Download a WRP binary](https://github.com/tenox7/wrp/releases/) run it on a machine that will become your WRP gateway/server. This should be modern hardware and OS. Google Chrome / Chromium / Brave Browser is required to be preinstalled. Do not run WRP on an old machine like Windows XP or 98.
* Make sure you have disabled firewall or open port WRP is listening on (by default 8080).
* Point your legacy browser to `http://address:port` of the WRP server or set your proxy address there.
* Type a search string or a full http/https URL and click **Go**.
@@ -26,9 +28,9 @@ A browser-in-browser proxy server that allows to use historical / vintage web br
### Proxy mode
- Try to use http:// addresses only, the proxy will automatically rewrite them to https as needed.
- https:// addresses are limited in functionality (no /suffix or path).
- You can use `/proxy.pac` automatic configuration mode.
- Stick to `http://` addresses only, the proxy will automatically rewrite them to `https://` as needed.
- `https://` addresses are limited in functionality (no /suffix or paths).
- Proxy mode doesn't have a customizable web interface with html forms. All configuration is done via flags.
### Image Map Mode
@@ -40,9 +42,9 @@ A browser-in-browser proxy server that allows to use historical / vintage web br
* You can re-capture screenshot without reloading page by using **St** (Stop). This is useful if page didn't render fully before screenshot is taken.
* You can also reload page and re-capture screenshot with **Re** (Reload).
* To send keystrokes, fill **K** input box and press **Go**. There also are buttons for backspace, enter and arrow keys.
* The default image type GIP is a ultra fast, optimized, parallel encoded GIF type.
* If your browser supports it, prefer PNG over GIF/JPG. PNG is much faster, whereas GIF/JPG requires a lot of additional processing on both client and server to encode/decode.
* GIF images are by default encoded with 216 colors, "web safe" palette. This uses an ultra fast but not very accurate color mapping algorithm. If you want better color representation switch to 256 color mode.
* The default image type is `GIP` - an ultra fast, optimized, parallel encoded GIF type.
* If your browser supports it, prefer PNG over GIF/JPG. PNG is much faster, whereas GIF/JPG requires a lot of additional processing on both client and server to compress/uncompress.
* GIF images are by default encoded with 216 colors, "web safe" palette. This uses an ultra fast encoding algorithm optimized mostly for text. Images have rather wonky color colors. If you want better color representation switch to 256 color mode.
### Simple HTML mode
@@ -183,8 +185,7 @@ Click `st` to re-capture screenshot. You may want to increase the page delay usi
### Websites are blocking headless browsers
This is a well known issue. WRP has some provisions to work around it, but it's a cat and mouse game. By default WRP tries to obtain some current valid User Agent
from https://github.com/jnrbsn/user-agents rather than using the internal "HeadlessChrome". You can override this to your own, for example:
This is a well known issue. WRP has some provisions to work around it, but it's a cat and mouse game. By default WRP tries to obtain some current valid User Agent from https://github.com/jnrbsn/user-agents rather than using the internal "HeadlessChrome". You can override this to your own, for example:
```shell
$ wrp -ua="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36"
@@ -229,6 +230,7 @@ You may also be interested in:
* [VncFox](https://github.com/tenox7/vncfox)
* [webone](https://github.com/atauenis/webone)
* [Pici Server](https://github.com/picidae-project/pici-server)
* [Browservice](https://github.com/ttalvitie/browservice)
* [Browsh](https://github.com/browsh-org/browsh)

4
go.mod
View File

@@ -11,6 +11,8 @@ require (
github.com/ericpauley/go-quantize v0.0.0-20200331213906-ae555eb2afa4
github.com/lithammer/shortuuid/v4 v4.2.0
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
github.com/srwiley/oksvg v0.0.0-20221011165216-be6e8873101c
github.com/srwiley/rasterx v0.0.0-20220730225603-2ab79fcdd4ef
github.com/tenox7/gip v1.0.1
golang.org/x/image v0.36.0
golang.org/x/net v0.51.0
@@ -24,8 +26,6 @@ require (
github.com/gobwas/pool v0.2.1 // indirect
github.com/gobwas/ws v1.4.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/srwiley/oksvg v0.0.0-20221011165216-be6e8873101c // indirect
github.com/srwiley/rasterx v0.0.0-20220730225603-2ab79fcdd4ef // indirect
golang.org/x/sys v0.42.0 // indirect
golang.org/x/text v0.34.0 // indirect
)