Fix Codacy

This commit is contained in:
braginini
2023-04-05 16:54:50 +02:00
parent 005c4dd44a
commit 0e8a552334
7 changed files with 12 additions and 4 deletions

View File

@@ -23,6 +23,7 @@ func NewDirectNoProxy(config Config, remoteWgPort int) *DirectNoProxy {
return &DirectNoProxy{config: config, RemoteWgListenPort: remoteWgPort}
}
// Close removes peer from the WireGuard interface
func (p *DirectNoProxy) Close() error {
err := p.config.WgInterface.RemovePeer(p.config.RemoteKey)
if err != nil {
@@ -50,6 +51,7 @@ func (p *DirectNoProxy) Start(remoteConn net.Conn) error {
return nil
}
// Type returns the type of this proxy
func (p *DirectNoProxy) Type() Type {
return TypeDirectNoProxy
}