Skip to content

Conversation

@atavism
Copy link
Contributor

@atavism atavism commented Jan 22, 2026

For https://github.com/getlantern/engineering/issues/2836

  • Adds Makefile targets to build/stage lanternsvc + systemd unit into the packaging root
  • Adds Linux lanternsvc daemon entrypoint and wires FFI VPN controls to it over IPC

@atavism atavism marked this pull request as draft January 22, 2026 15:55
Comment on lines +201 to +214
_ = ipc.StartService(ctx, "", "")

if locationType == "auto" || tag == "" {
return C.CString("ok")
}

mode, err := ipc.GetClashMode(ctx)
if err != nil || mode == "" {
mode = "global"
}

if err := ipc.SelectOutbound(ctx, mode, tag); err != nil {
return SendError(fmt.Errorf("select outbound failed: %w", err))
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While you can use the ipc functions directly, for connecting/selecting servers (_e.g. connectToServer) at least, I would recommend using vpn.ConnectToServer/vpn.QuickConnect. They ensure the correct clash mode is used — of which only auto, lantern, and user are valid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants