mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-21 09:36:34 -05:00
remove bufio
This commit is contained in:
parent
751160940b
commit
8ed15ce847
@ -1,7 +1,7 @@
|
|||||||
package socks
|
package socks
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bufio"
|
_ "bufio"
|
||||||
"errors"
|
"errors"
|
||||||
"io"
|
"io"
|
||||||
"net"
|
"net"
|
||||||
@ -62,7 +62,7 @@ func (server *SocksServer) AcceptConnections(listener net.Listener) {
|
|||||||
func (server *SocksServer) HandleConnection(connection net.Conn) error {
|
func (server *SocksServer) HandleConnection(connection net.Conn) error {
|
||||||
defer connection.Close()
|
defer connection.Close()
|
||||||
|
|
||||||
reader := bufio.NewReader(connection)
|
reader := connection.(io.Reader)
|
||||||
|
|
||||||
auth, auth4, err := socksio.ReadAuthentication(reader)
|
auth, auth4, err := socksio.ReadAuthentication(reader)
|
||||||
if err != nil && err != socksio.ErrorSocksVersion4 {
|
if err != nil && err != socksio.ErrorSocksVersion4 {
|
||||||
|
Loading…
Reference in New Issue
Block a user