roxxie-proxy-u-prod 0.2.4 → 0.3.0
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 +6 -6
- package/dist/assets/index-C8me8aPT.js +3669 -0
- package/dist/assets/inject-B58ufVkG.js +43 -0
- package/embed.js +1 -1
- package/examples/single-page.html +2 -2
- package/package.json +1 -1
- package/runtime/index.html +3 -3
- package/scripts/verify.mjs +2 -2
- package/source/packages/chrome/src/Tab/History.test.ts +30 -0
- package/source/packages/chrome/src/Tab/History.ts +3 -1
- package/source/packages/chrome/src/index.ts +5 -0
- package/source/packages/chrome/src/proxy/history-state.test.ts +82 -0
- package/source/packages/chrome/src/proxy/roxxie.ts +9 -0
- package/source/packages/chrome/src/proxy/scramjet.ts +29 -11
- package/source/packages/inject/src/emulators/history.ts +30 -3
- package/source/packages/roxxie-transport/package.json +1 -1
- package/source/packages/roxxie-transport/src/transport.ts +26 -3
- package/source/packages/scramjet/packages/core/dist/scramjet.js +14 -13582
- package/source/packages/scramjet/packages/core/dist/scramjet.js.map +1 -1
- package/source/packages/scramjet/packages/core/dist/scramjet.mjs +14 -13632
- package/source/packages/scramjet/packages/core/dist/scramjet.mjs.map +1 -1
- package/source/packages/scramjet/packages/core/dist/scramjet_bundled.js +14 -13584
- package/source/packages/scramjet/packages/core/dist/scramjet_bundled.js.map +1 -1
- package/source/packages/scramjet/packages/core/dist/scramjet_bundled.mjs +14 -13634
- package/source/packages/scramjet/packages/core/dist/scramjet_bundled.mjs.map +1 -1
- package/source/packages/scramjet/packages/core/dist/types/fetch/user-agent.d.ts +31 -0
- package/source/packages/tracker-protocol/package.json +1 -1
- package/source/packages/tracker-protocol/src/index.ts +6 -1
- package/source/pnpm-lock.yaml +1 -1
- package/standalone.html +2 -2
- package/dist/assets/index-MRhaNu_Q.js +0 -3673
- package/dist/assets/inject-xtH4w5z9.js +0 -43
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* User-Agent forwarding.
|
|
3
|
+
*
|
|
4
|
+
* A service worker never sees User-Agent on the request it intercepts - the
|
|
5
|
+
* browser strips it before the fetch event - and nothing further down the proxy
|
|
6
|
+
* adds one. Requests therefore reached origins with no User-Agent at all, and
|
|
7
|
+
* servers that content-negotiate on it served their non-browser representation.
|
|
8
|
+
* ip.me, for instance, answers a bare `text/plain` IP address rather than its
|
|
9
|
+
* actual page.
|
|
10
|
+
*
|
|
11
|
+
* Kept free of the rest of the fetch pipeline's imports so it stays testable on
|
|
12
|
+
* its own.
|
|
13
|
+
*/
|
|
14
|
+
/** The minimal surface this needs from ScramjetHeaders. */
|
|
15
|
+
export interface UserAgentHeaders {
|
|
16
|
+
get(key: string): string | null;
|
|
17
|
+
set(key: string, value: string): void;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The browser's own User-Agent, or null where no navigator is available. Cached
|
|
21
|
+
* because the value cannot change for the life of the worker.
|
|
22
|
+
*/
|
|
23
|
+
export declare function browserUserAgent(): string | null;
|
|
24
|
+
/** Forces the next read to re-detect the User-Agent. Intended for tests. */
|
|
25
|
+
export declare function resetUserAgentCache(): void;
|
|
26
|
+
/**
|
|
27
|
+
* Send the real browser User-Agent, unless the page set one of its own. Passing
|
|
28
|
+
* the browser's string through unchanged keeps a proxied request
|
|
29
|
+
* indistinguishable from a direct one for content negotiation.
|
|
30
|
+
*/
|
|
31
|
+
export declare function applyUserAgentHeader(headers: UserAgentHeaders): void;
|
|
@@ -26,7 +26,12 @@ export const CONTROL_LIMITS = {
|
|
|
26
26
|
maxErrorBytes: 512,
|
|
27
27
|
maxCandidatesReturned: 3,
|
|
28
28
|
maxIceCandidates: 256,
|
|
29
|
-
|
|
29
|
+
/**
|
|
30
|
+
* Ceiling on the session capacity a node may advertise. This is a sanity
|
|
31
|
+
* bound on the wire value, not a limit on concurrent sessions: nodes do not
|
|
32
|
+
* refuse sessions for exceeding their advertised capacity.
|
|
33
|
+
*/
|
|
34
|
+
maxNodeSessions: 65_536,
|
|
30
35
|
} as const;
|
|
31
36
|
|
|
32
37
|
export type NodeLifecycleState =
|
package/source/pnpm-lock.yaml
CHANGED
package/standalone.html
CHANGED
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
<div id="roxxie-browser"></div>
|
|
19
19
|
<script
|
|
20
20
|
defer
|
|
21
|
-
src="https://cdn.jsdelivr.net/npm/roxxie-proxy-u-prod@0.
|
|
22
|
-
integrity="sha384-
|
|
21
|
+
src="https://cdn.jsdelivr.net/npm/roxxie-proxy-u-prod@0.3.0/embed.js"
|
|
22
|
+
integrity="sha384-njIFCNZAx6YwA02XL4JGMzcsiVqHuTRWutGa/G1NzqEe0t0V+gWPNEe0XCTde9Q3"
|
|
23
23
|
crossorigin="anonymous"
|
|
24
24
|
data-roxxie-target="#roxxie-browser"
|
|
25
25
|
></script>
|