mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-30 17:38:41 +00:00
Fix: CounterConnection with ReadV/WriteV (#720)
Co-authored-by: JimhHan <50871214+JimhHan@users.noreply.github.com>
This commit is contained in:
parent
f2cb13a8ec
commit
24b637cd5e
53 changed files with 247 additions and 128 deletions
|
@ -3,6 +3,8 @@ package udp
|
|||
import (
|
||||
"context"
|
||||
|
||||
"github.com/xtls/xray-core/transport/internet/stat"
|
||||
|
||||
"github.com/xtls/xray-core/common"
|
||||
"github.com/xtls/xray-core/common/net"
|
||||
"github.com/xtls/xray-core/transport/internet"
|
||||
|
@ -10,7 +12,7 @@ import (
|
|||
|
||||
func init() {
|
||||
common.Must(internet.RegisterTransportDialer(protocolName,
|
||||
func(ctx context.Context, dest net.Destination, streamSettings *internet.MemoryStreamConfig) (internet.Connection, error) {
|
||||
func(ctx context.Context, dest net.Destination, streamSettings *internet.MemoryStreamConfig) (stat.Connection, error) {
|
||||
var sockopt *internet.SocketConfig
|
||||
if streamSettings != nil {
|
||||
sockopt = streamSettings.SocketSettings
|
||||
|
@ -20,6 +22,6 @@ func init() {
|
|||
return nil, err
|
||||
}
|
||||
// TODO: handle dialer options
|
||||
return internet.Connection(conn), nil
|
||||
return stat.Connection(conn), nil
|
||||
}))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue