mirror of
https://github.com/zr-hebo/sniffer-agent.git
synced 2025-08-10 20:36:10 +08:00
Initial commit
This commit is contained in:
22
capture/config.go
Normal file
22
capture/config.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package capture
|
||||
|
||||
import (
|
||||
sd "github.com/zr-hebo/sniffer-agent/session-dealer"
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
var (
|
||||
localIPAddr string
|
||||
|
||||
sessionPool = make(map[string]sd.ConnSession)
|
||||
)
|
||||
|
||||
func init() {
|
||||
var err error
|
||||
localIPAddr, err = getLocalIPAddr()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
log.Infof("parsed local ip address:%s", localIPAddr)
|
||||
}
|
Reference in New Issue
Block a user