logging and removing buffers
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Jake Hillion 2020-11-01 20:41:42 +00:00
parent cf5194fb93
commit fda177d8a8
3 changed files with 6 additions and 7 deletions

View File

@ -23,7 +23,7 @@ func (u UselessMac) Verify([]byte, []byte) error {
}
func (c Configuration) Build() (*proxy.Proxy, error) {
p := proxy.NewProxy(16)
p := proxy.NewProxy(0)
p.Generator = UselessMac{}
ss, err := tun.NewTun("nc%d", 1500)
@ -57,13 +57,9 @@ func buildTcp(p *proxy.Proxy, peer Peer) error {
p.AddConsumer(f)
p.AddProducer(f, UselessMac{})
if err != nil {
return err
}
return nil
}
err := tcp.NewListener(p, fmt.Sprintf("%s:%d", peer.LocalHost, peer.LocalPort), UselessMac{})
if err != nil {
return err

View File

@ -92,6 +92,8 @@ func (p Proxy) AddConsumer(c Consumer) {
}
}
}
fmt.Printf("closed connection `%v`\n", c)
}()
}
@ -121,5 +123,7 @@ func (p Proxy) AddProducer(pr Producer, v MacVerifier) {
}
}
}
fmt.Printf("closed connection `%v`\n", pr)
}()
}

View File

@ -35,7 +35,6 @@ func InitiateFlow(local, remote string) (*InitiatedFlow, error) {
f := InitiatedFlow{
Local: local,
Remote: remote,
Flow: Flow{},
}
return &f, nil