roxxie-proxy-u-prod 0.1.0 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +62 -74
- package/dist/assets/{index-DcvPYWS3.js → index-BQkXFDet.js} +195 -203
- package/dist/assets/index-EeRhLAof.css +1 -0
- package/dist/assets/{inject-BnVzMVpl.js → inject-xtH4w5z9.js} +8 -5
- package/dist/favicon.png +0 -0
- package/embed.js +2 -1
- package/examples/single-page.html +3 -1
- package/package.json +2 -1
- package/runtime/index.html +5 -4
- package/scripts/build.mjs +11 -5
- package/scripts/smoke.mjs +264 -73
- package/scripts/verify.mjs +100 -1
- package/source/packages/adrift-protocol/package.json +2 -2
- package/source/packages/adrift-protocol/src/index.ts +11 -0
- package/source/packages/chrome/index.html +3 -2
- package/source/packages/chrome/public/favicon.png +0 -0
- package/source/packages/chrome/src/Tab/Tab.tsx +10 -2
- package/source/packages/chrome/src/assets/favicon.ts +1 -1
- package/source/packages/chrome/src/components/Button.tsx +11 -22
- package/source/packages/chrome/src/components/Checkbox.tsx +8 -12
- package/source/packages/chrome/src/components/Input.tsx +3 -4
- package/source/packages/chrome/src/components/StartScreen.tsx +34 -49
- package/source/packages/chrome/src/components/TopSiteButton.tsx +2 -2
- package/source/packages/chrome/src/pages/NewTabPage.tsx +42 -10
- package/source/packages/chrome/src/pages/SettingsPage.tsx +10 -11
- package/source/packages/chrome/src/proxy/Controller.ts +12 -0
- package/source/packages/chrome/src/proxy/ProxyFrame.ts +19 -2
- package/source/packages/chrome/src/proxy/cache.test.ts +52 -0
- package/source/packages/chrome/src/proxy/cache.ts +55 -11
- package/source/packages/chrome/src/proxy/navigation.test.ts +91 -0
- package/source/packages/chrome/src/proxy/navigation.ts +97 -0
- package/source/packages/chrome/src/proxy/scramjet-config.test.ts +19 -0
- package/source/packages/chrome/src/proxy/scramjet-config.ts +26 -0
- package/source/packages/chrome/src/proxy/scramjet.ts +5 -18
- package/source/packages/chrome/src/runtime-base.ts +1 -1
- package/source/packages/chrome/src/services/SettingsService.ts +1 -1
- package/source/packages/chrome/src/style.css +7 -7
- package/source/packages/chrome/src/themes.ts +21 -21
- package/source/packages/inject/src/errorpage/errorpage.css +22 -35
- package/source/packages/inject/src/errorpage/errorpage.ts +6 -3
- package/source/packages/roxxie-transport/package.json +1 -1
- package/source/packages/roxxie-transport/src/connection.ts +19 -2
- package/source/packages/roxxie-transport/src/transport.ts +2 -2
- package/source/packages/scramjet/packages/core/dist/scramjet.js +1 -1
- package/source/packages/scramjet/packages/core/dist/scramjet.mjs +1 -1
- package/source/packages/scramjet/packages/core/dist/scramjet_bundled.js +1 -1
- package/source/packages/scramjet/packages/core/dist/scramjet_bundled.mjs +1 -1
- package/source/packages/scramjet/packages/core/src/fetch/fetch.ts +7 -0
- package/source/packages/scramjet/packages/core/src/shared/rewriters/js.ts +1 -2
- package/source/packages/tracker-protocol/package.json +2 -2
- package/source/packages/tracker-protocol/src/index.ts +34 -10
- package/source/pnpm-lock.yaml +5 -2
- package/standalone.html +27 -0
- package/dist/assets/index-BdRlQ7d_.css +0 -1
- package/dist/icon.png +0 -0
- package/dist/roxxie-icon.svg +0 -12
- package/source/packages/chrome/public/icon.png +0 -0
- package/source/packages/chrome/public/roxxie-icon.svg +0 -12
- package/source/packages/scramjet/packages/core/dist/temp-types-build/index.js +0 -23
- package/source/packages/scramjet/packages/core/dist/temp-types-build/index.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,34 +1,60 @@
|
|
|
1
1
|
# roxxie-proxy-u-prod
|
|
2
2
|
|
|
3
|
-
Production browser assets for Roxxie Proxy U.
|
|
4
|
-
tracker at `https://100.58.76.81
|
|
5
|
-
|
|
3
|
+
Production browser assets for Roxxie Proxy U. Version `0.2.3` is pinned to the
|
|
4
|
+
tracker at `https://100.58.76.81/` and can be embedded without hosting browser
|
|
5
|
+
files on the tracker server.
|
|
6
6
|
|
|
7
|
-
The browser code and
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
workers.
|
|
7
|
+
The executable browser code, styles, WebAssembly, and filter assets in `dist/`
|
|
8
|
+
are loaded from version-pinned jsDelivr URLs. The HTML shell, tracker network
|
|
9
|
+
document, and service workers in `runtime/` are loaded from the same exact npm
|
|
10
|
+
release on unpkg so the workers remain on the shell's origin.
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## One-file browser
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
Download `standalone.html` and open it directly, including through `file://`, or
|
|
15
|
+
use the equivalent markup:
|
|
16
16
|
|
|
17
17
|
```html
|
|
18
|
-
|
|
18
|
+
<!doctype html>
|
|
19
|
+
<meta charset="utf-8" />
|
|
20
|
+
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
|
21
|
+
<style>
|
|
22
|
+
html,
|
|
23
|
+
body,
|
|
24
|
+
#roxxie-browser {
|
|
25
|
+
width: 100%;
|
|
26
|
+
height: 100%;
|
|
27
|
+
margin: 0;
|
|
28
|
+
}
|
|
29
|
+
</style>
|
|
30
|
+
<div id="roxxie-browser"></div>
|
|
19
31
|
<script
|
|
20
32
|
defer
|
|
21
|
-
src="https://cdn.jsdelivr.net/npm/roxxie-proxy-u-prod@0.
|
|
33
|
+
src="https://cdn.jsdelivr.net/npm/roxxie-proxy-u-prod@0.2.3/embed.js"
|
|
34
|
+
integrity="sha384-yu0TlvCJ9LcKoOG66anQWT/iHEz3uC7rUGLmaDZV9otcFcWsQ6EvX8y2GPuxFsOH"
|
|
35
|
+
crossorigin="anonymous"
|
|
22
36
|
data-roxxie-target="#roxxie-browser"
|
|
23
37
|
></script>
|
|
24
38
|
```
|
|
25
39
|
|
|
26
|
-
The loader
|
|
27
|
-
|
|
40
|
+
The embed loader creates an iframe for:
|
|
41
|
+
|
|
42
|
+
```text
|
|
43
|
+
https://unpkg.com/roxxie-proxy-u-prod@0.2.3/runtime/index.html
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The runtime then obtains its network document and workers from the versioned
|
|
47
|
+
unpkg runtime directory and connects to `https://100.58.76.81/` for tracker
|
|
48
|
+
signaling. The tracker does not relay proxied browsing traffic.
|
|
49
|
+
|
|
50
|
+
Call the loader manually when more control is needed:
|
|
28
51
|
|
|
29
52
|
```html
|
|
53
|
+
<div id="roxxie-browser"></div>
|
|
30
54
|
<script
|
|
31
|
-
src="https://cdn.jsdelivr.net/npm/roxxie-proxy-u-prod@0.
|
|
55
|
+
src="https://cdn.jsdelivr.net/npm/roxxie-proxy-u-prod@0.2.3/embed.js"
|
|
56
|
+
integrity="sha384-yu0TlvCJ9LcKoOG66anQWT/iHEz3uC7rUGLmaDZV9otcFcWsQ6EvX8y2GPuxFsOH"
|
|
57
|
+
crossorigin="anonymous"
|
|
32
58
|
data-roxxie-auto="false"
|
|
33
59
|
></script>
|
|
34
60
|
<script>
|
|
@@ -36,70 +62,32 @@ The loader inserts an iframe whose default URL is
|
|
|
36
62
|
</script>
|
|
37
63
|
```
|
|
38
64
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
Copy the contents of `runtime/` to a directory served as `/browser/` by the
|
|
45
|
-
tracker's HTTPS server. The Debian installer can verify and deploy it
|
|
46
|
-
atomically:
|
|
47
|
-
|
|
48
|
-
```sh
|
|
49
|
-
sudo bash deploy/debian/install.sh \
|
|
50
|
-
--public-ip 100.58.76.81 \
|
|
51
|
-
--email admin@edurocks.org \
|
|
52
|
-
--skip-app-deploy \
|
|
53
|
-
--frontend-package roxxie-proxy-u-prod@0.1.0
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
For a manual Caddy integration, put this handler before the tracker reverse
|
|
57
|
-
proxy and point it at a complete runtime tree (the installer maintains the
|
|
58
|
-
`current` symlink):
|
|
59
|
-
|
|
60
|
-
```caddyfile
|
|
61
|
-
handle_path /browser/* {
|
|
62
|
-
root * /srv/roxxie-browser-runtime/current
|
|
63
|
-
|
|
64
|
-
@document path / /index.html
|
|
65
|
-
header @document Cache-Control "no-cache, must-revalidate"
|
|
66
|
-
|
|
67
|
-
@network path /roxxie-network.json
|
|
68
|
-
header @network Cache-Control "no-store"
|
|
69
|
-
|
|
70
|
-
@workers path /sw.js /localcontrollersw.js /controller.sw.js
|
|
71
|
-
header @workers Cache-Control "no-cache, must-revalidate"
|
|
72
|
-
|
|
73
|
-
file_server
|
|
74
|
-
}
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
Serve `index.html` as `text/html`, the three worker files as JavaScript, and
|
|
78
|
-
`roxxie-network.json` as JSON. Do not rewrite a missing worker or network file
|
|
79
|
-
to the shell.
|
|
65
|
+
Use `file://`, loopback HTTP, or HTTPS for the outer page. A non-loopback
|
|
66
|
+
plaintext HTTP ancestor is not a secure context and prevents the iframe from
|
|
67
|
+
using its service worker. A restrictive Content Security Policy must allow the
|
|
68
|
+
pinned jsDelivr script and `frame-src https://unpkg.com`.
|
|
80
69
|
|
|
81
|
-
## Why
|
|
70
|
+
## Why the release uses two CDNs
|
|
82
71
|
|
|
83
|
-
jsDelivr
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
72
|
+
jsDelivr serves npm HTML files as plain text, so it cannot host the executable
|
|
73
|
+
shell. unpkg serves `runtime/index.html` as HTML and the worker files as
|
|
74
|
+
JavaScript from one versioned origin, allowing the shell to register its
|
|
75
|
+
same-origin service worker. The larger executable assets remain pinned to
|
|
76
|
+
jsDelivr.
|
|
88
77
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
and worker boundary. The one-file host-page example remains valid because it
|
|
93
|
-
iframes that same-origin runtime.
|
|
78
|
+
Every URL includes the exact npm version. Do not replace it with `@latest`:
|
|
79
|
+
combining one release's shell or worker with another release's browser code can
|
|
80
|
+
break routing and cache compatibility.
|
|
94
81
|
|
|
95
82
|
## Release maintenance
|
|
96
83
|
|
|
97
|
-
In the complete Roxxie Proxy U source workspace, maintainers build the
|
|
98
|
-
with:
|
|
84
|
+
In the complete Roxxie Proxy U source workspace, maintainers build and test the
|
|
85
|
+
release with:
|
|
99
86
|
|
|
100
87
|
```sh
|
|
101
88
|
pnpm --filter roxxie-proxy-u-prod build
|
|
102
89
|
pnpm --filter roxxie-proxy-u-prod verify
|
|
90
|
+
pnpm --filter roxxie-proxy-u-prod smoke
|
|
103
91
|
pnpm --filter roxxie-proxy-u-prod pack
|
|
104
92
|
```
|
|
105
93
|
|
|
@@ -113,11 +101,11 @@ npm run build
|
|
|
113
101
|
npm run verify
|
|
114
102
|
```
|
|
115
103
|
|
|
116
|
-
The build fixes the
|
|
117
|
-
|
|
104
|
+
The build fixes the jsDelivr asset base and unpkg runtime base to this exact
|
|
105
|
+
package version, disables source maps, generates the production tracker network
|
|
118
106
|
document, and copies the repository's AGPL license into the package. The
|
|
119
|
-
tarball also carries
|
|
120
|
-
filter-list inputs and hashes, and
|
|
121
|
-
`
|
|
107
|
+
tarball also carries the modified-source snapshot, third-party notices, exact
|
|
108
|
+
filter-list inputs and hashes, and retained license texts; see `SOURCE.md` and
|
|
109
|
+
`THIRD_PARTY_NOTICES.md`.
|
|
122
110
|
|
|
123
111
|
Licensed under AGPL-3.0-only.
|