|
|
@@ -5,6 +5,12 @@ import (
|
|
|
"github.com/Dreamacro/clash/tunnel/statistic"
|
|
|
)
|
|
|
|
|
|
+func CloseAllConnections() {
|
|
|
+ for _, c := range statistic.DefaultManager.Snapshot().Connections {
|
|
|
+ _ = c.Close()
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
func closeMatch(filter func(conn C.Conn) bool) {
|
|
|
for _, c := range statistic.DefaultManager.Snapshot().Connections {
|
|
|
if cc, ok := c.(C.Conn); ok {
|