Release v0.1.0

This commit is contained in:
Manu Herrera
2019-10-01 12:22:30 -03:00
parent 41e6aad190
commit d301c63596
915 changed files with 378049 additions and 11 deletions

54
vendor/github.com/btcsuite/go-socks/socks/conn.go generated vendored Normal file
View File

@@ -0,0 +1,54 @@
// Copyright 2012 Samuel Stauffer. All rights reserved.
// Use of this source code is governed by a 3-clause BSD
// license that can be found in the LICENSE file.
package socks
import (
"net"
"time"
)
type proxiedConn struct {
conn net.Conn
remoteAddr *ProxiedAddr
boundAddr *ProxiedAddr
}
func (c *proxiedConn) Read(b []byte) (int, error) {
return c.conn.Read(b)
}
func (c *proxiedConn) Write(b []byte) (int, error) {
return c.conn.Write(b)
}
func (c *proxiedConn) Close() error {
return c.conn.Close()
}
func (c *proxiedConn) LocalAddr() net.Addr {
if c.boundAddr != nil {
return c.boundAddr
}
return c.conn.LocalAddr()
}
func (c *proxiedConn) RemoteAddr() net.Addr {
if c.remoteAddr != nil {
return c.remoteAddr
}
return c.conn.RemoteAddr()
}
func (c *proxiedConn) SetDeadline(t time.Time) error {
return c.conn.SetDeadline(t)
}
func (c *proxiedConn) SetReadDeadline(t time.Time) error {
return c.conn.SetReadDeadline(t)
}
func (c *proxiedConn) SetWriteDeadline(t time.Time) error {
return c.conn.SetWriteDeadline(t)
}