conntrack

package
v0.20.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 4, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package conntrack closes xray-core's live outbound connections on demand.

Closing an xray-core instance stops its listeners, but connections that are already open keep flowing through the old server until they go idle (minutes). After switching servers, a browser's kept-alive connections would still exit through the previous location. Install wraps xray's system dialer so every outbound socket is recorded, and CloseAll drops them all when a connection stops.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseAll

func CloseAll()

CloseAll closes every outbound connection opened so far.

func Count

func Count() int

Count reports how many tracked connections are open (for tests).

func Install

func Install()

Install routes xray-core's outbound dialing through the tracker. Safe to call more than once.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL