@cc-livekit/ttsignal 1.0.17 → 1.0.19
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/build/Release/ttsignal.darwin.arm64.node +0 -0
- package/build/Release/ttsignal.darwin.x64.node +0 -0
- package/build/Release/ttsignal.linux.arm64.node +0 -0
- package/build/Release/ttsignal.linux.x64.node +0 -0
- package/build/Release/ttsignal.win32.x64.node +0 -0
- package/index.js +34 -0
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/index.js
CHANGED
|
@@ -1009,11 +1009,31 @@ ttsignal.ServerConnection.prototype.close = function(){
|
|
|
1009
1009
|
* so application code does NOT need to call `connection.restart()`
|
|
1010
1010
|
* manually. Set `disableAutoRestart: true` for long-lived server
|
|
1011
1011
|
* deployments where the box never roams.
|
|
1012
|
+
* @param config.proxyUrl {String=} optional MASQUE CONNECT-UDP (RFC 9298)
|
|
1013
|
+
* proxy. When set, every connection created from this connector tunnels its
|
|
1014
|
+
* QUIC packets to the real server through an HTTP/3 CONNECT-UDP session to
|
|
1015
|
+
* this proxy (the proxy must speak MASQUE connect-udp). Accepted forms:
|
|
1016
|
+
* `masque://host:port`, `https://host:port`, `h3://host:port`, or a bare
|
|
1017
|
+
* `host:port` (defaults to MASQUE). Port defaults to 443; IPv6 must be
|
|
1018
|
+
* bracketed (`[2001:db8::1]:443`). Alias: `proxy_url`.
|
|
1019
|
+
* @param config.proxyHost {String=} optional, proxy host. Overrides the host
|
|
1020
|
+
* parsed from `proxyUrl`; setting it alone enables the MASQUE proxy.
|
|
1021
|
+
* Alias: `proxy_host`.
|
|
1022
|
+
* @param config.proxyPort {Number=} optional, proxy port (default 443).
|
|
1023
|
+
* Alias: `proxy_port`.
|
|
1024
|
+
* @param config.proxySni {String=} optional, TLS SNI presented to the proxy
|
|
1025
|
+
* (defaults to the proxy host). Alias: `proxy_sni`.
|
|
1012
1026
|
* @example
|
|
1013
1027
|
* var connector = ttsignal.createConnector({
|
|
1014
1028
|
* alpn: 'ttsignal',
|
|
1015
1029
|
* disableAutoRestart: false, // default
|
|
1016
1030
|
* });
|
|
1031
|
+
* @example
|
|
1032
|
+
* // Route all connections through a MASQUE CONNECT-UDP proxy:
|
|
1033
|
+
* var connector = ttsignal.createConnector({
|
|
1034
|
+
* alpn: 'ttsignal',
|
|
1035
|
+
* proxyUrl: 'masque://proxy.example.com:443',
|
|
1036
|
+
* });
|
|
1017
1037
|
**/
|
|
1018
1038
|
ttsignal.createConnector = function(config){
|
|
1019
1039
|
if (typeof config !== 'object') {
|
|
@@ -1025,6 +1045,20 @@ ttsignal.createConnector = function(config){
|
|
|
1025
1045
|
if (config.caCertPem && !config.ca_cert_pem) {
|
|
1026
1046
|
config.ca_cert_pem = config.caCertPem;
|
|
1027
1047
|
}
|
|
1048
|
+
// MASQUE CONNECT-UDP proxy config: accept camelCase aliases and forward as
|
|
1049
|
+
// the snake_case keys the native layer reads (proxy_url/host/port/sni).
|
|
1050
|
+
if (config.proxyUrl && !config.proxy_url) {
|
|
1051
|
+
config.proxy_url = config.proxyUrl;
|
|
1052
|
+
}
|
|
1053
|
+
if (config.proxyHost && !config.proxy_host) {
|
|
1054
|
+
config.proxy_host = config.proxyHost;
|
|
1055
|
+
}
|
|
1056
|
+
if (config.proxyPort && !config.proxy_port) {
|
|
1057
|
+
config.proxy_port = config.proxyPort;
|
|
1058
|
+
}
|
|
1059
|
+
if (config.proxySni && !config.proxy_sni) {
|
|
1060
|
+
config.proxy_sni = config.proxySni;
|
|
1061
|
+
}
|
|
1028
1062
|
return ttsignal.__createConnector__(config);
|
|
1029
1063
|
}
|
|
1030
1064
|
|