1package tun
2
3import "github.com/ferama/rospo/pkg/utils"
4
5// TunnelConf is a struct that holds the tunnel configuration
6type TunnelConf struct {
7	//// Tunnel conf
8	Remote string `yaml:"remote" json:"remote"`
9	Local  string `yaml:"local" json:"local"`
10	// indicates if it is a forward or reverse tunnel
11	Forward bool `yaml:"forward" json:"forward"`
12}
13
14// GetRemotEndpoint Builds a remote endpoint object from the Remote string
15func (c *TunnelConf) GetRemotEndpoint() *utils.Endpoint {
16	return utils.NewEndpoint(c.Remote)
17}
18
19// GetLocalEndpoint Builds a locale endpoint object from the Local string
20func (c *TunnelConf) GetLocalEndpoint() *utils.Endpoint {
21	return utils.NewEndpoint(c.Local)
22}
23