base sagernet and migrate to circleci
This commit is contained in:
@@ -163,8 +163,8 @@
|
||||
+ )
|
||||
+}
|
||||
+
|
||||
+// NewConnectionEx receives TCP connections from the listener and feeds them to the HTTP server.
|
||||
+func (h *Inbound) NewConnectionEx(ctx context.Context, conn net.Conn, metadata adapter.InboundContext, onClose N.CloseHandlerFunc) {
|
||||
+// NewConnection receives TCP connections from the listener and feeds them to the HTTP server.
|
||||
+func (h *Inbound) NewConnection(ctx context.Context, conn net.Conn, metadata adapter.InboundContext, onClose N.CloseHandlerFunc) {
|
||||
+ if h.tlsConfig != nil {
|
||||
+ tlsConn, err := boxTLS.ServerHandshake(ctx, conn, h.tlsConfig)
|
||||
+ if err != nil {
|
||||
@@ -444,7 +444,7 @@
|
||||
+ return hex.EncodeToString(b)
|
||||
+}
|
||||
+
|
||||
+// connListener bridges the listener.Listener (which pushes connections via NewConnectionEx)
|
||||
+// connListener bridges the listener.Listener (which pushes connections via NewConnection)
|
||||
+// with http.Server.Serve() (which expects a net.Listener).
|
||||
+type connListener struct {
|
||||
+ ch chan net.Conn
|
||||
|
||||
Reference in New Issue
Block a user