Server: unchanged shape, just added a "signal" message type to the existing /api/send + /api/stream bus. Now carries both "clipboard" (payload) and "signal" (offer/answer/ICE) over the same envelope. Client: -rtc flag turns the Go listener into a Pion peer. Posts an SDP offer at startup, accepts the browser's answer through the signaling bus, exchanges ICE, then receives clipboard text over a DataChannel named "tether". On message: writes to OS clipboard same as SSE path. Web UI: acts as the answerer. Listens for "signal" SSE events, replies to offers, exchanges ICE. When DataChannel opens, the send button uses RTCDataChannel.send() instead of POST /api/send — data no longer traverses the server after pairing. Pill in the header flips sse → negotiating → rtc to make this visible. Toolchain: bumped go.mod to go 1.26, switched to pion/webrtc v4 and prometheus/client_golang v1.23.x. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
42 lines
1.5 KiB
Modula-2
42 lines
1.5 KiB
Modula-2
module github.com/pecord/tether
|
|
|
|
go 1.26
|
|
|
|
require (
|
|
github.com/atotto/clipboard v0.1.4
|
|
github.com/pion/webrtc/v4 v4.2.12
|
|
github.com/prometheus/client_golang v1.23.2
|
|
)
|
|
|
|
require (
|
|
github.com/beorn7/perks v1.0.1 // indirect
|
|
github.com/cespare/xxhash/v2 v2.3.0 // indirect
|
|
github.com/google/uuid v1.6.0 // indirect
|
|
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
|
|
github.com/pion/datachannel v1.6.0 // indirect
|
|
github.com/pion/dtls/v3 v3.1.2 // indirect
|
|
github.com/pion/ice/v4 v4.2.5 // indirect
|
|
github.com/pion/interceptor v0.1.44 // indirect
|
|
github.com/pion/logging v0.2.4 // indirect
|
|
github.com/pion/mdns/v2 v2.1.0 // indirect
|
|
github.com/pion/randutil v0.1.0 // indirect
|
|
github.com/pion/rtcp v1.2.16 // indirect
|
|
github.com/pion/rtp v1.10.1 // indirect
|
|
github.com/pion/sctp v1.9.5 // indirect
|
|
github.com/pion/sdp/v3 v3.0.18 // indirect
|
|
github.com/pion/srtp/v3 v3.0.10 // indirect
|
|
github.com/pion/stun/v3 v3.1.2 // indirect
|
|
github.com/pion/transport/v4 v4.0.1 // indirect
|
|
github.com/pion/turn/v5 v5.0.3 // indirect
|
|
github.com/prometheus/client_model v0.6.2 // indirect
|
|
github.com/prometheus/common v0.66.1 // indirect
|
|
github.com/prometheus/procfs v0.16.1 // indirect
|
|
github.com/wlynxg/anet v0.0.5 // indirect
|
|
go.yaml.in/yaml/v2 v2.4.2 // indirect
|
|
golang.org/x/crypto v0.48.0 // indirect
|
|
golang.org/x/net v0.50.0 // indirect
|
|
golang.org/x/sys v0.41.0 // indirect
|
|
golang.org/x/time v0.14.0 // indirect
|
|
google.golang.org/protobuf v1.36.8 // indirect
|
|
)
|