api/plugins/tls_interceptor/proxy_conn.go
Peter Kurfer 108444e094 Add health API and basic CLI support
- remove plugin API due to incompatibility issues
- add Docker build to GitHub Actions
- add custom container friendly config file
2020-06-15 12:32:18 +02:00

22 lines
423 B
Go

package tls_interceptor
import (
"fmt"
"net"
)
type proxyConn struct {
source net.Conn
target net.Conn
}
func (p *proxyConn) Close() error {
var err error
if targetErr := p.target.Close(); targetErr != nil {
err = fmt.Errorf("error while closing target conn: %w", targetErr)
}
if sourceErr := p.source.Close(); sourceErr != nil {
err = fmt.Errorf("error while closing source conn: %w", err)
}
return err
}