mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-12-27 12:35:21 -05:00
update context functions
This commit is contained in:
@@ -2,10 +2,9 @@ package shadowsocks
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"time"
|
||||
|
||||
"errors"
|
||||
"runtime"
|
||||
"time"
|
||||
|
||||
"v2ray.com/core/app/log"
|
||||
"v2ray.com/core/common"
|
||||
@@ -40,7 +39,10 @@ func NewClient(ctx context.Context, config *ClientConfig) (*Client, error) {
|
||||
|
||||
// Process implements OutboundHandler.Process().
|
||||
func (v *Client) Process(ctx context.Context, outboundRay ray.OutboundRay, dialer proxy.Dialer) error {
|
||||
destination := proxy.DestinationFromContext(ctx)
|
||||
destination, ok := proxy.TargetFromContext(ctx)
|
||||
if !ok {
|
||||
return errors.New("Shadowsocks|Client: Target not specified.")
|
||||
}
|
||||
network := destination.Network
|
||||
|
||||
var server *protocol.ServerSpec
|
||||
|
||||
Reference in New Issue
Block a user