Skip to content

Linux service integration: packaging + FFI updates#8430

Open
atavism wants to merge 20 commits intomainfrom
atavism/linux-updates
Open

Linux service integration: packaging + FFI updates#8430
atavism wants to merge 20 commits intomainfrom
atavism/linux-updates

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @garmr-ulfr I will fix that

@atavism atavism marked this pull request as ready for review January 30, 2026 20:22
@garmr-ulfr
Copy link
Contributor

@atavism heads-up, I am in the middle of making some changes to for authenticating the client connected to the socket and respect the provided socket path if it ends with the file name. ATM radiance will tack on radiance.sock to whatever is provided, assuming it's a directory.

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.

2 participants