diff --git a/docs/docs/integrations/springboot.mdx b/docs/docs/integrations/springboot.mdx index 5e2434a..0558b3f 100644 --- a/docs/docs/integrations/springboot.mdx +++ b/docs/docs/integrations/springboot.mdx @@ -32,21 +32,19 @@ import TabItem from '@theme/TabItem'; ## 最小配置 -`local-port` / `name` 可省略:未填时分别使用 Spring Boot Web 端口与 `spring.application.name`(或 `orbien-{protocol}`)。 - ```yaml # application.yml orbien: enabled: true server: "127.0.0.1:9527" - # token: YOUR_TOKEN # 可选 + # token: YOUR_TOKEN tunnel: protocol: http domains: - - web.domain.com + - web.example.com ``` -服务端需关闭多路复用,例如: +服务端需关闭多路复用: ```toml # orbien-server.toml @@ -54,7 +52,20 @@ listen = "0.0.0.0:9527" httpGwPort = 80 [transport] -tcpMux = false # 关闭 TCP 多路复用 +tcpMux = false +``` + +## TCP 示例 + +```yaml +orbien: + enabled: true + server: "127.0.0.1:9527" + token: YOUR_TOKEN + tunnel: + protocol: tcp + # local-port: 3306 + remote-port: 9000 ``` ## 完整参考 @@ -65,18 +76,35 @@ orbien: enabled: true server: "127.0.0.1:9527" token: YOUR_TOKEN - tcp-mux: false # 必须为 false,且与服务端一致 - pool-count: 1 # 登录时预申请的数据连接池大小 + tcp-mux: false # 必须为 false + pool-count: 1 heartbeat-interval-secs: 30 - user: spring-boot-demo # 可选,展示在 Dashboard - # session-id: "" # 可选;为空则从 session-id-file 恢复,或自动生成 - # session-id-file: "" # 可选;为空则使用用户目录下的默认路径 + user: spring-boot-demo tunnel: - name: web-demo # 可选 - protocol: http # tcp | http + name: web-demo + protocol: http local-ip: 127.0.0.1 - # local-port: 8080 # 可选;未填则使用 Spring Boot 监听端口 - # remote-port: 9000 # 仅 protocol=tcp 时需要 - domains: # protocol=http 时必填 - - web.domain.com + # local-port: 8080 + # remote-port: 9000 + domains: + - web.example.com + # - admin ``` + +## 配置项说明 + +| 配置项 | 默认值 | 说明 | +| --- | --- | --- | +| `orbien.enabled` | `true` | 是否启用 | +| `orbien.server` | `127.0.0.1:9527` | 服务端地址| +| `orbien.token` | 空 | 鉴权 token| +| `orbien.tcp-mux` | `false` | 仅允许 `false`| +| `orbien.pool-count` | `1` | 登录时预申请的数据连接数| +| `orbien.heartbeat-interval-secs` | `30` | 控制面心跳间隔(秒)| +| `orbien.user` | 空 | 展示用用户名 | +| `orbien.tunnel.name` | 见上文 | 隧道名 | +| `orbien.tunnel.protocol` | `tcp` | `tcp` 或 `http` | +| `orbien.tunnel.local-ip` | `127.0.0.1` | 本地服务 IP | +| `orbien.tunnel.local-port` | `0` | 本地服务端口| +| `orbien.tunnel.remote-port` | `0` | 服务端对外端口;`protocol=tcp` 时必填 | +| `orbien.tunnel.domains` | `[]` | HTTP 域名列表;`protocol=http` 时必填 | diff --git a/docs/i18n/en/docusaurus-plugin-content-docs/current/integrations/springboot.mdx b/docs/i18n/en/docusaurus-plugin-content-docs/current/integrations/springboot.mdx index 25e3f2c..f4a7eed 100644 --- a/docs/i18n/en/docusaurus-plugin-content-docs/current/integrations/springboot.mdx +++ b/docs/i18n/en/docusaurus-plugin-content-docs/current/integrations/springboot.mdx @@ -11,7 +11,7 @@ import TabItem from '@theme/TabItem'; - Tunnel protocols: **TCP** and **HTTP** only - Transport: **TCP** only -- **No TCP multiplexing**: set `orbien.tcp-mux` to `false`, and set `[transport].tcpMux = false` on the server (multiplexing is on by default; turn it off when using the Java client) +- **No TCP multiplexing**: `orbien.tcp-mux` must be `false`, and the server must also set `[transport].tcpMux = false` (multiplexing is on by default; turn it off when using the Java client) @@ -32,21 +32,19 @@ import TabItem from '@theme/TabItem'; ## Minimal configuration -`local-port` and `name` are optional. When omitted, the starter uses the Spring Boot web port and `spring.application.name` (or `orbien-{protocol}`). - ```yaml # application.yml orbien: enabled: true server: "127.0.0.1:9527" - # token: YOUR_TOKEN # optional + # token: YOUR_TOKEN tunnel: protocol: http domains: - - web.domain.com + - web.example.com ``` -Disable multiplexing on the server, for example: +Disable multiplexing on the server: ```toml # orbien-server.toml @@ -54,7 +52,20 @@ listen = "0.0.0.0:9527" httpGwPort = 80 [transport] -tcpMux = false # disable TCP multiplexing +tcpMux = false +``` + +## TCP example + +```yaml +orbien: + enabled: true + server: "127.0.0.1:9527" + token: YOUR_TOKEN + tunnel: + protocol: tcp + # local-port: 3306 + remote-port: 9000 ``` ## Full reference @@ -65,18 +76,35 @@ orbien: enabled: true server: "127.0.0.1:9527" token: YOUR_TOKEN - tcp-mux: false # must be false and match the server - pool-count: 1 # data-connection pool size requested at login + tcp-mux: false # must be false + pool-count: 1 heartbeat-interval-secs: 30 - user: spring-boot-demo # optional; shown on the dashboard - # session-id: "" # optional; if empty, restore from session-id-file or generate - # session-id-file: "" # optional; if empty, use the default path under the user home + user: spring-boot-demo tunnel: - name: web-demo # optional - protocol: http # tcp | http + name: web-demo + protocol: http local-ip: 127.0.0.1 - # local-port: 8080 # optional; defaults to the Spring Boot listen port - # remote-port: 9000 # required when protocol=tcp - domains: # required when protocol=http - - web.domain.com + # local-port: 8080 + # remote-port: 9000 + domains: + - web.example.com + # - admin ``` + +## Configuration reference + +| Key | Default | Description | +| --- | --- | --- | +| `orbien.enabled` | `true` | Whether to enable | +| `orbien.server` | `127.0.0.1:9527` | Server address | +| `orbien.token` | empty | Auth token | +| `orbien.tcp-mux` | `false` | Only `false` is allowed | +| `orbien.pool-count` | `1` | Data connections pre-allocated at login | +| `orbien.heartbeat-interval-secs` | `30` | Control-plane heartbeat interval (seconds) | +| `orbien.user` | empty | Display username | +| `orbien.tunnel.name` | see above | Tunnel name | +| `orbien.tunnel.protocol` | `tcp` | `tcp` or `http` | +| `orbien.tunnel.local-ip` | `127.0.0.1` | Local service IP | +| `orbien.tunnel.local-port` | `0` | Local service port | +| `orbien.tunnel.remote-port` | `0` | Public port on the server; required when `protocol=tcp` | +| `orbien.tunnel.domains` | `[]` | HTTP domain list; required when `protocol=http` |