diff --git a/Makefile b/Makefile index 1a1138cc..d1d0e00f 100644 --- a/Makefile +++ b/Makefile @@ -106,13 +106,10 @@ release_android: lib_android update_android_version build_android upload_android publish_android: cd ../sing-box-for-android && ./gradlew :app:publishPlayReleaseBundle && ./gradlew --stop -# TODO: find why and remove `-destination 'generic/platform=iOS'` -# TODO: remove xcode clean when fix control widget fixed build_ios: cd ../sing-box-for-apple && \ rm -rf build/SFI.xcarchive && \ - xcodebuild clean -scheme SFI && \ - xcodebuild archive -scheme SFI -configuration Release -destination 'generic/platform=iOS' -archivePath build/SFI.xcarchive -allowProvisioningUpdates | xcbeautify | grep -A 10 -e "Archive Succeeded" -e "ARCHIVE FAILED" -e "❌" + xcodebuild archive -scheme SFI -configuration Release -archivePath build/SFI.xcarchive -allowProvisioningUpdates | xcbeautify | grep -A 10 -e "Archive Succeeded" -e "ARCHIVE FAILED" -e "❌" upload_ios_app_store: cd ../sing-box-for-apple && \ diff --git a/box.go b/box.go index b4844f9e..91e9fb9b 100644 --- a/box.go +++ b/box.go @@ -250,15 +250,8 @@ func New(options Options) (*Box, error) { } else { tag = F.ToString(i) } - endpointCtx := ctx - if tag != "" { - // TODO: remove this - endpointCtx = adapter.WithContext(endpointCtx, &adapter.InboundContext{ - Outbound: tag, - }) - } err = endpointManager.Create( - endpointCtx, + ctx, router, logFactory.NewLogger(F.ToString("endpoint/", endpointOptions.Type, "[", tag, "]")), tag, @@ -313,15 +306,8 @@ func New(options Options) (*Box, error) { } else { tag = F.ToString(i) } - outboundCtx := ctx - if tag != "" { - // TODO: remove this - outboundCtx = adapter.WithContext(outboundCtx, &adapter.InboundContext{ - Outbound: tag, - }) - } err = outboundManager.Create( - outboundCtx, + ctx, router, logFactory.NewLogger(F.ToString("outbound/", outboundOptions.Type, "[", tag, "]")), tag, @@ -439,15 +425,6 @@ func New(options Options) (*Box, error) { func (s *Box) PreStart() error { err := s.preStart() if err != nil { - // TODO: remove catch error - defer func() { - v := recover() - if v != nil { - println(err.Error()) - debug.PrintStack() - panic("panic on early close: " + fmt.Sprint(v)) - } - }() s.Close() return err } @@ -458,15 +435,6 @@ func (s *Box) PreStart() error { func (s *Box) Start() error { err := s.start() if err != nil { - // TODO: remove catch error - defer func() { - v := recover() - if v != nil { - println(err.Error()) - debug.PrintStack() - println("panic on early start: " + fmt.Sprint(v)) - } - }() s.Close() return err } diff --git a/route/route.go b/route/route.go index 32e07bae..f9188b22 100644 --- a/route/route.go +++ b/route/route.go @@ -715,8 +715,7 @@ func (r *Router) actionSniff( metadata.SnifferNames = action.SnifferNames metadata.SniffError = err if errors.Is(err, sniff.ErrNeedMoreData) { - // TODO: replace with generic message when there are more multi-packet protocols - r.logger.DebugContext(ctx, "attempt to sniff fragmented QUIC client hello") + r.logger.DebugContext(ctx, "attempt to sniff fragmented multi-packet protocol") continue } goto finally @@ -775,8 +774,7 @@ func (r *Router) actionSniff( metadata.SnifferNames = action.SnifferNames metadata.SniffError = err if errors.Is(err, sniff.ErrNeedMoreData) { - // TODO: replace with generic message when there are more multi-packet protocols - r.logger.DebugContext(ctx, "attempt to sniff fragmented QUIC client hello") + r.logger.DebugContext(ctx, "attempt to sniff fragmented multi-packet protocol") continue } } diff --git a/service/resolved/resolve1.go b/service/resolved/resolve1.go index ed1ee41a..77da3bf8 100644 --- a/service/resolved/resolve1.go +++ b/service/resolved/resolve1.go @@ -609,7 +609,7 @@ func (t *resolve1Manager) RevertLink(sender dbus.Sender, ifIndex int32) *dbus.Er return t.postUpdate(link) } -// TODO: implement RegisterService, UnregisterService + func (t *resolve1Manager) RegisterService(sender dbus.Sender, identifier string, nameTemplate string, serviceType string, port uint16, priority uint16, weight uint16, txtRecords []TXTRecord) (objectPath dbus.ObjectPath, dbusErr *dbus.Error) { return "", wrapError(E.New("not implemented"))