/*
GoVPN -- simple secure free software virtual private network daemon
-Copyright (C) 2014-2016 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2014-2017 Sergey Matveev <stargrave@stargrave.org>
+ 2016-2017 Bruno Clermont <bruno@robotinfra.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
"github.com/pkg/errors"
)
-// PeerContext hold info about a peer that connect or disconnect
+// PeerContext holds info about a peer that connect or disconnect
// used for Up, PreUp and Down
type PeerContext struct {
RemoteAddress string
// after user is authenticated
type TunnelPreUpAction func(PeerContext) (*TAP, error)
-// RunScriptAction convert the path to a script into a TunnelAction
+// RunScriptAction converts the path to a script into a TunnelAction
func RunScriptAction(path *string) TunnelAction {
if path == nil {
return nil
}
}
-// ScriptCall call external program/script.
+// ScriptCall calls external program/script.
// You have to specify path to it and (inteface name as a rule) something
// that will be the first argument when calling it. Function will return
// it's output and possible error.