27 lines
821 B
Go
Raw Normal View History

2020-12-30 14:54:20 +05:30
package networkclientpool
import (
"github.com/projectdiscovery/fastdialer/fastdialer"
"github.com/projectdiscovery/nuclei/v3/pkg/protocols/common/protocolstate"
"github.com/projectdiscovery/nuclei/v3/pkg/types"
2020-12-30 14:54:20 +05:30
)
// Init initializes the clientpool implementation
2024-04-03 17:50:57 +02:00
func Init(options *types.Options) error {
2020-12-30 14:54:20 +05:30
return nil
}
// Configuration contains the custom configuration options for a client
type Configuration struct{}
// Hash returns the hash of the configuration to allow client pooling
func (c *Configuration) Hash() string {
return ""
}
// Get creates or gets a client for the protocol based on custom configuration
2025-05-06 10:13:46 +02:00
func Get(options *types.Options, configuration *Configuration) (*fastdialer.Dialer, error) {
dialers := protocolstate.GetDialersWithId(options.ExecutionId)
return dialers.Fastdialer, nil
2020-12-30 14:54:20 +05:30
}