Grouped types

This commit is contained in:
Russ Magee 2018-07-19 22:39:06 -07:00
parent f9fba3227b
commit 5ae6c8075b
2 changed files with 36 additions and 30 deletions

View File

@ -6,7 +6,7 @@ Chaff Improvements
- Client-input chaff file data (ie., Moby Dick)
Architecture
- Move hkexnet components other than key exchange into a proper hkex package
(DONE) - Move hkexnet components other than key exchange into a proper hkex package
(ie., hkexsh imports hkex) - hkex should be usable for other client/svr utils,
ala 'hkex-netcat')
- Make KEx fully-pluggable: isolate all code to do with Herradura into a

View File

@ -44,12 +44,17 @@ const (
/*---------------------------------------------------------------------*/
type WinSize struct {
type (
WinSize struct {
Rows uint16
Cols uint16
}
type ChaffConfig struct {
// chaffconfig captures attributes used to send chaff packets betwixt
// client and server connections, to obscure true traffic timing and
// patterns
// see: https://en.wikipedia.org/wiki/chaff_(countermeasure)
ChaffConfig struct {
shutdown bool //set to inform chaffHelper to shut down
enabled bool
msecsMin uint //msecs min interval
@ -58,7 +63,7 @@ type ChaffConfig struct {
}
// Conn is a HKex connection - a superset of net.Conn
type Conn struct {
Conn struct {
m *sync.Mutex
c net.Conn // which also implements io.Reader, io.Writer, ...
h *hkex.HerraduraKEx
@ -77,6 +82,7 @@ type Conn struct {
wm hash.Hash
dBuf *bytes.Buffer //decrypt buffer for Read()
}
)
func (hc Conn) GetStatus() uint8 {
return *hc.closeStat