18 Commits
4.3 ... 4.4

Author SHA1 Message Date
Antoni Sawicki
357f3ed6bf ver bump 2019-08-04 09:21:17 -07:00
Antoni Sawicki
97c0679e0b smaller font for status line 2019-08-04 09:08:23 -07:00
Antoni Sawicki
e2223af833 makefile update 2019-08-04 09:01:55 -07:00
Antoni Sawicki
60989d3395 Update README.md 2019-08-04 01:16:07 -07:00
Antoni Sawicki
74d015a4da Update README.md 2019-08-04 01:15:26 -07:00
Antoni Sawicki
8628c00dd7 Update README.md 2019-08-04 01:14:31 -07:00
Antoni Sawicki
327baf318a add docker support 2019-08-04 00:51:55 -07:00
Antoni Sawicki
0e07f422f6 fix content type for shutdown 2019-08-04 00:39:21 -07:00
Antoni Sawicki
f7aece10e9 Update README.md 2019-07-30 16:46:46 -07:00
Antoni Sawicki
a7b7164932 Update README.md 2019-07-30 16:45:00 -07:00
Antoni Sawicki
7a27cf7b62 better ps make script 2019-07-29 23:59:32 -07:00
Antoni Sawicki
749f8bea5d Update README.md 2019-07-17 14:04:53 -07:00
Antoni Sawicki
290bc5a977 Update README.md 2019-07-17 13:59:44 -07:00
Antoni Sawicki
cc98932f5a Update README.md 2019-07-17 13:54:54 -07:00
Antoni Sawicki
f69e213a0b readme update 2019-07-17 01:01:18 -07:00
Antoni Sawicki
66641a099b readme update 2019-07-17 00:52:59 -07:00
Antoni Sawicki
872321c699 readme update 2019-07-17 00:49:36 -07:00
Antoni Sawicki
ba4183e0b4 4.3 2019-07-17 00:05:01 -07:00
5 changed files with 62 additions and 53 deletions

5
Dockerfile Normal file
View File

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

View File

@@ -1,25 +1,18 @@
all: linux freebsd openbsd macos windows rpi
all: wrp
linux:
GOOS=linux GOARCH=amd64 go build -a -o wrp-linux wrp.go
wrp: wrp.go
go build wrp.go
linux-ppc64le:
GOOS=linux GOARCH=ppc64le go build -a -o wrp-linux-ppc64le wrp.go
cross:
GOOS=linux GOARCH=amd64 go build -a -o wrp-amd64-linux wrp.go
GOOS=freebsd GOARCH=amd64 go build -a -o wrp-amd64-freebsd wrp.go
GOOS=openbsd GOARCH=amd64 go build -a -o wrp-amd64-openbsd wrp.go
GOOS=darwin GOARCH=amd64 go build -a -o wrp-amd64-macos wrp.go
GOOS=windows GOARCH=amd64 go build -a -o wrp-amd64-windows.exe wrp.go
GOOS=linux GOARCH=arm go build -a -o wrp-arm-linux wrp.go
rpi:
GOOS=linux GOARCH=arm go build -a -o wrp-linux-rpi wrp.go
freebsd:
GOOS=freebsd GOARCH=amd64 go build -a -o wrp-freebsd wrp.go
openbsd:
GOOS=openbsd GOARCH=amd64 go build -a -o wrp-openbsd wrp.go
macos:
GOOS=darwin GOARCH=amd64 go build -a -o wrp-macos wrp.go
windows:
GOOS=windows GOARCH=amd64 go build -a -o wrp-windows.exe wrp.go
docker: wrp
docker build -t tenox7/wrp:latest .
clean:
rm -rf wrp-linux wrp-freebsd wrp-openbsd wrp-macos wrp-windows.exe wrp-linux-rpi
rm -rf wrp-* wrp

View File

