You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add peer-share toggle to lantern-core (Share My Connection PR 3/4)
PR 3 of 4 implementing the lantern-side wiring for "Share My
Connection". Bumps radiance to fisk/peer-localbackend tip so we can
reference the new PeerShareEnabledKey setting; that bump is provisional
and should be re-pinned to a release tag once radiance #460 merges.
* lantern-core/core.go: new PeerShare interface (mirrors Ads /
SmartRouting), embedded in Core. SetPeerShareEnabled patches
PeerShareEnabledKey via the radiance ipc client; IsPeerShareEnabled
reads the snapshot.
* lantern-core/ffi/ffi.go: new //export setPeerProxyEnabled and
//export isPeerProxyEnabled, mirroring setBlockAdsEnabled exactly.
The Dart FFI binding name uses "PeerProxy" to match the existing
user-facing naming in the lantern repo (vpn_setting.dart toggle was
drafted as "Peer Proxy").
* lantern-core/mobile/mobile.go: SetPeerShareEnabled / IsPeerShareEnabled
for the gomobile-bind surface so Android can toggle once Dart wires
it up in PR 4.
The lifecycle path:
Dart toggle → setPeerProxyEnabled(enabled)
→ LanternCore.SetPeerShareEnabled
→ ipc.Client.PatchSettings({PeerShareEnabledKey: ...})
→ radiance LocalBackend.PatchSettings dispatch
→ peer.Client.Start / Stop
ffigen regen for the Dart bindings happens in PR 4 alongside the Dart
wire-through and rollback logic.
go test ./lantern-core/... and golangci-lint --new-from-rev=origin/main
both clean.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments