This commit is contained in:
Xavier Henner
2019-07-30 16:34:12 +02:00
parent 0e72c3a242
commit 65496cbce9
4 changed files with 99 additions and 20 deletions

View File

@@ -186,7 +186,10 @@ func (s *OpenVpnMgt) handleConn(conn net.Conn) {
switch {
// command successfull, we can ignore
case strings.HasPrefix(line, ">SUCCESS: client-deny command succeeded"):
case strings.HasPrefix(line, ">HOLD"):
s.sendCommand([]string{"hold release"}, remote)
case strings.HasPrefix(line, ">REMOTE"):
s.sendCommand([]string{"remote ACCEPT"}, remote)
default:
response = append(response, line)
}