Logo
Explore Help
Register Sign In
admin/gluetun
1
0
Fork 0
You've already forked gluetun
Code Issues Pull Requests Actions Packages Projects Releases Wiki Activity
Files
cb804577a93d77c2b2739ebc7cd1e5f58ca2ec21
gluetun/internal/tun/tun.go

14 lines
183 B
Go
Raw Normal View History

Maint: tun package to handle tun device operations - Moved from openvpn package to tun package - TUN check verifies Rdev value - TUN create - Inject as interface to main function - Add integration test - Clearer log message for end users if tun device does not exist - Remove unix package (unneeded for tests) - Remove tun file opening at the end of tun file creation - Do not mock unix.Mkdev (no OS operation) - Remove Tun operations from OpenVPN configurator
2021-08-18 15:31:08 +00:00
package tun
import "golang.org/x/sys/unix"
type Tun struct {
mknod func(path string, mode uint32, dev int) (err error)
}
func New() *Tun {
return &Tun{
mknod: unix.Mknod,
}
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.2 Page: 158ms Template: 9ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API