As a defense against Website Traffic Fingerprinting, we should implement a tunable cover traffic defense that we could set from the consensus with a value dependent upon available Guard bandwidth relative to Exit capacity.

I am attempting to implement adaptive padding on the Tor network using the Shadow simulator. Where in the Tor source could I find the code for sending padding cells every few minutes on open but currently inactive channels?