mirror of
https://github.com/ehang-io/nps.git
synced 2025-09-02 03:16:53 +00:00
New functions
This commit is contained in:
@@ -154,10 +154,10 @@ func (s *httpServer) process(c *conn.Conn, r *http.Request) {
|
||||
isConn = false
|
||||
} else {
|
||||
r, err = http.ReadRequest(bufio.NewReader(c))
|
||||
logs.Trace("New http(s) connection,clientId %d,host %s,url %s,remote address %s", host.Client.Id, r.Host, r.URL, r.RemoteAddr)
|
||||
if err != nil {
|
||||
break
|
||||
}
|
||||
logs.Trace("New http(s) connection,clientId %d,host %s,url %s,remote address %s", host.Client.Id, r.Host, r.URL, r.RemoteAddr)
|
||||
if host, err = file.GetCsvDb().GetInfoByHost(r.Host, r); err != nil {
|
||||
logs.Notice("the url %s %s can't be parsed!", r.Host, r.RequestURI)
|
||||
break
|
||||
|
@@ -52,8 +52,11 @@ func DealBridgeTask() {
|
||||
if !t.Client.GetConn() {
|
||||
logs.Info("Connections exceed the current client %d limit", t.Client.Id)
|
||||
s.Conn.Close()
|
||||
} else {
|
||||
} else if t.Status {
|
||||
go proxy.NewBaseServer(Bridge, t).DealClient(s.Conn, t.Target, nil)
|
||||
} else {
|
||||
s.Conn.Close()
|
||||
logs.Trace("This key %s cannot be processed,status is close", s.Password)
|
||||
}
|
||||
} else {
|
||||
logs.Trace("This key %s cannot be processed", s.Password)
|
||||
|
Reference in New Issue
Block a user