优化IP名单同步速度

This commit is contained in:
刘祥超
2023-04-19 12:01:02 +08:00
parent 4dc25fb71e
commit 37ddff86f1
20 changed files with 334 additions and 56 deletions

View File

@@ -15,10 +15,14 @@ type Conn struct {
rawConn *nft.Conn
}
func NewConn() *Conn {
return &Conn{
rawConn: &nft.Conn{},
func NewConn() (*Conn, error) {
conn, err := nft.New()
if err != nil {
return nil, err
}
return &Conn{
rawConn: conn,
}, nil
}
func (this *Conn) Raw() *nft.Conn {