Add call protocol, Rmux. Update AmneziaWG. Fixes and improvements

This commit is contained in:
Shtorm
2026-08-06 14:19:34 +03:00
parent 051e928b01
commit d6b9f693c4
89 changed files with 15671 additions and 132 deletions

17
include/call.go Normal file
View File

@@ -0,0 +1,17 @@
//go:build with_call
package include
import (
"github.com/sagernet/sing-box/adapter/inbound"
"github.com/sagernet/sing-box/adapter/outbound"
"github.com/sagernet/sing-box/protocol/call"
)
func registerCallInbound(registry *inbound.Registry) {
call.RegisterInbound(registry)
}
func registerCallOutbound(registry *outbound.Registry) {
call.RegisterOutbound(registry)
}

27
include/call_stub.go Normal file
View File

@@ -0,0 +1,27 @@
//go:build !with_call
package include
import (
"context"
"github.com/sagernet/sing-box/adapter"
"github.com/sagernet/sing-box/adapter/inbound"
"github.com/sagernet/sing-box/adapter/outbound"
C "github.com/sagernet/sing-box/constant"
"github.com/sagernet/sing-box/log"
"github.com/sagernet/sing-box/option"
E "github.com/sagernet/sing/common/exceptions"
)
func registerCallInbound(registry *inbound.Registry) {
inbound.Register[option.CallInboundOptions](registry, C.TypeCall, func(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options option.CallInboundOptions) (adapter.Inbound, error) {
return nil, E.New(`Call is not included in this build, rebuild with -tags with_call`)
})
}
func registerCallOutbound(registry *outbound.Registry) {
outbound.Register[option.CallOutboundOptions](registry, C.TypeCall, func(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options option.CallOutboundOptions) (adapter.Outbound, error) {
return nil, E.New(`Call is not included in this build, rebuild with -tags with_call`)
})
}

View File

@@ -92,6 +92,7 @@ func InboundRegistry() *inbound.Registry {
registerMTProxyInbound(registry)
registerSudokuInbound(registry)
registerSnellInbound(registry)
registerCallInbound(registry)
return registry
}
@@ -137,6 +138,7 @@ func OutboundRegistry() *outbound.Registry {
registerStubForRemovedOutbounds(registry)
registerSudokuOutbound(registry)
registerSnellOutbound(registry)
registerCallOutbound(registry)
return registry
}