@dshn/agent 0.1.2

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.
@@ -0,0 +1,25 @@
1
+ # Bundle layer contributed by dshn-agent.
2
+ #
3
+ # Just the host-half row. There is deliberately NO `connection.trustedHosts`
4
+ # override any more: the agent replays every forwarded request to local dsh with
5
+ # Host/Origin rewritten to loopback, so dsh's /api trust fence accepts it as a
6
+ # local, same-origin request for ANY public subdomain. That is what lets the
7
+ # subdomain be chosen at runtime in the setup dialog instead of baked into the
8
+ # composition — and access is gated by the relay's login, not the fence.
9
+ #
10
+ # No credentials live here either: the user sets subdomain + password in the UI
11
+ # (POST /dshn/configure), and they persist to DSHN_STATE. Only infrastructure is
12
+ # configured here, all with sensible defaults, so `dsh plugin add` then a normal
13
+ # local launch is enough — the dialog does the rest.
14
+ - insert:
15
+ - id: dshn
16
+ name: '@dshn/agent'
17
+ inject: [webServer, settings]
18
+ config:
19
+ enabled: !!js (process.env.DSHN_ENABLED ?? '1') !== '0'
20
+ # Zero-config default goes through Cloudflare. For sustained heavy
21
+ # throughput, point DSHN_RELAY_HOST at a grey-cloud origin
22
+ # (wss://origin.ds.hn:8787) with DSHN_ORIGIN_CA to connect direct.
23
+ relayHost: !!js process.env.DSHN_RELAY_HOST ?? 'relay.ds.hn'
24
+ originCa: !!js process.env.DSHN_ORIGIN_CA ?? ''
25
+ statePath: !!js process.env.DSHN_STATE ?? ''