summaryrefslogtreecommitdiff
path: root/packet.go
diff options
context:
space:
mode:
authorYawning Angel <yawning@schwanenlied.me>2014-05-23 05:23:36 +0000
committerYawning Angel <yawning@schwanenlied.me>2014-05-23 05:23:36 +0000
commite77ddddf4d10dbd3387c2e4714c287c546c70512 (patch)
tree614905fa79c8648fcbe181197dc416c39902c4a5 /packet.go
parent272fb852e72ac282144fe8608fea62ab74b9549c (diff)
Add support for IAT obfuscation (disabled by default).
When enabled, inter-packet delay will be randomized between 0 and 10 ms in 100 usec intervals. As experiences from ScrambleSuit (and back of the envelope math based on how networks work) show, this is extremely expensive and artificially limits the throughput of the link. When enabled, bulk transfer throughput will be limited to an average of 278 KiB/s.
Diffstat (limited to 'packet.go')
-rw-r--r--packet.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/packet.go b/packet.go
index 4112c9b..78f6697 100644
--- a/packet.go
+++ b/packet.go
@@ -181,6 +181,9 @@ func (c *Obfs4Conn) consumeFramedPackets(w io.Writer) (n int, err error) {
break
}
c.lenProbDist.reset(seed)
+ if c.iatProbDist != nil {
+ c.iatProbDist.reset(seed)
+ }
}
default:
// Ignore unrecognised packet types.