Skip to content

Commit c970085

Browse files
authored
feat(datacap): refactor datacap into a tracker (#63)
1 parent 382f2e9 commit c970085

File tree

12 files changed

+262
-437
lines changed

12 files changed

+262
-437
lines changed

constant/proxy.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ const (
55
TypeALGeneva = "algeneva"
66
TypeOutline = "outline"
77
TypeWATER = "water"
8-
TypeDataCap = "datacap"
98
)
109

1110
const (

datacap/extractor.go

Lines changed: 0 additions & 70 deletions
This file was deleted.

datacap/inbound.go

Lines changed: 0 additions & 171 deletions
This file was deleted.

option/datacap.go

Lines changed: 0 additions & 43 deletions
This file was deleted.

protocol/register.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import (
66
"github.com/sagernet/sing-box/adapter/outbound"
77
"github.com/sagernet/sing-box/include"
88

9-
"github.com/getlantern/sing-box-extensions/datacap"
109
"github.com/getlantern/sing-box-extensions/protocol/algeneva"
1110
"github.com/getlantern/sing-box-extensions/protocol/amnezia"
1211
"github.com/getlantern/sing-box-extensions/protocol/group"
@@ -19,7 +18,6 @@ var supportedProtocols = []string{
1918
"algeneva",
2019
"amnezia",
2120
"outline",
22-
"water",
2321

2422
// sing-box built-in protocols
2523
"http",
@@ -43,7 +41,6 @@ func GetRegistries() (*inbound.Registry, *outbound.Registry, *endpoint.Registry)
4341
endpointRegistry := include.EndpointRegistry()
4442

4543
registerInbounds(inboundRegistry)
46-
registerMiddleware(inboundRegistry)
4744
registerOutbounds(outboundRegistry)
4845
registerEndpoints(endpointRegistry)
4946

@@ -57,11 +54,6 @@ func registerInbounds(registry *inbound.Registry) {
5754
water.RegisterInbound(registry)
5855
}
5956

60-
func registerMiddleware(registry *inbound.Registry) {
61-
// Middleware components that track/monitor connections
62-
datacap.RegisterInbound(registry)
63-
}
64-
6557
func registerOutbounds(registry *outbound.Registry) {
6658
// custom protocol outbounds
6759
algeneva.RegisterOutbound(registry)

0 commit comments

Comments
 (0)