|
|
@ -14,6 +14,8 @@ import ( |
|
|
|
"github.com/Dreamacro/go-shadowsocks2/core" |
|
|
|
) |
|
|
|
|
|
|
|
var _ Proxy = (*ShadowSocks)(nil) |
|
|
|
|
|
|
|
type ShadowSocks struct { |
|
|
|
*Base |
|
|
|
|
|
|
@ -37,6 +39,10 @@ func NewShadowSocks(addr, method, password, obfsMode, obfsHost string) (*ShadowS |
|
|
|
}, nil |
|
|
|
} |
|
|
|
|
|
|
|
func (ss *ShadowSocks) Type() string { |
|
|
|
return "ss" |
|
|
|
} |
|
|
|
|
|
|
|
func (ss *ShadowSocks) DialContext(ctx context.Context, metadata *adapter.Metadata) (c net.Conn, err error) { |
|
|
|
c, err = dialer.DialContext(ctx, "tcp", ss.Addr()) |
|
|
|
if err != nil { |
|
|
|