mirror of
https://github.com/aykhans/dodo.git
synced 2025-09-01 00:53:34 +00:00
🎨 Format files
This commit is contained in:
@@ -72,11 +72,12 @@ func getClients(
|
||||
func getDialFunc(proxy *url.URL, timeout time.Duration) (fasthttp.DialFunc, error) {
|
||||
var dialer fasthttp.DialFunc
|
||||
|
||||
if proxy.Scheme == "socks5" || proxy.Scheme == "socks5h" {
|
||||
switch proxy.Scheme {
|
||||
case "socks5", "socks5h":
|
||||
dialer = fasthttpproxy.FasthttpSocksDialerDualStack(proxy.String())
|
||||
} else if proxy.Scheme == "http" {
|
||||
case "http":
|
||||
dialer = fasthttpproxy.FasthttpHTTPDialerDualStackTimeout(proxy.String(), timeout)
|
||||
} else {
|
||||
default:
|
||||
return nil, errors.New("unsupported proxy scheme")
|
||||
}
|
||||
return dialer, nil
|
||||
|
@@ -58,9 +58,9 @@ func releaseDodos(
|
||||
wg sync.WaitGroup
|
||||
streamWG sync.WaitGroup
|
||||
requestCountPerDodo uint
|
||||
dodosCount uint = requestConfig.GetValidDodosCountForRequests()
|
||||
responses = make([][]*Response, dodosCount)
|
||||
increase = make(chan int64, requestConfig.RequestCount)
|
||||
dodosCount = requestConfig.GetValidDodosCountForRequests()
|
||||
responses = make([][]*Response, dodosCount)
|
||||
increase = make(chan int64, requestConfig.RequestCount)
|
||||
)
|
||||
|
||||
wg.Add(int(dodosCount))
|
||||
|
Reference in New Issue
Block a user