Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,14 @@ jobs:

sudo journalctl -u lanternd.service --since "$TEST_START_UTC" --no-pager > /tmp/lanternd-journal-ui-smoke.log

if ! grep -Eq 'IPC request.*path=/service/start' /tmp/lanternd-journal-ui-smoke.log; then
echo "Missing /service/start IPC request in lanternd journal"
if ! grep -Eq 'IPC request.*path=/vpn/connect' /tmp/lanternd-journal-ui-smoke.log; then
echo "Missing /vpn/connect IPC request in lanternd journal"
tail -n 200 /tmp/lanternd-journal-ui-smoke.log || true
exit 1
fi

if ! grep -Eq 'IPC request.*path=/service/stop' /tmp/lanternd-journal-ui-smoke.log; then
echo "Missing /service/stop IPC request in lanternd journal"
if ! grep -Eq 'IPC request.*path=/vpn/disconnect' /tmp/lanternd-journal-ui-smoke.log; then
echo "Missing /vpn/disconnect IPC request in lanternd journal"
tail -n 200 /tmp/lanternd-journal-ui-smoke.log || true
exit 1
fi
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -292,15 +292,15 @@ linux: linux-amd64
linux-service-amd64: $(GO_SOURCES)
$(call MKDIR_P,$(dir $(LINUX_SERVICE_BUILD_AMD64)))
GOOS=linux GOARCH=amd64 CGO_ENABLED=1 \
go build -v -trimpath -tags "$(TAGS)" \
go build -mod=mod -v -trimpath -tags "$(TAGS)" \
-ldflags "-w -s $(EXTRA_LDFLAGS)" \
-o $(LINUX_SERVICE_BUILD_AMD64) $(LINUX_SERVICE_SRC)
@echo "Built Linux service: $(LINUX_SERVICE_BUILD_AMD64)"

