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.
Files changed (60) hide show
  1. package/README.md +62 -74
  2. package/dist/assets/{index-DcvPYWS3.js → index-BQkXFDet.js} +195 -203
  3. package/dist/assets/index-EeRhLAof.css +1 -0
  4. package/dist/assets/{inject-BnVzMVpl.js → inject-xtH4w5z9.js} +8 -5
  5. package/dist/favicon.png +0 -0
  6. package/embed.js +2 -1
  7. package/examples/single-page.html +3 -1
  8. package/package.json +2 -1
  9. package/runtime/index.html +5 -4
  10. package/scripts/build.mjs +11 -5
  11. package/scripts/smoke.mjs +264 -73
  12. package/scripts/verify.mjs +100 -1
  13. package/source/packages/adrift-protocol/package.json +2 -2
  14. package/source/packages/adrift-protocol/src/index.ts +11 -0
  15. package/source/packages/chrome/index.html +3 -2
  16. package/source/packages/chrome/public/favicon.png +0 -0
  17. package/source/packages/chrome/src/Tab/Tab.tsx +10 -2
  18. package/source/packages/chrome/src/assets/favicon.ts +1 -1
  19. package/source/packages/chrome/src/components/Button.tsx +11 -22
  20. package/source/packages/chrome/src/components/Checkbox.tsx +8 -12
  21. package/source/packages/chrome/src/components/Input.tsx +3 -4
  22. package/source/packages/chrome/src/components/StartScreen.tsx +34 -49
  23. package/source/packages/chrome/src/components/TopSiteButton.tsx +2 -2
  24. package/source/packages/chrome/src/pages/NewTabPage.tsx +42 -10
  25. package/source/packages/chrome/src/pages/SettingsPage.tsx +10 -11
  26. package/source/packages/chrome/src/proxy/Controller.ts +12 -0
  27. package/source/packages/chrome/src/proxy/ProxyFrame.ts +19 -2
  28. package/source/packages/chrome/src/proxy/cache.test.ts +52 -0
  29. package/source/packages/chrome/src/proxy/cache.ts +55 -11
  30. package/source/packages/chrome/src/proxy/navigation.test.ts +91 -0
  31. package/source/packages/chrome/src/proxy/navigation.ts +97 -0
  32. package/source/packages/chrome/src/proxy/scramjet-config.test.ts +19 -0
  33. package/source/packages/chrome/src/proxy/scramjet-config.ts +26 -0
  34. package/source/packages/chrome/src/proxy/scramjet.ts +5 -18
  35. package/source/packages/chrome/src/runtime-base.ts +1 -1
  36. package/source/packages/chrome/src/services/SettingsService.ts +1 -1
  37. package/source/packages/chrome/src/style.css +7 -7
  38. package/source/packages/chrome/src/themes.ts +21 -21
  39. package/source/packages/inject/src/errorpage/errorpage.css +22 -35
  40. package/source/packages/inject/src/errorpage/errorpage.ts +6 -3
  41. package/source/packages/roxxie-transport/package.json +1 -1
  42. package/source/packages/roxxie-transport/src/connection.ts +19 -2
  43. package/source/packages/roxxie-transport/src/transport.ts +2 -2
  44. package/source/packages/scramjet/packages/core/dist/scramjet.js +1 -1
  45. package/source/packages/scramjet/packages/core/dist/scramjet.mjs +1 -1
  46. package/source/packages/scramjet/packages/core/dist/scramjet_bundled.js +1 -1
  47. package/source/packages/scramjet/packages/core/dist/scramjet_bundled.mjs +1 -1
  48. package/source/packages/scramjet/packages/core/src/fetch/fetch.ts +7 -0
  49. package/source/packages/scramjet/packages/core/src/shared/rewriters/js.ts +1 -2
  50. package/source/packages/tracker-protocol/package.json +2 -2
  51. package/source/packages/tracker-protocol/src/index.ts +34 -10
  52. package/source/pnpm-lock.yaml +5 -2
  53. package/standalone.html +27 -0
  54. package/dist/assets/index-BdRlQ7d_.css +0 -1
  55. package/dist/icon.png +0 -0
  56. package/dist/roxxie-icon.svg +0 -12
  57. package/source/packages/chrome/public/icon.png +0 -0
  58. package/source/packages/chrome/public/roxxie-icon.svg +0 -12
  59. package/source/packages/scramjet/packages/core/dist/temp-types-build/index.js +0 -23
  60. 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. This release is pinned to the
4
- tracker at `https://100.58.76.81/`. The source workspace's development network
5
- document remains on `http://127.0.0.1:8788/`.
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 styles in `dist/` are designed to be served by jsDelivr.
8
- The small files in `runtime/` must be served at `https://100.58.76.81/browser/`.
9
- They include the HTML shell, tracker network document, and same-origin service
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
- ## Embed from one HTML page
12
+ ## One-file browser
13
13
 
14
- After deploying `runtime/` as described below, an external page can embed the
15
- browser with only this markup:
14
+ Download `standalone.html` and open it directly, including through `file://`, or
15
+ use the equivalent markup:
16
16
 
17
17
  ```html
18
- <div id="roxxie-browser" style="position:fixed;inset:0"></div>
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.1.0/embed.js"
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 inserts an iframe whose default URL is
27
- `https://100.58.76.81/browser/`. Call it manually when more control is needed:
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.1.0/embed.js"
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
- Always pin an exact npm version. jsDelivr treats versioned assets as immutable;
40
- using `@latest` can combine an old shell or worker with new browser code.
41
-
42
- ## Deploy the same-origin runtime
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 a same-origin shell is required
70
+ ## Why the release uses two CDNs
82
71
 
83
- jsDelivr intentionally serves npm `.html` files as `text/plain`, so a browser
84
- cannot execute the application directly from a jsDelivr HTML URL. Separately,
85
- the Web platform forbids a CDN-loaded script from registering a service worker
86
- for the embedding page's origin. Roxxie's rewritten tab navigation requires
87
- that worker.
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
- For those reasons, a genuinely CDN-only arbitrary-page embed is not possible
90
- with this browser architecture. The supported design keeps the executable code
91
- on jsDelivr while the tracker origin serves the minimal shell, configuration,
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 release
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 CDN base to this package's exact version, fixes the runtime
117
- base to `/browser/`, disables source maps, generates the production network
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 a modified-source snapshot, third-party notices, the exact
120
- filter-list inputs and hashes, and their retained license texts; see
121
- `SOURCE.md` and `THIRD_PARTY_NOTICES.md`.
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.