Documentation ¶
Overview ¶
Package probe offers utilities for actively probing servers. The idea is to probe our own servers as a censor would, looking for giveaways that the server is used for circumvention.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Network to use (ala net.Dial). Network string // Address to probe. Address string // BaselineData is any data saved from a previously run probe. Providing baseline data will // reduce the time needed for a probe test. BaselineData io.Reader // MaxParallelism is the maximum number of goroutines spawned during a probe. This number is // approximate and will be honored on a best-effort basis. A value <= 0 indicates that there is // no limit to parallelism. MaxParallelism int // ResponseTimeout is the time the probe allows the server to respond to each probe payload. // After this duration has passed, the server is determined to have no response. A value <= 0 // indicates that there should be no timeout. ResponseTimeout time.Duration Logger io.Writer }
Config for a probe.
type ForRandomizedTransportBaseline ¶
type ForRandomizedTransportBaseline struct {
MinResponseTime, MaxResponseTime, ResponseTimeStdDev time.Duration
// ResponseFlags is the set of TCP flags seen on the first response packet. The first response
// packet is defined as the first packet received from the server which (a) was sent after the
// first client payload packet and (b) was more than a simple ACK.
//
// In the case where the set of flags in the first response packet is not consistent, this will
// be an empty, non-nil slice. In the case where no response was received, this will be nil.
ResponseFlags []string
}
ForRandomizedTransportBaseline represents the baseline used by ForRandomizedTransport.
func (ForRandomizedTransportBaseline) String ¶
func (b ForRandomizedTransportBaseline) String() string
type ForRandomizedTransportExplanation ¶
type ForRandomizedTransportExplanation struct { // PayloadSizeThreshold is the payload size at which the behavior of the server changed. PayloadSizeThreshold int // ResponseTime is the time the server took to respond to a payload of the threshold size. ResponseTime time.Duration // ResponseFlags is the set of TCP flags seen on the first response packet. The first response // packet is defined as the first packet received from the server which (a) was sent after the // first client payload packet and (b) was more than a simple ACK. ResponseFlags []string // Baseline against which responses were compared. Baseline ForRandomizedTransportBaseline }
ForRandomizedTransportExplanation is the concrete type returned as the Results.Explanation when a ForRandomizedTransport probe returns Results.Success.
func (ForRandomizedTransportExplanation) String ¶
func (e ForRandomizedTransportExplanation) String() string
type Results ¶
type Results struct { // Success reports whether the probe found what it was looking for. In most cases, you want this // to be false. True means that the probe was able to identify the server as a circumvention // tool. Success bool // An explanation is provided when Success is true. Explanation fmt.Stringer // BaselineData encodes the baseline against which the probe's test was run. BaselineData is // non-nil iff the probe created baseline data outside of what was provided by Config. BaselineData io.Reader }
Results of a probe.
func ForRandomizedTransport ¶
ForRandomizedTransport probes for evidence of a randomized transport like Lampshade.
Click to show internal directories.
Click to hide internal directories.