@hahnfeld/msrelay-provider 0.1.1 → 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.
- package/README.md +6 -8
- package/dist/plugin.js +1 -1
- package/dist/provider.js +4 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -61,15 +61,13 @@ Before installing the plugin, provision these Azure resources:
|
|
|
61
61
|
az relay namespace create \
|
|
62
62
|
--resource-group <rg> --name <namespace> --location westus2
|
|
63
63
|
|
|
64
|
-
# 2. Create Hybrid Connection
|
|
64
|
+
# 2. Create Hybrid Connection with client authorization disabled
|
|
65
|
+
# (required if callers can't send SAS headers — Bot Framework, webhooks, etc.)
|
|
66
|
+
# NOTE: --requires-client-authorization cannot be changed after creation.
|
|
67
|
+
# If you need to change it, delete and recreate the Hybrid Connection.
|
|
65
68
|
az relay hyco create \
|
|
66
|
-
--resource-group <rg> --namespace-name <namespace> --name my-connection
|
|
67
|
-
|
|
68
|
-
# 3. Disable client authorization (required if callers can't send SAS headers —
|
|
69
|
-
# e.g., Bot Framework, external webhooks, third-party services)
|
|
70
|
-
az relay hyco update \
|
|
71
|
-
--resource-group <rg> --namespace-name <namespace> \
|
|
72
|
-
--name my-connection --requires-client-authorization false
|
|
69
|
+
--resource-group <rg> --namespace-name <namespace> --name my-connection \
|
|
70
|
+
--requires-client-authorization false
|
|
73
71
|
|
|
74
72
|
# 4. Create listen-only SAS policy (least privilege)
|
|
75
73
|
az relay hyco authorization-rule create \
|
package/dist/plugin.js
CHANGED
|
@@ -64,7 +64,7 @@ export function createRelayPlugin() {
|
|
|
64
64
|
let provider = null;
|
|
65
65
|
return {
|
|
66
66
|
name: "@hahnfeld/msrelay-provider",
|
|
67
|
-
version: "0.1.
|
|
67
|
+
version: "0.1.2",
|
|
68
68
|
description: "Azure Relay Hybrid Connections tunnel provider — private HTTP tunneling via Azure backbone",
|
|
69
69
|
essential: false,
|
|
70
70
|
permissions: [
|
package/dist/provider.js
CHANGED
|
@@ -171,19 +171,17 @@ export class AzureRelayProvider {
|
|
|
171
171
|
onUnexpectedClose();
|
|
172
172
|
}
|
|
173
173
|
});
|
|
174
|
-
|
|
174
|
+
// hyco-https listen() takes no arguments — readiness is signaled
|
|
175
|
+
// via the 'listening' event when the control channel WebSocket opens.
|
|
176
|
+
server.on("listening", () => {
|
|
175
177
|
clearTimeout(timeout);
|
|
176
|
-
if (err) {
|
|
177
|
-
this.server = null;
|
|
178
|
-
settle(() => reject(new Error(`Azure Relay listen failed: ${err.message}`)));
|
|
179
|
-
return;
|
|
180
|
-
}
|
|
181
178
|
this.publicUrl = `https://${relayNamespace}/${hybridConnectionName}`;
|
|
182
179
|
if (!this.metrics.startedAt) {
|
|
183
180
|
this.metrics.startedAt = new Date();
|
|
184
181
|
}
|
|
185
182
|
settle(() => resolve(this.publicUrl));
|
|
186
183
|
});
|
|
184
|
+
server.listen();
|
|
187
185
|
});
|
|
188
186
|
}
|
|
189
187
|
/**
|