linux-service-arm64: $(GO_SOURCES)
$(call MKDIR_P,$(dir $(LINUX_SERVICE_BUILD_ARM64)))
GOOS=linux GOARCH=arm64 CGO_ENABLED=1 \
go build -v -trimpath -tags "$(TAGS)" \
go build -mod=mod -v -trimpath -tags "$(TAGS)" \
-ldflags "-w -s $(EXTRA_LDFLAGS)" \
-o $(LINUX_SERVICE_BUILD_ARM64) $(LINUX_SERVICE_SRC)
@echo "Built Linux service: $(LINUX_SERVICE_BUILD_ARM64)"
Expand Down
5 changes: 2 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ replace github.com/refraction-networking/water => github.com/getlantern/water v0
require (
github.com/Microsoft/go-winio v0.6.2
github.com/alecthomas/assert/v2 v2.3.0
github.com/getlantern/common v1.2.1-0.20260325181816-33f69c725899
github.com/getlantern/lantern-server-provisioner v0.0.0-20251031121934-8ea031fccfa9
github.com/getlantern/radiance v0.0.0-20260326160312-80e8b51cccce
github.com/getlantern/radiance v0.0.0-20260326173647-f4a826182215
github.com/sagernet/sing-box v1.12.22
golang.org/x/mobile v0.0.0-20250711185624-d5bb5ecc55c0
golang.org/x/sys v0.41.0
Expand Down Expand Up @@ -168,6 +167,7 @@ require (
github.com/getlantern/algeneva v0.0.0-20250307163401-1824e7b54f52 // indirect
github.com/getlantern/amp v0.0.0-20260305201851-782bc8045e58 // indirect
github.com/getlantern/appdir v0.0.0-20250324200952-507a0625eb01 // indirect
github.com/getlantern/common v1.2.1-0.20260224184656-5aefb9c21c85 // indirect
github.com/getlantern/dnstt v0.0.0-20260112160750-05100563bd0d // indirect
github.com/getlantern/fronted v0.0.0-20260325003030-cb5041ba1538 // indirect
github.com/getlantern/keepcurrent v0.0.0-20260304213122-017d542145ae // indirect
Expand All @@ -182,7 +182,6 @@ require (
github.com/go-json-experiment/json v0.0.0-20250103232110-6a9a0fde9288 // indirect
github.com/go-llsqlite/adapter v0.0.0-20230927005056-7f5ce7f0c916 // indirect
github.com/go-llsqlite/crawshaw v0.5.6-0.20250312230104-194977a03421 // indirect
github.com/go-resty/resty/v2 v2.16.5 // indirect
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
github.com/gobwas/ws v1.4.0 // indirect
github.com/goccy/go-yaml v1.19.0 // indirect
Expand Down
10 changes: 4 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,8 @@ github.com/getlantern/amp v0.0.0-20260305201851-782bc8045e58 h1:3wxMKw90adxiEzsJ
github.com/getlantern/amp v0.0.0-20260305201851-782bc8045e58/go.mod h1:p6WdG48YAz5SCUpiMSGLy616A6YghKToc63y3NP7avI=
github.com/getlantern/appdir v0.0.0-20250324200952-507a0625eb01 h1:Mmeh4/DA1OKN9tVWRAvTL5efFx4c7v9/55hoK17NclA=
github.com/getlantern/appdir v0.0.0-20250324200952-507a0625eb01/go.mod h1:3vR6+jQdWfWojZ77w+htCqEF5MO/Y2twJOpAvFuM9po=
github.com/getlantern/common v1.2.1-0.20260325181816-33f69c725899 h1:aOKtUREDeyZ9J5Yp0I6zVjSWuMtlLNyfykKQ53VLfTc=
github.com/getlantern/common v1.2.1-0.20260325181816-33f69c725899/go.mod h1:eSSuV4bMPgQJnczBw+KWWqWNo1itzmVxC++qUBPRTt0=
github.com/getlantern/common v1.2.1-0.20260224184656-5aefb9c21c85 h1:jj2Qv6drsceI4v3krNHXSn805QDRqy7w4XMqW359Z18=
github.com/getlantern/common v1.2.1-0.20260224184656-5aefb9c21c85/go.mod h1:eSSuV4bMPgQJnczBw+KWWqWNo1itzmVxC++qUBPRTt0=
github.com/getlantern/context v0.0.0-20220418194847-3d5e7a086201 h1:oEZYEpZo28Wdx+5FZo4aU7JFXu0WG/4wJWese5reQSA=
github.com/getlantern/context v0.0.0-20220418194847-3d5e7a086201/go.mod h1:Y9WZUHEb+mpra02CbQ/QczLUe6f0Dezxaw5DCJlJQGo=
github.com/getlantern/dnstt v0.0.0-20260112160750-05100563bd0d h1:TrauJ2jdJqOAHyQB5wIL0kWN/dipqKagERE1I/TRVSY=
Expand Down Expand Up @@ -259,8 +259,8 @@ github.com/getlantern/osversion v0.0.0-20240418205916-2e84a4a4e175 h1:JWH5BB2o0e
github.com/getlantern/osversion v0.0.0-20240418205916-2e84a4a4e175/go.mod h1:h3S9LBmmzN/xM+lwYZHE4abzTtCTtidKtG+nxZcCZX0=
github.com/getlantern/pluriconfig v0.0.0-20251126214241-8cc8bc561535 h1:rtDmW8YLAuT8r51ApR5z0d8/qjhHu3TW+divQ2C98Ac=
github.com/getlantern/pluriconfig v0.0.0-20251126214241-8cc8bc561535/go.mod h1:WKJEdjMOD4IuTRYwjQHjT4bmqDl5J82RShMLxPAvi0Q=
github.com/getlantern/radiance v0.0.0-20260326160312-80e8b51cccce h1:ARU8+/fVmcz2AJY2SqsrqWV0BHMyY6nmoHGmvWD4PzQ=
github.com/getlantern/radiance v0.0.0-20260326160312-80e8b51cccce/go.mod h1:jn8+Y7vnyULW+8DX1iDp3qKVBa81EUWFVDvMvkaZrQE=
github.com/getlantern/radiance v0.0.0-20260326173647-f4a826182215 h1:yhwUvgUXZ+3h/zdm9paiSKpCO9bCLl29uTk5eaUdY2Y=
github.com/getlantern/radiance v0.0.0-20260326173647-f4a826182215/go.mod h1:UdHjy9sV/4XuVH/3WdAGBdi6hUIiFVsWaZWO6f/5fpY=
github.com/getlantern/samizdat v0.0.3-0.20260310125445-325cf1bd1b60 h1:m9eXjDK9vllbVH467+QXbrxUFFM9Yp7YJ90wZLw4dwU=
github.com/getlantern/samizdat v0.0.3-0.20260310125445-325cf1bd1b60/go.mod h1:uEeykQSW2/6rTjfPlj3MTTo59poSHXfAHTGgzYDkbr0=
github.com/getlantern/sing v0.7.18-lantern h1:QKGgIUA3LwmKYP/7JlQTRkxj9jnP4cX2Q/B+nd8XEjo=
Expand Down Expand Up @@ -314,8 +314,6 @@ github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE=
github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78=
github.com/go-quicktest/qt v1.101.0 h1:O1K29Txy5P2OK0dGo59b7b0LR6wKfIhttaAhHUyn7eI=
github.com/go-quicktest/qt v1.101.0/go.mod h1:14Bz/f7NwaXPtdYEgzsx46kqSxVwTbzVZsDC26tQJow=
github.com/go-resty/resty/v2 v2.16.5 h1:hBKqmWrr7uRc3euHVqmh1HTHcKn99Smr7o5spptdhTM=
github.com/go-resty/resty/v2 v2.16.5/go.mod h1:hkJtXbA2iKHzJheXYvQ8snQES5ZLGKMwQ07xAwp/fiA=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw=
github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4=
Expand Down
13 changes: 11 additions & 2 deletions ios/Tunnel/SingBox/ExtensionProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ class ExtensionProvider: NEPacketTunnelProvider {
if platformInterface == nil {
platformInterface = ExtensionPlatformInterface(self)
}

// Start the IPC server before any VPN operations
var ipcError: NSError?
MobileStartIPCServer(platformInterface, opts(), &ipcError)
if let ipcError {
appLogger.error("error starting IPC server: \(ipcError.localizedDescription)")
throw ipcError
}

let tunnelType = options?["netEx.Type"] as? String
switch tunnelType {
case "Lantern":
Expand Down Expand Up @@ -89,9 +98,9 @@ class ExtensionProvider: NEPacketTunnelProvider {
appLogger.log("(lantern-tunnel) stopping, reason: \(reason)")
stopService()
var error: NSError?
MobileCloseIPC(&error)
MobileCloseIPCServer(&error)
if error != nil {
appLogger.log("error closing IPC \(error?.localizedDescription ?? "")")
appLogger.log("error closing IPC server \(error?.localizedDescription ?? "")")
}
let elapsed = Date().timeIntervalSince(startTime)
appLogger.log("(lantern-tunnel) stopTunnel completed in \(elapsed) seconds")
Expand Down
4 changes: 3 additions & 1 deletion lantern-core/cmd/lanternsvc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ func init() {

func main() {
// Initialize radiance to ensure our directories and logging are set up.
rcommon.InitReadOnly("", "", "trace")
if err := rcommon.Init("", "", "trace"); err != nil {
slog.Error("Failed to initialize radiance", "error", err)
}
consoleMode := flag.Bool("console", false, "Run in console mode instead of Windows service")
flag.Parse()

Expand Down
Loading
Loading