tturn 0.1.3 → 0.1.4

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Tturn
2
2
 
3
- [English (default)](./README.md) | [中文](./README.zh-CN.md)
3
+ [English (default)](./README.md) | [中文](./README.zh-CN.md) | [Changelog](./CHANGELOG.md)
4
4
 
5
5
  `tturn` is a high-performance TURN server package for Node.js.
6
6
  It embeds a native Rust core via N-API, so you can install from npm and run directly.
@@ -93,12 +93,12 @@ Optional env:
93
93
 
94
94
  - `TURN_PUBLIC_IP`
95
95
  - `TURN_PORT`
96
- - `TURN_MIN_PORT`
97
- - `TURN_MAX_PORT`
96
+ - `TURN_MIN_PORT` (must be provided together with `TURN_MAX_PORT`)
97
+ - `TURN_MAX_PORT` (must be provided together with `TURN_MIN_PORT`)
98
98
  - `TTURN_TTL_SEC`
99
99
  - `TTURN_USER_ID`
100
100
  - `TTURN_USERNAME` (or `TURN_USERNAME`)
101
- - `TTURN_DISABLE_CREDENTIAL_EXPIRY` (`1` or `true`)
101
+ - `TTURN_DISABLE_CREDENTIAL_EXPIRY` (`1`/`true` keeps credentials non-expiring; set `0`/`false` to enable expiry)
102
102
 
103
103
  ## API options
104
104
 
@@ -110,8 +110,12 @@ Optional env:
110
110
  - `listeningIp` (default `0.0.0.0`): bind address.
111
111
  - `username` / `userId` (optional): default credential username seed. `username` has higher priority.
112
112
  - `ttlSec` (optional): default credential TTL used by `start()` and `issueCredential()`.
113
- - `disableCredentialExpiry` (optional): disable timestamp expiry check and issue non-expiring credentials.
114
- - `minPort` / `maxPort`: relay allocation port range (effective in native TURN allocator).
113
+ - `disableCredentialExpiry` (optional, default `true`): disable timestamp expiry check and issue non-expiring credentials. Set to `false` to enforce expiry.
114
+ - `minPort` / `maxPort`: relay allocation port range (must be configured as a pair).
115
+
116
+ Transport note:
117
+
118
+ - Current native implementation exposes UDP relay URLs only (`turn:...?...transport=udp`).
115
119
 
116
120
  At least one of `authSecret` or `password` must be provided.
117
121
 
package/README.zh-CN.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Tturn(中文)
2
2
 
3
- [English(主文档)](./README.md) | [中文](./README.zh-CN.md)
3
+ [English(主文档)](./README.md) | [中文](./README.zh-CN.md) | [更新日志](./CHANGELOG.md)
4
4
 
5
5
  `tturn` 是一个高性能的 Node.js TURN 服务包。
6
6
  它使用内嵌原生核心(Rust + N-API),可以直接通过 npm 安装并运行,不依赖 Docker,也不需要额外安装 `turnserver.exe` 作为运行时。
@@ -91,8 +91,12 @@ TURN_REALM=turn.example.com TURN_USERNAME=alice TURN_PASSWORD=alice-pass TTURN_D
91
91
  - `listeningIp`(默认 `0.0.0.0`):本地绑定地址。
92
92
  - `username` / `userId`(可选):默认凭证用户名种子,`username` 优先级更高。
93
93
  - `ttlSec`(可选):`start()` 与 `issueCredential()` 的默认凭证时效。
94
- - `disableCredentialExpiry`(可选):禁用时间戳过期校验,生成不过期凭证。
95
- - `minPort` / `maxPort`:中继分配端口范围(已在 native TURN 分配器中生效)。
94
+ - `disableCredentialExpiry`(可选,默认 `true`):禁用时间戳过期校验,生成不过期凭证。设置为 `false` 时启用过期校验。
95
+ - `minPort` / `maxPort`:中继分配端口范围(必须成对配置)。
96
+
97
+ 传输协议说明:
98
+
99
+ - 当前 native 实现只返回 UDP 中继地址(`turn:...?...transport=udp`)。
96
100
 
97
101
  `authSecret` 和 `password` 至少需要提供一个。
98
102
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tturn",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "High-performance TURN server for Node.js with embedded native core",
5
5
  "keywords": [
6
6
  "turn",
@@ -42,9 +42,11 @@
42
42
  "build": "npm run build:native && tsc -p tsconfig.json",
43
43
  "build:ts": "tsc -p tsconfig.json"
44
44
  },
45
- "dependencies": {},
46
45
  "devDependencies": {
47
- "@types/node": "^22.13.10",
46
+ "@types/node": "^22.19.13",
48
47
  "typescript": "^5.8.2"
48
+ },
49
+ "dependencies": {
50
+ "superpowers": "^0.0.2"
49
51
  }
50
52
  }