mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-06-12 14:28:15 +03:00
Add MTProxy, MASQUE, VPN, Link parser. Update AmneziaWG. Remove Tunneling
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"github.com/sagernet/sing-box/adapter/endpoint"
|
||||
"github.com/sagernet/sing-box/adapter/inbound"
|
||||
"github.com/sagernet/sing-box/adapter/outbound"
|
||||
"github.com/sagernet/sing-box/adapter/provider"
|
||||
"github.com/sagernet/sing-box/adapter/service"
|
||||
C "github.com/sagernet/sing-box/constant"
|
||||
"github.com/sagernet/sing-box/dns"
|
||||
@@ -28,6 +29,7 @@ import (
|
||||
"github.com/sagernet/sing-box/protocol/mieru"
|
||||
"github.com/sagernet/sing-box/protocol/mixed"
|
||||
"github.com/sagernet/sing-box/protocol/naive"
|
||||
"github.com/sagernet/sing-box/protocol/parser"
|
||||
"github.com/sagernet/sing-box/protocol/redirect"
|
||||
"github.com/sagernet/sing-box/protocol/shadowsocks"
|
||||
"github.com/sagernet/sing-box/protocol/shadowtls"
|
||||
@@ -36,9 +38,11 @@ import (
|
||||
"github.com/sagernet/sing-box/protocol/tor"
|
||||
"github.com/sagernet/sing-box/protocol/trojan"
|
||||
"github.com/sagernet/sing-box/protocol/tun"
|
||||
"github.com/sagernet/sing-box/protocol/tunnel"
|
||||
"github.com/sagernet/sing-box/protocol/vless"
|
||||
"github.com/sagernet/sing-box/protocol/vmess"
|
||||
"github.com/sagernet/sing-box/protocol/vpn"
|
||||
localProvider "github.com/sagernet/sing-box/provider/local"
|
||||
remoteProvider "github.com/sagernet/sing-box/provider/remote"
|
||||
"github.com/sagernet/sing-box/service/admin_panel"
|
||||
"github.com/sagernet/sing-box/service/manager"
|
||||
"github.com/sagernet/sing-box/service/node"
|
||||
@@ -50,7 +54,7 @@ import (
|
||||
)
|
||||
|
||||
func Context(ctx context.Context) context.Context {
|
||||
return box.Context(ctx, InboundRegistry(), OutboundRegistry(), EndpointRegistry(), DNSTransportRegistry(), ServiceRegistry())
|
||||
return box.Context(ctx, InboundRegistry(), OutboundRegistry(), EndpointRegistry(), ProviderRegistry(), DNSTransportRegistry(), ServiceRegistry())
|
||||
}
|
||||
|
||||
func InboundRegistry() *inbound.Registry {
|
||||
@@ -77,6 +81,7 @@ func InboundRegistry() *inbound.Registry {
|
||||
|
||||
registerQUICInbounds(registry)
|
||||
registerStubForRemovedInbounds(registry)
|
||||
registerMTProxyInbound(registry)
|
||||
|
||||
return registry
|
||||
}
|
||||
@@ -88,7 +93,7 @@ func OutboundRegistry() *outbound.Registry {
|
||||
|
||||
block.RegisterOutbound(registry)
|
||||
|
||||
group.RegisterFailover(registry)
|
||||
group.RegisterFallback(registry)
|
||||
group.RegisterSelector(registry)
|
||||
group.RegisterURLTest(registry)
|
||||
|
||||
@@ -104,12 +109,15 @@ func OutboundRegistry() *outbound.Registry {
|
||||
vless.RegisterOutbound(registry)
|
||||
mieru.RegisterOutbound(registry)
|
||||
anytls.RegisterOutbound(registry)
|
||||
registerMASQUEOutbound(registry)
|
||||
|
||||
bond.RegisterOutbound(registry)
|
||||
|
||||
bandwidth.RegisterOutbound(registry)
|
||||
connection.RegisterOutbound(registry)
|
||||
|
||||
parser.RegisterOutbound(registry)
|
||||
|
||||
registerQUICOutbounds(registry)
|
||||
registerStubForRemovedOutbounds(registry)
|
||||
|
||||
@@ -119,8 +127,8 @@ func OutboundRegistry() *outbound.Registry {
|
||||
func EndpointRegistry() *endpoint.Registry {
|
||||
registry := endpoint.NewRegistry()
|
||||
|
||||
tunnel.RegisterServerEndpoint(registry)
|
||||
tunnel.RegisterClientEndpoint(registry)
|
||||
vpn.RegisterServerEndpoint(registry)
|
||||
vpn.RegisterClientEndpoint(registry)
|
||||
|
||||
registerWireGuardEndpoint(registry)
|
||||
registerTailscaleEndpoint(registry)
|
||||
@@ -128,6 +136,16 @@ func EndpointRegistry() *endpoint.Registry {
|
||||
return registry
|
||||
}
|
||||
|
||||
func ProviderRegistry() *provider.Registry {
|
||||
registry := provider.NewRegistry()
|
||||
|
||||
localProvider.RegisterProviderInline(registry)
|
||||
localProvider.RegisterProviderLocal(registry)
|
||||
remoteProvider.RegisterProvider(registry)
|
||||
|
||||
return registry
|
||||
}
|
||||
|
||||
func DNSTransportRegistry() *dns.TransportRegistry {
|
||||
registry := dns.NewTransportRegistry()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user