Firewall refactoring

- Ability to enable and disable rules in various loops
- Simplified code overall
- Port forwarding moved into openvpn loop
- Route addition and removal improved
This commit is contained in:
Quentin McGaw
2020-07-11 21:03:55 +00:00
parent ccf11990f1
commit b1596bc7e4
20 changed files with 887 additions and 359 deletions

View File

@@ -1,7 +1,6 @@
package provider
import (
"context"
"fmt"
"net"
"strings"
@@ -125,11 +124,3 @@ func (c *cyberghost) BuildConf(connections []models.OpenVPNConnection, verbosity
func (c *cyberghost) GetPortForward() (port uint16, err error) {
panic("port forwarding is not supported for cyberghost")
}
func (c *cyberghost) WritePortForward(filepath models.Filepath, port uint16, uid, gid int) (err error) {
panic("port forwarding is not supported for cyberghost")
}
func (c *cyberghost) AllowPortForwardFirewall(ctx context.Context, device models.VPNDevice, port uint16) (err error) {
panic("port forwarding is not supported for cyberghost")
}