@@ -1,38 +1,52 @@
# WRP - Web Rendering Proxy
A HTTP proxy server that allows to use historical and obsolete web browsers on the modern web. It works by rendering the web page in to a GIF image. It sends mouse clicks via ISMAP and keystrokes from a text box form input.
## Current Status
* This is a new reimplementation in GoLang/[ChromeDP](https://github.com/chromedp/chromedp). Python/Webkit being now deprecated.
* Beta versiom, but fully supported an maintained.
* Works as browser-in-browser. A real http proxy mode is being investigated. Check [issue #35](https://github.com/tenox7/wrp/issues/35) for updates.
* As of 4.1 supports clicking on non-link elements (eg. cookie warnings, dropdown menus, etc.) and sending keystrokes. Yes, you can login and use Gmail or play web based games from any old browser.
## Usage
1. [Download a WRP binary](https://github.com/tenox7/wrp/releases/) and run it on a machine that will become your WRP server.
2. Point your legacy browser to `http://address:port` of WRP server. Do not set or use it as a "Proxy Server" (yet).
3. Type a search string or a http/https URL and click GO.
4. Adjust your screen width/height/scale/#colors to fit in your old browser.
5. Scroll web page by clicking on the in-image scroll bar.
6. Send keystrokes by filling in K input box and pressing Go. You also have buttons for backspace, enter and arrow keys.
A HTTP proxy server that allows to use historical / vintage web browsers on the modern web. It works by rendering a web page in to GIF image with ISMAP.
![Internet Explorer 1.5 doing Gmail](wrp.png)
## Current Status
* This is a new version using GoLang/[ChromeDP](https://github.com/chromedp/chromedp) (Python/Webkit is now deprecated).
* Fully supported an maintained.
* Works as browser-in-browser. A real http proxy mode is being investigated. Check [issue #35](https://github.com/tenox7/wrp/issues/35) for updates.
* Supports clicking on non-link elements (eg. cookie warnings, dropdown menus, etc.) and sending keystrokes. Yes, you can login to Gmail.
## Usage
1. [Download a WRP binary](https://github.com/tenox7/wrp/releases/) and run it on a machine that will become your WRP gateway server.
2. Point your legacy browser to `http://address:port` of WRP server. Do not set or use it as a "Proxy Server" (yet).
3. Type a search string or a http/https URL and click Go.
4. Adjust your screen width/height/scale/#colors to fit in your old browser.
5. Scroll web page by clicking on the in-image scroll bar.
6. Do not use client browser history-back, instead use Bk WRP button.
7. To send keystrokes fill K input box and press Go. There also are buttons for backspace, enter and arrow keys.
## Docker
```
docker run -d -p 8080:8080 --name wrp --restart unless-stopped tenox7/wrp
```
## Flags
```
-l listen address:port, default :8080
-h headed mode, display browser window
-d chromedp debug logging
```
## Minimal Requirements
- Server / Gateway should run on a modern hardware/os that supports memory hungry Chrome.
- Client / Browser needs to support HTML FORMs and ISMAP. Typically Mosaic 2.0 would be minimum version for forms. However ISMAP was supported since 0.6B, so if you manually enter url using `?url=...` you can use ealier version.
## History
* In 2014, version 1.0 started as a cgi-bin script, adaptation of `webkit2png.py` and `pcidade.py`, [blog post](https://virtuallyfun.com/2014/03/03/surfing-modern-web-with-ancient-browsers/).
* Later in 2014, version 2.0 became a stand alone http-proxy server, also support for both Linux/MacOS, [another post](https://virtuallyfun.com/wordpress/2014/03/11/web-rendering-proxy-update//).
* In 2016 the whole internet migrated to HTTPS/SSL/TLS and WRP largely stopped working. Python code became unmaintainable and mostly unportable (especially to Windows, even WSL).
* In 2019 WRP 3.0 has been rewritten in Golang/Chromedp as browser-in-browser instead of http proxy.
* Later in 2019, WRP 4.0 has been completely refactored to use mouse clicks instead using a href nodes. Also in 4.1 added sending keystrokes in to input boxes. You can now login to Gmail.
* Later in 2019, WRP 4.0 has been completely refactored to use mouse clicks instead using a href nodes. Also in 4.1 added sending keystrokes in to input boxes. You can now login to Gmail. Also now runs as a Docker container.
## Credits
* Uses [chromedp](https://github.com/chromedp), thanks to [mvdan](https://github.com/mvdan) for dealing with my issues

View File

@@ -2,19 +2,16 @@ param (
[switch]$clean = $false
)
$env:GOARCH="amd64"
foreach($os in ("linux", "freebsd", "openbsd", "darwin", "windows")) {
$env:GOOS=$os
$o="wrp-$(if ($os -eq "windows") {$os="windows.exe"})$os"
foreach($sys in ("amd64-linux", "arm-linux", "amd64-freebsd", "amd64-openbsd", "amd64-darwin", "amd64-windows")) {
$cpu,$os = $sys.split('-')
$env:GOARCH=$cpu
$env:GOOS=$os
$o="wrp-$cpu-$(if ($os -eq "windows") {$os="windows.exe"} elseif ($os -eq "darwin") { $os="macos" })$os"
Remove-Item -ErrorAction Ignore $o
if (!$clean) {
Invoke-Expression "& go build -a -o $o wrp.go"
$cmd = "& go build -a -o $o wrp.go"
Write-Host $cmd
Invoke-Expression $cmd
}
}
$env:GOARCH="arm"
$env:GOOS="linux"
$o="wrp-linux-rpi"
Remove-Item -ErrorAction Ignore $o
if (!$clean) {
Invoke-Expression "& go build -a -o $o wrp.go"
}

8
wrp.go
View File

@@ -31,7 +31,7 @@ import (
)
var (
version = "4.2"
version = "4.4"
srv http.Server
ctx context.Context
cancel context.CancelFunc
@@ -104,8 +104,8 @@ func (w wrpReq) printPage(out http.ResponseWriter) {
}
func (w wrpReq) printFooter(out http.ResponseWriter) {
fmt.Fprintf(out, "\n<P><A HREF=\"/?url=https://github.com/tenox7/wrp/&w=%d&h=%d&s=%1.2f&c=%d\">"+
"Web Rendering Proxy Version %s</A> | <A HREF=\"/shutdown/\">Shutdown WRP</A></BODY>\n</HTML>\n", w.W, w.H, w.S, w.C, version)
fmt.Fprintf(out, "\n<P><FONT SIZE=\"-2\"><A HREF=\"/?url=https://github.com/tenox7/wrp/&w=%d&h=%d&s=%1.2f&c=%d\">"+
"Web Rendering Proxy Version %s</A> | <A HREF=\"/shutdown/\">Shutdown WRP</A></FONT></BODY>\n</HTML>\n", w.W, w.H, w.S, w.C, version)
}
func pageServer(out http.ResponseWriter, req *http.Request) {
@@ -258,7 +258,7 @@ func haltServer(out http.ResponseWriter, req *http.Request) {
out.Header().Set("Cache-Control", "max-age=0")
out.Header().Set("Expires", "-1")
out.Header().Set("Pragma", "no-cache")
out.Header().Set("Content-Type", "text/text")
out.Header().Set("Content-Type", "text/plain")
fmt.Fprintf(out, "Shutting down WRP...\n")
out.(http.Flusher).Flush()
time.Sleep(time.Second * 2)