mirror of
https://github.com/oneclickvirt/basics.git
synced 2025-11-01 20:42:37 +08:00
Update ipv6.go
This commit is contained in:
@@ -11,7 +11,7 @@ import (
|
||||
|
||||
// 获取第一个以 eth 或 en 开头的网络接口
|
||||
func getInterface() (string, error) {
|
||||
cmd := exec.Command("sh", "-c", "ls /sys/class/net/ | grep -v \"$(ls /sys/devices/virtual/net/)\" | grep -E '^(eth|en)' | head -n 1")
|
||||
cmd := exec.Command("sh", "-c", "ls /sys/class/net/ | grep -E '^(eth|en)' | head -n 1")
|
||||
output, err := cmd.Output()
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
||||
Reference in New Issue
Block a user