timeout settings in http proxy

This commit is contained in:
v2ray
2016-07-10 15:34:14 +02:00
parent 5e7d413404
commit 30041041d3
3 changed files with 5 additions and 1 deletions
+2 -1
View File
@@ -95,7 +95,8 @@ func parseHost(rawHost string, defaultPort v2net.Port) (v2net.Destination, error
func (this *Server) handleConnection(conn internet.Connection) {
defer conn.Close()
reader := bufio.NewReader(conn)
timedReader := v2net.NewTimeOutReader(this.config.Timeout, conn)
reader := bufio.NewReader(timedReader)
request, err := http.ReadRequest(reader)
if err != nil {