增加 macvtap 模式支持

This commit is contained in:
bjdgyc
2021-08-12 18:17:20 +08:00
parent 5010d2ecbd
commit 903554533b
19 changed files with 295 additions and 125 deletions

View File

@@ -54,13 +54,13 @@ func OnlineSess() []Online {
Group: v.Group,
MacAddr: v.MacAddr,
RemoteAddr: v.CSess.RemoteAddr,
TunName: v.CSess.TunName,
TunName: v.CSess.IfName,
Mtu: v.CSess.Mtu,
Client: v.CSess.Client,
BandwidthUp: utils.HumanByte(atomic.LoadUint32(&v.CSess.BandwidthUpPeriod)) + "/s",
BandwidthDown: utils.HumanByte(atomic.LoadUint32(&v.CSess.BandwidthDownPeriod)) + "/s",
BandwidthUpAll: utils.HumanByte(atomic.LoadUint32(&v.CSess.BandwidthUpAll)),
BandwidthDownAll: utils.HumanByte(atomic.LoadUint32(&v.CSess.BandwidthDownAll)),
BandwidthUpAll: utils.HumanByte(atomic.LoadUint64(&v.CSess.BandwidthUpAll)),
BandwidthDownAll: utils.HumanByte(atomic.LoadUint64(&v.CSess.BandwidthDownAll)),
LastLogin: v.LastLogin,
}
datas = append(datas, val)