Parcourir la source

Fix: should close connection if match blocking list

Kr328 il y a 4 ans
Parent
commit
48222c22c8
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  1. 2 0
      core/src/main/golang/tun/tcp.go

+ 2 - 0
core/src/main/golang/tun/tcp.go

@@ -38,6 +38,8 @@ accept:
 		// drop all connections connect to blocking list
 		for _, b := range a.blocking {
 			if b.Contains(tAddr.IP) {
+				_ = conn.Close()
+
 				continue accept
 			}
 		}