Documentation
¶
Overview ¶
Package unbounded implements a consumer-side Unbounded outbound for sing-box.
Unbounded is Lantern's WebRTC-based peer-to-peer circumvention system. A volunteer "producer" (a browser tab running the Unbounded widget) pairs with a "consumer" (this outbound). The consumer sends QUIC-over-data-channel to the producer, which forwards it to an egress server that speaks plain internet.
Architecture in the refactored radiance ¶
The outbound lives entirely inside the VPN tunnel process (the Android VPN service, the iOS/macOS NetworkExtension, the Windows service, or the Linux daemon). That makes the plumbing simpler than the split-process design:
- broflake + pion run in the same process that owns the TUN
- signaling to freddie goes out the physical interface because the hosting process injects a kindling-backed RoundTripper via adapter.ContextWithDirectTransport
- STUN/DTLS to the peer goes through the sing-box dialer — we bind straight to the physical interface via the direct outbound, which in turn applies VpnService.protect / IP_BOUND_IF automatically
Options ¶
option.UnboundedOutboundOptions holds only JSON-serializable fields. Runtime-only deps (HTTP transport for signaling, helper pairing tickets, logger) come in via the ctx and the sing-box logger interface.
Index ¶
- func NewOutbound(ctx context.Context, router adapter.Router, lg sblog.ContextLogger, tag string, ...) (adapter.Outbound, error)
- func RegisterOutbound(registry *outbound.Registry)
- type Outbound
- func (o *Outbound) Close() error
- func (o *Outbound) DialContext(ctx context.Context, network string, destination M.Socksaddr) (net.Conn, error)
- func (o *Outbound) ListenPacket(ctx context.Context, destination M.Socksaddr) (net.PacketConn, error)
- func (o *Outbound) Start(stage adapter.StartStage) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewOutbound ¶
func RegisterOutbound ¶
RegisterOutbound registers the Unbounded outbound with the given sing-box OutboundRegistry.
Types ¶
type Outbound ¶
Outbound is the consumer-side Unbounded outbound.
Construction (NewOutbound) collects options and produces a zero-value broflake tree. The WebRTC + QUIC machinery doesn't spin up until Start is called at PostStart — that's when the tunnel's direct outbound is ready to accept dials, so any earlier attempt would hit "no available network interface" on Android.