mirror of
https://github.com/orbien-org/orbien.git
synced 2026-09-25 00:01:36 +00:00
111 lines
2.7 KiB
Plaintext
111 lines
2.7 KiB
Plaintext
---
|
|
sidebar_position: 1
|
|
sidebar_label: Spring Boot
|
|
---
|
|
import Tabs from '@theme/Tabs';
|
|
import TabItem from '@theme/TabItem';
|
|
|
|
# Spring Boot Integration
|
|
|
|
**Orbien** provides an embeddable Java client for Spring Boot. Current scope:
|
|
|
|
- Tunnel protocols: **TCP** and **HTTP** only
|
|
- Transport: **TCP** only
|
|
- **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)
|
|
|
|
<Tabs>
|
|
<TabItem value="Maven" label="Maven" default>
|
|
```xml
|
|
<dependency>
|
|
<groupId>io.github.lxien</groupId>
|
|
<artifactId>orbien-spring-boot-starter</artifactId>
|
|
<version>3.6.1-beta.1</version>
|
|
</dependency>
|
|
```
|
|
</TabItem>
|
|
<TabItem value="Gradle" label="Gradle">
|
|
```groovy
|
|
implementation("io.github.lxien:orbien-spring-boot-starter:3.6.1-beta.1")
|
|
```
|
|
</TabItem>
|
|
</Tabs>
|
|
|
|
## Minimal configuration
|
|
|
|
```yaml
|
|
# application.yml
|
|
orbien:
|
|
enabled: true
|
|
server: "127.0.0.1:9527"
|
|
# token: YOUR_TOKEN
|
|
tunnel:
|
|
protocol: http
|
|
domains:
|
|
- web.example.com
|
|
```
|
|
|
|
Disable multiplexing on the server:
|
|
|
|
```toml
|
|
# orbien-server.toml
|
|
listen = "0.0.0.0:9527"
|
|
httpGwPort = 80
|
|
|
|
[transport]
|
|
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
|
|
|
|
```yaml
|
|
# application.yml
|
|
orbien:
|
|
enabled: true
|
|
server: "127.0.0.1:9527"
|
|
token: YOUR_TOKEN
|
|
tcp-mux: false # must be false
|
|
pool-count: 1
|
|
heartbeat-interval-secs: 30
|
|
user: spring-boot-demo
|
|
tunnel:
|
|
name: web-demo
|
|
protocol: http
|
|
local-ip: 127.0.0.1
|
|
# 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` |
|