mirror of
https://github.com/openlibrecommunity/olcrtc.git
synced 2026-05-26 23:19:47 +00:00
docs: replace em dashes with hyphens in docs and comments
This commit is contained in:
16
docs/fast.md
16
docs/fast.md
@@ -330,20 +330,20 @@ podman stop olcrtc-client
|
||||
|
||||
## Несколько инстансов на одном сервере
|
||||
|
||||
Можно запустить несколько серверов olcrtc на одной машине с разными конфигами (разные провайдеры, комнаты, транспорты). Просто запусти `srv.sh` повторно — каждый запуск создаёт контейнер с уникальным именем (`olcrtc-server-<random>`), они не конфликтуют между собой.
|
||||
Можно запустить несколько серверов olcrtc на одной машине с разными конфигами (разные провайдеры, комнаты, транспорты). Просто запусти `srv.sh` повторно - каждый запуск создаёт контейнер с уникальным именем (`olcrtc-server-<random>`), они не конфликтуют между собой.
|
||||
|
||||
```sh
|
||||
./script/srv.sh # первый инстанс — например jitsi + datachannel
|
||||
./script/srv.sh # второй инстанс — например wbstream + vp8channel
|
||||
./script/srv.sh # третий — другая комната, другой провайдер, и т.д.
|
||||
./script/srv.sh # первый инстанс - например jitsi + datachannel
|
||||
./script/srv.sh # второй инстанс - например wbstream + vp8channel
|
||||
./script/srv.sh # третий - другая комната, другой провайдер, и т.д.
|
||||
```
|
||||
|
||||
Каждый запуск спросит свои параметры (auth, transport, room ID) и выдаст свой ключ шифрования. На клиенте для каждого инстанса запускай отдельный `cnc.sh` с **разными SOCKS5 портами** — чтобы переключаться между ними в olcbox.
|
||||
Каждый запуск спросит свои параметры (auth, transport, room ID) и выдаст свой ключ шифрования. На клиенте для каждого инстанса запускай отдельный `cnc.sh` с **разными SOCKS5 портами** - чтобы переключаться между ними в olcbox.
|
||||
|
||||
```sh
|
||||
./script/cnc.sh # первый клиент — порт 8808 (по умолчанию)
|
||||
./script/cnc.sh # второй клиент — укажи порт 8809
|
||||
./script/cnc.sh # третий — порт 8810, и т.д.
|
||||
./script/cnc.sh # первый клиент - порт 8808 (по умолчанию)
|
||||
./script/cnc.sh # второй клиент - укажи порт 8809
|
||||
./script/cnc.sh # третий - порт 8810, и т.д.
|
||||
```
|
||||
|
||||
Посмотреть все запущенные инстансы:
|
||||
|
||||
@@ -349,7 +349,7 @@ mage mobile # собрать Android AAR
|
||||
|
||||
## Несколько инстансов на одном сервере
|
||||
|
||||
Можно запустить несколько серверов olcrtc на одной машине — каждый со своим конфигом (разные провайдеры, комнаты, транспорты). Для этого создай отдельный YAML-файл для каждого инстанса и запусти каждый в отдельном процессе.
|
||||
Можно запустить несколько серверов olcrtc на одной машине - каждый со своим конфигом (разные провайдеры, комнаты, транспорты). Для этого создай отдельный YAML-файл для каждого инстанса и запусти каждый в отдельном процессе.
|
||||
|
||||
### Пример: два сервера
|
||||
|
||||
@@ -392,7 +392,7 @@ data: data
|
||||
|
||||
### Клиенты
|
||||
|
||||
На клиентской машине — по одному конфигу на каждый сервер, с **разными SOCKS5 портами**:
|
||||
На клиентской машине - по одному конфигу на каждый сервер, с **разными SOCKS5 портами**:
|
||||
|
||||
```yaml
|
||||
# client-jitsi.yaml
|
||||
@@ -435,7 +435,7 @@ data: data
|
||||
./build/olcrtc-linux-amd64 client-wbstream.yaml # SOCKS5 на :8809
|
||||
```
|
||||
|
||||
Переключение между инстансами в olcbox — просто выбираешь нужный SOCKS5 порт.
|
||||
Переключение между инстансами в olcbox - просто выбираешь нужный SOCKS5 порт.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -371,7 +371,7 @@ func (c *Client) handleReconnect(ctx context.Context, cfg Config, cancel context
|
||||
// reconnect callback which then drives a fresh handshake.
|
||||
if reason == "liveness" && c.ln != nil {
|
||||
c.ln.Reconnect("liveness")
|
||||
// Return immediately — retryHandshake over the dead link would
|
||||
// Return immediately - retryHandshake over the dead link would
|
||||
// loop forever with "open control stream: timeout" while holding
|
||||
// reconnectMu, blocking the carrier callback that fires once the
|
||||
// link is actually back up. Let that callback (reason="carrier")
|
||||
|
||||
@@ -212,7 +212,7 @@ func (p *streamTransport) Send(data []byte) error {
|
||||
|
||||
for attempt := range maxSendAttempts {
|
||||
// Only enqueue fragments on the first attempt. Retries just wait
|
||||
// longer — the fragments from the previous attempt are still in
|
||||
// longer - the fragments from the previous attempt are still in
|
||||
// the outbound channel being drained by writerLoop. Re-enqueuing
|
||||
// causes dead-fragment backlog that eventually clogs the channel.
|
||||
if attempt == 0 {
|
||||
|
||||
@@ -109,17 +109,17 @@ type streamTransport struct {
|
||||
localEpoch uint32
|
||||
peerEpoch atomic.Uint32
|
||||
|
||||
kcp *kcpRuntime
|
||||
kcpMu sync.RWMutex
|
||||
reconnectMu sync.Mutex
|
||||
reconnectFn func()
|
||||
kcp *kcpRuntime
|
||||
kcpMu sync.RWMutex
|
||||
reconnectMu sync.Mutex
|
||||
reconnectFn func()
|
||||
peerConfirmed atomic.Bool
|
||||
|
||||
// Multi-peer support: when onPeerData is set, each remote epoch gets
|
||||
// its own KCP runtime and data is routed via onPeerData(peerID, ...).
|
||||
peersMu sync.RWMutex
|
||||
peers map[uint32]*kcpRuntime // epoch → KCP runtime
|
||||
peerOut map[uint32]chan []byte // epoch → outbound queue
|
||||
peersMu sync.RWMutex
|
||||
peers map[uint32]*kcpRuntime // epoch → KCP runtime
|
||||
peerOut map[uint32]chan []byte // epoch → outbound queue
|
||||
}
|
||||
|
||||
// New creates a vp8channel transport backed by a carrier engine.
|
||||
@@ -722,7 +722,7 @@ func (p *streamTransport) handleIncomingFrame(frame []byte) {
|
||||
// session so multiple clients can coexist in the same room.
|
||||
func (p *streamTransport) handlePeerFrame(peerEpoch uint32, kcpPayload []byte) {
|
||||
if len(kcpPayload) == 0 {
|
||||
// Keepalive — ensure peer is registered but nothing to deliver.
|
||||
// Keepalive - ensure peer is registered but nothing to deliver.
|
||||
p.getOrCreatePeerKCP(peerEpoch)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user