1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-01-17 23:06:30 -05:00

remove vio package

This commit is contained in:
Darien Raymond 2018-11-03 13:05:23 +01:00
parent 77c03f0da5
commit 3ccdecaf8f
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
3 changed files with 5 additions and 6 deletions

View File

@ -15,7 +15,6 @@ import (
"v2ray.com/core/common/net" "v2ray.com/core/common/net"
"v2ray.com/core/common/protocol" "v2ray.com/core/common/protocol"
"v2ray.com/core/common/session" "v2ray.com/core/common/session"
"v2ray.com/core/common/vio"
"v2ray.com/core/features/outbound" "v2ray.com/core/features/outbound"
"v2ray.com/core/features/policy" "v2ray.com/core/features/policy"
"v2ray.com/core/features/routing" "v2ray.com/core/features/routing"
@ -151,7 +150,7 @@ func (d *DefaultDispatcher) getLink(ctx context.Context) (*transport.Link, *tran
if p.Stats.UserUplink { if p.Stats.UserUplink {
name := "user>>>" + user.Email + ">>>traffic>>>uplink" name := "user>>>" + user.Email + ">>>traffic>>>uplink"
if c, _ := stats.GetOrRegisterCounter(d.stats, name); c != nil { if c, _ := stats.GetOrRegisterCounter(d.stats, name); c != nil {
inboundLink.Writer = &vio.SizeStatWriter{ inboundLink.Writer = &SizeStatWriter{
Counter: c, Counter: c,
Writer: inboundLink.Writer, Writer: inboundLink.Writer,
} }
@ -160,7 +159,7 @@ func (d *DefaultDispatcher) getLink(ctx context.Context) (*transport.Link, *tran
if p.Stats.UserDownlink { if p.Stats.UserDownlink {
name := "user>>>" + user.Email + ">>>traffic>>>downlink" name := "user>>>" + user.Email + ">>>traffic>>>downlink"
if c, _ := stats.GetOrRegisterCounter(d.stats, name); c != nil { if c, _ := stats.GetOrRegisterCounter(d.stats, name); c != nil {
outboundLink.Writer = &vio.SizeStatWriter{ outboundLink.Writer = &SizeStatWriter{
Counter: c, Counter: c,
Writer: outboundLink.Writer, Writer: outboundLink.Writer,
} }

View File

@ -1,4 +1,4 @@
package vio package dispatcher
import ( import (
"v2ray.com/core/common" "v2ray.com/core/common"

View File

@ -1,11 +1,11 @@
package vio_test package dispatcher_test
import ( import (
"testing" "testing"
. "v2ray.com/core/app/dispatcher"
"v2ray.com/core/common" "v2ray.com/core/common"
"v2ray.com/core/common/buf" "v2ray.com/core/common/buf"
. "v2ray.com/core/common/vio"
) )
type TestCounter int64 type TestCounter int64