Make Interface.Inside an interface type (#252)
This commit updates the Interface.Inside type to be a new interface type instead of a *Tun. This will allow for an inside interface that does not use a tun device, such as a single-binary client that can run without elevated privileges.
This commit is contained in:
@ -75,6 +75,14 @@ func (c *Tun) Activate() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c *Tun) CidrNet() *net.IPNet {
|
||||
return c.Cidr
|
||||
}
|
||||
|
||||
func (c *Tun) DeviceName() string {
|
||||
return c.Device
|
||||
}
|
||||
|
||||
func (c *Tun) WriteRaw(b []byte) error {
|
||||
_, err := c.Write(b)
|
||||
return err
|
||||
|
Reference in New Issue
Block a user