OLD | NEW |
| (Empty) |
1 Requires go 1.5. Not tested with earlier or later versions of go. | |
2 | |
3 REQUIRED PACKAGES | |
4 | |
5 $ go get github.com/codegangsta/cli | |
6 | |
7 SETUP GOPATH | |
8 | |
9 $ export GOPATH=/path/to/web_page_replay_go:"$HOME/go" | |
10 | |
11 SAMPLE USAGE | |
12 | |
13 Terminal 1: | |
14 | |
15 Install a test certificate authority. | |
16 $ go run src/wpr.go installroot | |
17 | |
18 Start wpr in record mode. | |
19 $ go run src/wpr.go record --http_port=8080 --https_port=8081 /tmp/archive.json | |
20 ... | |
21 Ctrl-C | |
22 | |
23 Start wpr in replay mode. | |
24 $ go run src/wpr.go replay --http_port=8080 --https_port=8081 /tmp/archive.json | |
25 | |
26 Uninstall the test certificate authority. | |
27 $ go run src/wpr.go removeroot | |
28 | |
29 Terminal 2: | |
30 $ google-chrome-beta --user-data-dir=$foo \ | |
31 --host-resolver-rules="MAP *:80 127.0.0.1:8080,MAP *:443 127.0.0.1:8081,EXCLUD
E localhost" | |
32 ... wait for record servers to start | |
33 load a page | |
34 ... wait for replay servers to start | |
35 ... clear cache | |
36 load the page again | |
37 | |
38 HTTP-to-HTTP2 PROXY: | |
39 | |
40 Terminal 1: | |
41 $ go run src/wpr.go replay --https_port=8081 --https_to_http_port=8082 \ | |
42 /tmp/archive.json | |
43 | |
44 Terminal 2: | |
45 $ google-chrome-beta --user-data-dir=$foo \ | |
46 --host-resolver-rules="MAP *:443 127.0.0.1:8081,EXCLUDE localhost" \ | |
47 --proxy-server=http=https://127.0.0.1:8082 \ | |
48 --trusted-spdy-proxy=127.0.0.1:8082 | |
OLD | NEW |