mirror of https://gogs.blitter.com/RLabs/xs
				
				
				
			Grouped types
This commit is contained in:
		
							parent
							
								
									f9fba3227b
								
							
						
					
					
						commit
						5ae6c8075b
					
				
							
								
								
									
										2
									
								
								TODO.txt
								
								
								
								
							
							
						
						
									
										2
									
								
								TODO.txt
								
								
								
								
							| 
						 | 
					@ -6,7 +6,7 @@ Chaff Improvements
 | 
				
			||||||
- Client-input chaff file data (ie., Moby Dick)
 | 
					- Client-input chaff file data (ie., Moby Dick)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Architecture
 | 
					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,
 | 
					  (ie., hkexsh imports hkex) - hkex should be usable for other client/svr utils,
 | 
				
			||||||
  ala 'hkex-netcat')
 | 
					  ala 'hkex-netcat')
 | 
				
			||||||
- Make KEx fully-pluggable: isolate all code to do with Herradura into a
 | 
					- Make KEx fully-pluggable: isolate all code to do with Herradura into a
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -44,21 +44,26 @@ const (
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*---------------------------------------------------------------------*/
 | 
					/*---------------------------------------------------------------------*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type WinSize struct {
 | 
					type (
 | 
				
			||||||
 | 
						WinSize struct {
 | 
				
			||||||
		Rows uint16
 | 
							Rows uint16
 | 
				
			||||||
		Cols 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
 | 
							shutdown bool //set to inform chaffHelper to shut down
 | 
				
			||||||
		enabled  bool
 | 
							enabled  bool
 | 
				
			||||||
		msecsMin uint //msecs min interval
 | 
							msecsMin uint //msecs min interval
 | 
				
			||||||
		msecsMax uint //msecs max interval
 | 
							msecsMax uint //msecs max interval
 | 
				
			||||||
		szMax    uint // max size in bytes
 | 
							szMax    uint // max size in bytes
 | 
				
			||||||
}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Conn is a HKex connection - a superset of net.Conn
 | 
						// Conn is a HKex connection - a superset of net.Conn
 | 
				
			||||||
type Conn struct {
 | 
						Conn struct {
 | 
				
			||||||
		m          *sync.Mutex
 | 
							m          *sync.Mutex
 | 
				
			||||||
		c          net.Conn // which also implements io.Reader, io.Writer, ...
 | 
							c          net.Conn // which also implements io.Reader, io.Writer, ...
 | 
				
			||||||
		h          *hkex.HerraduraKEx
 | 
							h          *hkex.HerraduraKEx
 | 
				
			||||||
| 
						 | 
					@ -76,7 +81,8 @@ type Conn struct {
 | 
				
			||||||
		w         cipher.Stream //write cipherStream
 | 
							w         cipher.Stream //write cipherStream
 | 
				
			||||||
		wm        hash.Hash
 | 
							wm        hash.Hash
 | 
				
			||||||
		dBuf      *bytes.Buffer //decrypt buffer for Read()
 | 
							dBuf      *bytes.Buffer //decrypt buffer for Read()
 | 
				
			||||||
}
 | 
						}
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (hc Conn) GetStatus() uint8 {
 | 
					func (hc Conn) GetStatus() uint8 {
 | 
				
			||||||
	return *hc.closeStat
 | 
						return *hc.closeStat
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue