sing-box icon indicating copy to clipboard operation
sing-box copied to clipboard

如何在MacOS平台构建可以使用tailscale的版本

Open flyzstu opened this issue 1 year ago • 7 comments

我在使用1.12.0-beta.28版本遇到了问题,官方发布的dmg无法使用tailscale。

Image

翻了一下makefile,也没看明白-tags是哪里传的,因此想来咨询一下社区。

感谢您的回复。

flyzstu avatar Jun 25 '25 13:06 flyzstu

下载了源码可以这样编译


$ export VERSION=$(go run ./cmd/internal/read_tag) 


$ go build -v -trimpath -tags \ 
        "with_gvisor,with_quic,with_dhcp,with_wireguard,with_utls,with_acme,with_clash_api,with_tailscale" \
        -o ./sing-box \
        -ldflags "-X \"github.com/sagernet/sing-box/constant.Version=$VERSION\" -s -w -buildid=" \
        ./cmd/sing-box



ipoyang7 avatar Jun 27 '25 08:06 ipoyang7

下载了源码可以这样编译

$ export VERSION=$(go run ./cmd/internal/read_tag)

$ go build -v -trimpath -tags \ "with_gvisor,with_quic,with_dhcp,with_wireguard,with_utls,with_acme,with_clash_api,with_tailscale"
-o ./sing-box
-ldflags "-X "github.com/sagernet/sing-box/constant.Version=$VERSION" -s -w -buildid="
./cmd/sing-box

感谢您的回复,我想知道如何在MacOS系统上构建一个带GUI的SFM.dmg,谢谢!

flyzstu avatar Jun 27 '25 09:06 flyzstu

下载了源码可以这样编译 $ export VERSION=$(go run ./cmd/internal/read_tag) $ go build -v -trimpath -tags
"with_gvisor,with_quic,with_dhcp,with_wireguard,with_utls,with_acme,with_clash_api,with_tailscale" -o ./sing-box -ldflags "-X "github.com/sagernet/sing-box/constant.Version=$VERSION" -s -w -buildid=" ./cmd/sing-box

感谢您的回复,我想知道如何在MacOS系统上构建一个带GUI的SFM.dmg,谢谢!

下载sing-box-for-apple 用xcode打开, 编译Mac平台的内核拖到xcode,该改的改一改,打包就OK了。需要你的账号已经是苹果开发者账号哦,如果不是,就掏个688一年,认证开发者就行了。

huajiao238 avatar Jun 28 '25 18:06 huajiao238

下载了源码可以这样编译 $ export VERSION=$(go run ./cmd/internal/read_tag) $ go build -v -trimpath -tags "with_gvisor,with_quic,with_dhcp,with_wireguard,with_utls,with_acme,with_clash_api,with_tailscale" -o ./sing-box -ldflags "-X "github.com/sagernet/sing-box/constant.Version=$VERSION" -s -w -buildid=" ./cmd/sing-box

感谢您的回复,我想知道如何在MacOS系统上构建一个带GUI的SFM.dmg,谢谢!

下载sing-box-for-apple 用xcode打开, 编译Mac平台的内核拖到xcode,该改的改一改,打包就OK了。需要你的账号已经是苹果开发者账号哦,如果不是,就掏个688一年,认证开发者就行了。

如果只是自用不需要交钱吧?

Glide01 avatar Jun 30 '25 12:06 Glide01

请确认新版是否已经恢复 tailscale。

nekohasekai avatar Jul 01 '25 04:07 nekohasekai

@Glide01 自用也需要付费开发者账号,sing-box-for-apple 项目启用了一些仅限付费开发者账号使用的功能,如Network Extensions。

PS: macOS App Store啥时候能恢复更新sing-box VT啊,没时间处理的话我们可以帮忙。@nekohasekai

beebird avatar Jul 09 '25 03:07 beebird

请确认新版是否已经恢复 tailscale。

新版本还是不行,无法弹出tailscale通知 brew安装的SFM,core是1.12.3

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'bundleProxyForCurrentProcess is nil: mainBundle.bundleURL file:///Library/SystemExtensions/C40AEA84-4321-4C19-978C-655A73578EF1/io.nekohasekai.sfavt.system.systemextension/'
*** First throw call stack:
(
        0   CoreFoundation                      0x0000000187fa2ca0 __exceptionPreprocess + 176
        1   libobjc.A.dylib                     0x0000000187a66b90 objc_exception_throw + 88
        2   Foundation                          0x00000001895b1a78 -[NSCalendarDate initWithCoder:] + 0
        3   UserNotifications                   0x0000000195e74e58 __53+[UNUserNotificationCenter currentNotificationCenter]_block_invoke.cold.2 + 116
        4   UserNotifications                   0x0000000195e434d8 __53+[UNUserNotificationCenter currentNotificationCenter]_block_invoke + 472
        5   libdispatch.dylib                   0x0000000187ca885c _dispatch_client_callout + 16
        6   libdispatch.dylib                   0x0000000187c91a28 _dispatch_once_callout + 32
        7   UserNotifications                   0x0000000195e432fc +[UNUserNotificationCenter currentNotificationCenter] + 156
        8   Library                             0x00000001051b19ec block_destroy_helper + 3372
        9   Library                             0x00000001051b05d0 objectdestroy.2Tm + 24644
        10  Library                             0x00000001060b3868 cproxylibbox_PlatformInterface_SendNotification + 236
        11  Library                             0x000000010609698c _cgo_74a7838e4167_Cfunc_cproxylibbox_PlatformInterface_SendNotification + 52
        12  Library                             0x0000000105451a4c runtime.asmcgocall.abi0 + 124
)
libc++abi: terminating due to uncaught exception of type NSException

panda2134 avatar Aug 28 '25 16:08 panda2134