@goodandready/dsh-lanmode 0.3.0 → 0.3.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 +0 -4
- package/cordis.patch.yml +4 -4
- package/lib/index.js +4 -6
- package/lib/shim.js +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -101,10 +101,6 @@ dsh plugin --profile web add @goodandready/dsh-lanmode
|
|
|
101
101
|
|
|
102
102
|
Restart the harness, then reload the browser.
|
|
103
103
|
|
|
104
|
-
## Credit
|
|
105
|
-
|
|
106
|
-
The index-tap approach and the `crypto.randomUUID` polyfill come from [dsh-web-lan-access](https://github.com/AcidGr/dsh-web-lan-access) (MIT), which solves the secure-context half of this problem. Several other plugins in the same space — `dsh-lan-access`, `dsh-lan`, `dsh-LAN`, `dsh-lan-gate`, `dsh-Remote` — cover binding, mobile layout and device approval; none of them return the settings service, which is what this one is for.
|
|
107
|
-
|
|
108
104
|
## License
|
|
109
105
|
|
|
110
106
|
MIT
|
package/cordis.patch.yml
CHANGED
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
# mode: direct
|
|
14
14
|
# directPort: 3088
|
|
15
15
|
#
|
|
16
|
-
# Note there is deliberately no webserver override here
|
|
17
|
-
#
|
|
18
|
-
#
|
|
19
|
-
#
|
|
16
|
+
# Note there is deliberately no webserver override here: a bind host lives in
|
|
17
|
+
# the config tree, so it cannot be switched from inside a plugin, and it
|
|
18
|
+
# collides with a reverse proxy already holding the port. Direct mode opens a
|
|
19
|
+
# listener of its own instead.
|
|
20
20
|
- insert:
|
|
21
21
|
- id: dsh-lanmode
|
|
22
22
|
name: '@goodandready/dsh-lanmode'
|
package/lib/index.js
CHANGED
|
@@ -17,18 +17,16 @@
|
|
|
17
17
|
//
|
|
18
18
|
// 2. crypto.randomUUID. Существует только на защищённом соединении, а
|
|
19
19
|
// интерфейс зовёт его на пути загрузки. На чистом HTTP по сетевому адресу
|
|
20
|
-
// его нет, и каждый вызов к серверу падает.
|
|
21
|
-
// взяты у dsh-web-lan-access (AcidGr), MIT.
|
|
20
|
+
// его нет, и каждый вызов к серверу падает.
|
|
22
21
|
//
|
|
23
22
|
// 3. navigator.clipboard. Тоже только для защищённого соединения — без него
|
|
24
23
|
// кнопки «Копировать» молчат. Подставляем запасной путь.
|
|
25
24
|
//
|
|
26
25
|
// Всё это вставляется в index.html через официальную точку webServer.tapIndex.
|
|
27
26
|
//
|
|
28
|
-
//
|
|
29
|
-
//
|
|
30
|
-
//
|
|
31
|
-
// перед харнессом стоит обратный прокси на том же порту, они столкнутся.
|
|
27
|
+
// Привязки харнесса к 0.0.0.0 здесь намеренно нет: она задаётся в дереве
|
|
28
|
+
// конфигурации, переключателем быть не может и сталкивается с обратным
|
|
29
|
+
// прокси на том же порту. Вместо неё — прямой режим со своим слушателем.
|
|
32
30
|
|
|
33
31
|
import z from '@deepseek-ai/schemastery'
|
|
34
32
|
import { readFileSync } from 'node:fs'
|
package/lib/shim.js
CHANGED
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
|
|
15
15
|
// ------------------------------------------------------- crypto.randomUUID
|
|
16
16
|
//
|
|
17
|
-
//
|
|
18
|
-
// на
|
|
19
|
-
//
|
|
17
|
+
// Существует только на защищённом соединении, а интерфейс зовёт его при
|
|
18
|
+
// загрузке: на чистом HTTP по сетевому адресу без этого не поднимается
|
|
19
|
+
// вообще ничего.
|
|
20
20
|
if (options.randomUuid) {
|
|
21
21
|
var crypto_ = globalThis.crypto
|
|
22
22
|
if (!crypto_) { try { crypto_ = globalThis.crypto = {} } catch (frozen) { crypto_ = null } }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goodandready/dsh-lanmode",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "LAN and reverse-proxy access for the DeepSeek Harness Web UI: returns the settings service on pages that are not localhost, fills in the Web APIs the browser withholds on plain HTTP, and can open a listener of its own so nothing else is needed.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|