portless 0.8.0 → 0.9.1
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 +51 -51
- package/dist/{chunk-KKXL2CMI.js → chunk-5BR7NCNI.js} +66 -30
- package/dist/cli.js +381 -204
- package/dist/index.d.ts +6 -1
- package/dist/index.js +3 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -47,6 +47,11 @@ type ProxyServer = http.Server | net.Server;
|
|
|
47
47
|
* browsers while keeping WebSocket upgrades working over HTTP/1.1.
|
|
48
48
|
*/
|
|
49
49
|
declare function createProxyServer(options: ProxyServerOptions): ProxyServer;
|
|
50
|
+
/**
|
|
51
|
+
* Create a minimal HTTP server that 302-redirects every request to HTTPS.
|
|
52
|
+
* Meant to run on port 80 alongside an HTTPS proxy on port 443.
|
|
53
|
+
*/
|
|
54
|
+
declare function createHttpRedirectServer(httpsPort: number): http.Server;
|
|
50
55
|
|
|
51
56
|
/** File permission mode for route and state files. */
|
|
52
57
|
declare const FILE_MODE = 420;
|
|
@@ -165,4 +170,4 @@ declare function getManagedHostnames(): string[];
|
|
|
165
170
|
*/
|
|
166
171
|
declare function checkHostResolution(hostname: string): Promise<boolean>;
|
|
167
172
|
|
|
168
|
-
export { DIR_MODE, FILE_MODE, PORTLESS_HEADER, type ProxyServer, type ProxyServerOptions, RouteConflictError, type RouteInfo, type RouteMapping, RouteStore, SYSTEM_DIR_MODE, SYSTEM_FILE_MODE, buildBlock, checkHostResolution, cleanHostsFile, createProxyServer, escapeHtml, extractManagedBlock, fixOwnership, formatUrl, getManagedHostnames, isErrnoException, parseHostname, removeBlock, syncHostsFile };
|
|
173
|
+
export { DIR_MODE, FILE_MODE, PORTLESS_HEADER, type ProxyServer, type ProxyServerOptions, RouteConflictError, type RouteInfo, type RouteMapping, RouteStore, SYSTEM_DIR_MODE, SYSTEM_FILE_MODE, buildBlock, checkHostResolution, cleanHostsFile, createHttpRedirectServer, createProxyServer, escapeHtml, extractManagedBlock, fixOwnership, formatUrl, getManagedHostnames, isErrnoException, parseHostname, removeBlock, syncHostsFile };
|
package/dist/index.js
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
buildBlock,
|
|
10
10
|
checkHostResolution,
|
|
11
11
|
cleanHostsFile,
|
|
12
|
+
createHttpRedirectServer,
|
|
12
13
|
createProxyServer,
|
|
13
14
|
escapeHtml,
|
|
14
15
|
extractManagedBlock,
|
|
@@ -19,7 +20,7 @@ import {
|
|
|
19
20
|
parseHostname,
|
|
20
21
|
removeBlock,
|
|
21
22
|
syncHostsFile
|
|
22
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-5BR7NCNI.js";
|
|
23
24
|
export {
|
|
24
25
|
DIR_MODE,
|
|
25
26
|
FILE_MODE,
|
|
@@ -31,6 +32,7 @@ export {
|
|
|
31
32
|
buildBlock,
|
|
32
33
|
checkHostResolution,
|
|
33
34
|
cleanHostsFile,
|
|
35
|
+
createHttpRedirectServer,
|
|
34
36
|
createProxyServer,
|
|
35
37
|
escapeHtml,
|
|
36
38
|
extractManagedBlock,
|