Skip to content

Commit

Permalink
Add SourceIP in NetworkConfig (#4566)
Browse files Browse the repository at this point in the history
Co-authored-by: Abdelmalik KERBADOU <abdelmalik.kerbadou@intrinsec.com>
Co-authored-by: Sandeep Singh <sandeep@projectdiscovery.io>
  • Loading branch information
3 people committed Jan 7, 2024
1 parent 056073d commit 9b2b7ad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ type NetworkConfig struct {
TrackError []string // Adds given errors to max host error watchlist
DisableMaxHostErr bool // Disable max host error optimization (Hosts are not skipped even if they are not responding)
Interface string // Interface to use for network scan

SourceIP string // SourceIP sets custom source IP address for network requests
}

// WithNetworkConfig allows setting network config options
Expand All @@ -241,6 +241,7 @@ func WithNetworkConfig(opts NetworkConfig) NucleiSDKOptions {
e.opts.LeaveDefaultPorts = opts.LeaveDefaultPorts
e.hostErrCache = hosterrorscache.New(opts.MaxHostError, hosterrorscache.DefaultMaxHostsCount, opts.TrackError)
e.opts.Interface = opts.Interface
e.opts.SourceIP = opts.SourceIP
return nil
}
}
Expand Down

0 comments on commit 9b2b7ad

Please sign in to comment.