Repository: projectdiscovery/nuclei

Issue:
[BUG] Recursive call and logical errors in Dynamic. UnmarshalJSON implementation
### Is there an existing issue for this?

- [x] I have searched the existing issues.

### Current Behavior

 I found that the implementation of the UnmarshalJSON method for the Dynamic struct in `pkg/authprovider/authx/dynamic. go` contains a recursive call issue.

```go
func (d *Dynamic) UnmarshalJSON(data []byte) error {
	if err := json.Unmarshal(data, &d); err != nil {
		return err
	}
	var s Secret
	if err := json.Unmarshal(data, &s); err != nil {
		return err
	}
	d.Secret = &s
	return nil
}
```

Problems:
Using json. `Unmarshal(data, &d)` will trigger an infinite recursion because it will call UnmarshalJSON on d repeatedly, leading to stack overflow.
The correct way to avoid recursion is to use a type alias that does not implement UnmarshalJSON.
Double unmarshalling of the same data is redundant and may cause confusion or data inconsistency.

### Expected Behavior

Suggested Fix: You can avoid recursion by introducing a type alias, for example:
```go
func (d *Dynamic) UnmarshalJSON(data []byte) error {
	
	type DynamicAlias Dynamic
	aux := &struct {
		*DynamicAlias
	}{
		DynamicAlias: (*DynamicAlias)(d),
	}

	if err := json.Unmarshal(data, aux); err != nil {
		return err
	}

	var s Secret
	if err := json.Unmarshal(data, &s); err != nil {
		return err
	}
	d.Secret = &s
	return nil
}
```

### Steps To Reproduce

N/A

### Relevant log output

```shell
N/A
```

### Environment

```markdown
N/A
```

### Anything else?

_No response_

Hints from issue comments:
@dwisiswant0: Nice catch!@dwisiswant0: ```console
$ go test -v -timeout 30s -run ^TestDynamicUnmarshalJSON$ ./pkg/authprovider/authx
=== RUN   TestDynamicUnmarshalJSON
=== RUN   TestDynamicUnmarshalJSON/basic-unmarshal
runtime: goroutine stack exceeds 1000000000-byte limit
runtime: sp=0xc02d780388 stack=[0xc02d780000, 0xc04d780000]
fatal error: stack overflow

runtime stack:
runtime.throw({0xd3874c?, 0x42e49c?})
	/usr/local/go/src/runtime/panic.go:1101 +0x48 fp=0x7068d1f3ac98 sp=0x7068d1f3ac68 pc=0x476988
runtime.newstack()
	/usr/local/go/src/runtime/stack.go:1107 +0x5bb fp=0x7068d1f3add0 sp=0x7068d1f3ac98 pc=0x45af5b
runtime.morestack()
	/usr/local/go/src/runtime/asm_amd64.s:621 +0x7a fp=0x7068d1f3add8 sp=0x7068d1f3add0 pc=0x47c75a

goroutine 12 gp=0xc00021d880 m=9 mp=0xc00047c808 [running]:
runtime.mallocgcSmallNoscan(0x179?, 0x0?, 0x0?)
	/usr/local/go/src/runtime/malloc.go:1254 +0x2ed fp=0xc02d780398 sp=0xc02d780390 pc=0x416f0d
runtime.mallocgc(0x179, 0x0, 0x0)
	/usr/local/go/src/runtime/malloc.go:1055 +0xb9 fp=0xc02d7803c8 sp=0xc02d780398 pc=0x474419
runtime.makeslicecopy(0x0?, 0x0?, 0x417174?, 0xc05a600a80)
	/usr/local/go/src/runtime/slice.go:57 +0xdf fp=0xc02d780420 sp=0xc02d7803c8 pc=0x45901f
github.com/goccy/go-json.unmarshal({0xc05a600a80?, 0x416dfb?, 0x0?}, {0xbd2a40, 0xc05a5930b0}, {0x0, 0x0, 0x706928661101?})
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/decode.go:29 +0x58 fp=0xc02d7804a0 sp=0xc02d780420 pc=0xb00118
github.com/goccy/go-json.Unmarshal({0xc05a600a80?, 0xc02d780528?, 0x474419?}, {0xbd2a40?, 0xc05a5930b0?})
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/json.go:274 +0x2b fp=0xc02d7804f0 sp=0xc02d7804a0 pc=0xb00acb
github.com/projectdiscovery/nuclei/v3/pkg/authprovider/authx.(*Dynamic).UnmarshalJSON(0xc00012e090, {0xc05a600a80, 0x178, 0x178})
	/home/dw1/Development/PD/nuclei/pkg/authprovider/authx/dynamic.go:55 +0x89 fp=0xc02d780538 sp=0xc02d7804f0 pc=0xb153a9
github.com/goccy/go-json/internal/decoder.(*unmarshalJSONDecoder).Decode(0xc00032c930, 0xc05a5f1580, 0x0?, 0x0?, 0xc00012e090)
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/internal/decoder/unmarshal_json.go:94 +0x1bf fp=0xc02d7805b8 sp=0xc02d780538 pc=0xabb51f
github.com/goccy/go-json/internal/decoder.(*ptrDecoder).Decode(0x147e8a0?, 0xc05a5930a8?, 0x417174?, 0xc05a600780?, 0xc05a5930a8)
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/internal/decoder/ptr.go:86 +0xc3 fp=0xc02d7805f8 sp=0xc02d7805b8 pc=0xab39e3
github.com/goccy/go-json.unmarshal({0xc05a600780?, 0x416dfb?, 0x0?}, {0xbd2a40, 0xc05a5930a8}, {0x0, 0x0, 0x706928661101?})
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/decode.go:47 +0x16e fp=0xc02d780678 sp=0xc02d7805f8 pc=0xb0022e
github.com/goccy/go-json.Unmarshal({0xc05a600780?, 0xc02d780700?, 0x474419?}, {0xbd2a40?, 0xc05a5930a8?})
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/json.go:274 +0x2b fp=0xc02d7806c8 sp=0xc02d780678 pc=0xb00acb
github.com/projectdiscovery/nuclei/v3/pkg/authprovider/authx.(*Dynamic).UnmarshalJSON(0xc00012e090, {0xc05a600780, 0x178, 0x178})
	/home/dw1/Development/PD/nuclei/pkg/authprovider/authx/dynamic.go:55 +0x89 fp=0xc02d780710 sp=0xc02d7806c8 pc=0xb153a9
github.com/goccy/go-json/internal/decoder.(*unmarshalJSONDecoder).Decode(0xc00032c930, 0xc05a5f1540, 0x0?, 0x0?, 0xc00012e090)
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/internal/decoder/unmarshal_json.go:94 +0x1bf fp=0xc02d780790 sp=0xc02d780710 pc=0xabb51f
github.com/goccy/go-json/internal/decoder.(*ptrDecoder).Decode(0x147e8a0?, 0xc05a5930a0?, 0x417174?, 0xc05a600480?, 0xc05a5930a0)
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/internal/decoder/ptr.go:86 +0xc3 fp=0xc02d7807d0 sp=0xc02d780790 pc=0xab39e3
github.com/goccy/go-json.unmarshal({0xc05a600480?, 0x416dfb?, 0x0?}, {0xbd2a40, 0xc05a5930a0}, {0x0, 0x0, 0x706928661101?})
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/decode.go:47 +0x16e fp=0xc02d780850 sp=0xc02d7807d0 pc=0xb0022e
github.com/goccy/go-json.Unmarshal({0xc05a600480?, 0xc02d7808d8?, 0x474419?}, {0xbd2a40?, 0xc05a5930a0?})
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/json.go:274 +0x2b fp=0xc02d7808a0 sp=0xc02d780850 pc=0xb00acb
github.com/projectdiscovery/nuclei/v3/pkg/authprovider/authx.(*Dynamic).UnmarshalJSON(0xc00012e090, {0xc05a600480, 0x178, 0x178})
	/home/dw1/Development/PD/nuclei/pkg/authprovider/authx/dynamic.go:55 +0x89 fp=0xc02d7808e8 sp=0xc02d7808a0 pc=0xb153a9
github.com/goccy/go-json/internal/decoder.(*unmarshalJSONDecoder).Decode(0xc00032c930, 0xc05a5f1500, 0x0?, 0x0?, 0xc00012e090)
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/internal/decoder/unmarshal_json.go:94 +0x1bf fp=0xc02d780968 sp=0xc02d7808e8 pc=0xabb51f
github.com/goccy/go-json/internal/decoder.(*ptrDecoder).Decode(0x147e8a0?, 0xc05a593098?, 0x417174?, 0xc05a600180?, 0xc05a593098)
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/internal/decoder/ptr.go:86 +0xc3 fp=0xc02d7809a8 sp=0xc02d780968 pc=0xab39e3
github.com/goccy/go-json.unmarshal({0xc05a600180?, 0x416dfb?, 0xc02d780a78?}, {0xbd2a40, 0xc05a593098}, {0x0, 0x0, 0x706928661101?})
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/decode.go:47 +0x16e fp=0xc02d780a28 sp=0xc02d7809a8 pc=0xb0022e
github.com/goccy/go-json.Unmarshal({0xc05a600180?, 0xc02d780ab0?, 0x474419?}, {0xbd2a40?, 0xc05a593098?})
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/json.go:274 +0x2b fp=0xc02d780a78 sp=0xc02d780a28 pc=0xb00acb
github.com/projectdiscovery/nuclei/v3/pkg/authprovider/authx.(*Dynamic).UnmarshalJSON(0xc00012e090, {0xc05a600180, 0x178, 0x178})
	/home/dw1/Development/PD/nuclei/pkg/authprovider/authx/dynamic.go:55 +0x89 fp=0xc02d780ac0 sp=0xc02d780a78 pc=0xb153a9
github.com/goccy/go-json/internal/decoder.(*unmarshalJSONDecoder).Decode(0xc00032c930, 0xc05a5f14c0, 0x0?, 0x0?, 0xc00012e090)
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/internal/decoder/unmarshal_json.go:94 +0x1bf fp=0xc02d780b40 sp=0xc02d780ac0 pc=0xabb51f
github.com/goccy/go-json/internal/decoder.(*ptrDecoder).Decode(0x147e8a0?, 0xc05a593090?, 0x417174?, 0xc05a5ffe00?, 0xc05a593090)
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/internal/decoder/ptr.go:86 +0xc3 fp=0xc02d780b80 sp=0xc02d780b40 pc=0xab39e3
github.com/goccy/go-json.unmarshal({0xc05a5ffe00?, 0x416dfb?, 0x0?}, {0xbd2a40, 0xc05a593090}, {0x0, 0x0, 0x706928661101?})
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/decode.go:47 +0x16e fp=0xc02d780c00 sp=0xc02d780b80 pc=0xb0022e
github.com/goccy/go-json.Unmarshal({0xc05a5ffe00?, 0xc02d780c88?, 0x474419?}, {0xbd2a40?, 0xc05a593090?})
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/json.go:274 +0x2b fp=0xc02d780c50 sp=0xc02d780c00 pc=0xb00acb
github.com/projectdiscovery/nuclei/v3/pkg/authprovider/authx.(*Dynamic).UnmarshalJSON(0xc00012e090, {0xc05a5ffe00, 0x178, 0x178})
	/home/dw1/Development/PD/nuclei/pkg/authprovider/authx/dynamic.go:55 +0x89 fp=0xc02d780c98 sp=0xc02d780c50 pc=0xb153a9
github.com/goccy/go-json/internal/decoder.(*unmarshalJSONDecoder).Decode(0xc00032c930, 0xc05a5f1480, 0x0?, 0x0?, 0xc00012e090)
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/internal/decoder/unmarshal_json.go:94 +0x1bf fp=0xc02d780d18 sp=0xc02d780c98 pc=0xabb51f
github.com/goccy/go-json/internal/decoder.(*ptrDecoder).Decode(0x147e8a0?, 0xc05a593088?, 0x417174?, 0xc05a5ffb00?, 0xc05a593088)
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/internal/decoder/ptr.go:86 +0xc3 fp=0xc02d780d58 sp=0xc02d780d18 pc=0xab39e3
github.com/goccy/go-json.unmarshal({0xc05a5ffb00?, 0x416dfb?, 0x0?}, {0xbd2a40, 0xc05a593088}, {0x0, 0x0, 0x706928661101?})
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/decode.go:47 +0x16e fp=0xc02d780dd8 sp=0xc02d780d58 pc=0xb0022e
github.com/goccy/go-json.Unmarshal({0xc05a5ffb00?, 0xc02d780e60?, 0x474419?}, {0xbd2a40?, 0xc05a593088?})
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/json.go:274 +0x2b fp=0xc02d780e28 sp=0xc02d780dd8 pc=0xb00acb
github.com/projectdiscovery/nuclei/v3/pkg/authprovider/authx.(*Dynamic).UnmarshalJSON(0xc00012e090, {0xc05a5ffb00, 0x178, 0x178})
	/home/dw1/Development/PD/nuclei/pkg/authprovider/authx/dynamic.go:55 +0x89 fp=0xc02d780e70 sp=0xc02d780e28 pc=0xb153a9
github.com/goccy/go-json/internal/decoder.(*unmarshalJSONDecoder).Decode(0xc00032c930, 0xc05a5f1440, 0x0?, 0x0?, 0xc00012e090)
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/internal/decoder/unmarshal_json.go:94 +0x1bf fp=0xc02d780ef0 sp=0xc02d780e70 pc=0xabb51f
github.com/goccy/go-json/internal/decoder.(*ptrDecoder).Decode(0x147e8a0?, 0xc05a593080?, 0x417174?, 0xc05a5ff800?, 0xc05a593080)
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/internal/decoder/ptr.go:86 +0xc3 fp=0xc02d780f30 sp=0xc02d780ef0 pc=0xab39e3
github.com/goccy/go-json.unmarshal({0xc05a5ff800?, 0x416dfb?, 0x0?}, {0xbd2a40, 0xc05a593080}, {0x0, 0x0, 0x706928661101?})
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/decode.go:47 +0x16e fp=0xc02d780fb0 sp=0xc02d780f30 pc=0xb0022e
github.com/goccy/go-json.Unmarshal({0xc05a5ff800?, 0xc02d781038?, 0x474419?}, {0xbd2a40?, 0xc05a593080?})
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/json.go:274 +0x2b fp=0xc02d781000 sp=0xc02d780fb0 pc=0xb00acb
github.com/projectdiscovery/nuclei/v3/pkg/authprovider/authx.(*Dynamic).UnmarshalJSON(0xc00012e090, {0xc05a5ff800, 0x178, 0x178})
	/home/dw1/Development/PD/nuclei/pkg/authprovider/authx/dynamic.go:55 +0x89 fp=0xc02d781048 sp=0xc02d781000 pc=0xb153a9
github.com/goccy/go-json/internal/decoder.(*unmarshalJSONDecoder).Decode(0xc00032c930, 0xc05a5f1400, 0x0?, 0x0?, 0xc00012e090)
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/internal/decoder/unmarshal_json.go:94 +0x1bf fp=0xc02d7810c8 sp=0xc02d781048 pc=0xabb51f
github.com/goccy/go-json/internal/decoder.(*ptrDecoder).Decode(0x147e8a0?, 0xc05a593078?, 0x417174?, 0xc05a5ff500?, 0xc05a593078)
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/internal/decoder/ptr.go:86 +0xc3 fp=0xc02d781108 sp=0xc02d7810c8 pc=0xab39e3
github.com/goccy/go-json.unmarshal({0xc05a5ff500?, 0x416dfb?, 0x0?}, {0xbd2a40, 0xc05a593078}, {0x0, 0x0, 0x706928661101?})
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/decode.go:47 +0x16e fp=0xc02d781188 sp=0xc02d781108 pc=0xb0022e
github.com/goccy/go-json.Unmarshal({0xc05a5ff500?, 0xc02d781210?, 0x474419?}, {0xbd2a40?, 0xc05a593078?})
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/json.go:274 +0x2b fp=0xc02d7811d8 sp=0xc02d781188 pc=0xb00acb
github.com/projectdiscovery/nuclei/v3/pkg/authprovider/authx.(*Dynamic).UnmarshalJSON(0xc00012e090, {0xc05a5ff500, 0x178, 0x178})
	/home/dw1/Development/PD/nuclei/pkg/authprovider/authx/dynamic.go:55 +0x89 fp=0xc02d781220 sp=0xc02d7811d8 pc=0xb153a9
github.com/goccy/go-json/internal/decoder.(*unmarshalJSONDecoder).Decode(0xc00032c930, 0xc05a5f13c0, 0x0?, 0x0?, 0xc00012e090)
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/internal/decoder/unmarshal_json.go:94 +0x1bf fp=0xc02d7812a0 sp=0xc02d781220 pc=0xabb51f
github.com/goccy/go-json/internal/decoder.(*ptrDecoder).Decode(0x147e8a0?, 0xc05a593070?, 0x417174?, 0xc05a5ff200?, 0xc05a593070)
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/internal/decoder/ptr.go:86 +0xc3 fp=0xc02d7812e0 sp=0xc02d7812a0 pc=0xab39e3
github.com/goccy/go-json.unmarshal({0xc05a5ff200?, 0x416dfb?, 0x0?}, {0xbd2a40, 0xc05a593070}, {0x0, 0x0, 0x706928661101?})
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/decode.go:47 +0x16e fp=0xc02d781360 sp=0xc02d7812e0 pc=0xb0022e
github.com/goccy/go-json.Unmarshal({0xc05a5ff200?, 0xc02d7813e8?, 0x474419?}, {0xbd2a40?, 0xc05a593070?})
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/json.go:274 +0x2b fp=0xc02d7813b0 sp=0xc02d781360 pc=0xb00acb
github.com/projectdiscovery/nuclei/v3/pkg/authprovider/authx.(*Dynamic).UnmarshalJSON(0xc00012e090, {0xc05a5ff200, 0x178, 0x178})
	/home/dw1/Development/PD/nuclei/pkg/authprovider/authx/dynamic.go:55 +0x89 fp=0xc02d7813f8 sp=0xc02d7813b0 pc=0xb153a9
github.com/goccy/go-json/internal/decoder.(*unmarshalJSONDecoder).Decode(0xc00032c930, 0xc05a5f1380, 0x0?, 0x0?, 0xc00012e090)
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/internal/decoder/unmarshal_json.go:94 +0x1bf fp=0xc02d781478 sp=0xc02d7813f8 pc=0xabb51f
github.com/goccy/go-json/internal/decoder.(*ptrDecoder).Decode(0x147e8a0?, 0xc05a593068?, 0x417174?, 0xc05a5fef00?, 0xc05a593068)
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/internal/decoder/ptr.go:86 +0xc3 fp=0xc02d7814b8 sp=0xc02d781478 pc=0xab39e3
github.com/goccy/go-json.unmarshal({0xc05a5fef00?, 0x416dfb?, 0x0?}, {0xbd2a40, 0xc05a593068}, {0x0, 0x0, 0x706928661101?})
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/decode.go:47 +0x16e fp=0xc02d781538 sp=0xc02d7814b8 pc=0xb0022e
github.com/goccy/go-json.Unmarshal({0xc05a5fef00?, 0xc02d7815c0?, 0x474419?}, {0xbd2a40?, 0xc05a593068?})
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/json.go:274 +0x2b fp=0xc02d781588 sp=0xc02d781538 pc=0xb00acb
...5687085 frames elided...
github.com/projectdiscovery/nuclei/v3/pkg/authprovider/authx.(*Dynamic).UnmarshalJSON(0xc00012e090, {0xc00035c180, 0x178, 0x178})
	/home/dw1/Development/PD/nuclei/pkg/authprovider/authx/dynamic.go:55 +0x89 fp=0xc04d77ee68 sp=0xc04d77ee20 pc=0xb153a9
github.com/goccy/go-json/internal/decoder.(*unmarshalJSONDecoder).Decode(0xc00032c930, 0xc000130940, 0x0?, 0x0?, 0xc00012e090)
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/internal/decoder/unmarshal_json.go:94 +0x1bf fp=0xc04d77eee8 sp=0xc04d77ee68 pc=0xabb51f
github.com/goccy/go-json/internal/decoder.(*ptrDecoder).Decode(0x147e8a0?, 0xc00007e280?, 0x417174?, 0xc000191e00?, 0xc00007e280)
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/internal/decoder/ptr.go:86 +0xc3 fp=0xc04d77ef28 sp=0xc04d77eee8 pc=0xab39e3
github.com/goccy/go-json.unmarshal({0xc000191e00?, 0x473afa?, 0x0?}, {0xbd2a40, 0xc00007e280}, {0x0, 0x0, 0x706928661101?})
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/decode.go:47 +0x16e fp=0xc04d77efa8 sp=0xc04d77ef28 pc=0xb0022e
github.com/goccy/go-json.Unmarshal({0xc000191e00?, 0xc1cf00?, 0xcb00a0?}, {0xbd2a40?, 0xc00007e280?})
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/json.go:274 +0x2b fp=0xc04d77eff8 sp=0xc04d77efa8 pc=0xb00acb
github.com/projectdiscovery/nuclei/v3/pkg/authprovider/authx.(*Dynamic).UnmarshalJSON(0xc00012e090, {0xc000191e00, 0x178, 0x178})
	/home/dw1/Development/PD/nuclei/pkg/authprovider/authx/dynamic.go:55 +0x89 fp=0xc04d77f040 sp=0xc04d77eff8 pc=0xb153a9
github.com/goccy/go-json/internal/decoder.(*unmarshalJSONDecoder).Decode(0xc00032c930, 0xc000130900, 0x0?, 0x0?, 0xc00012e090)
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/internal/decoder/unmarshal_json.go:94 +0x1bf fp=0xc04d77f0c0 sp=0xc04d77f040 pc=0xabb51f
github.com/goccy/go-json/internal/decoder.(*ptrDecoder).Decode(0x147e8a0?, 0xc00007e278?, 0x417174?, 0xc000191b00?, 0xc00007e278)
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/internal/decoder/ptr.go:86 +0xc3 fp=0xc04d77f100 sp=0xc04d77f0c0 pc=0xab39e3
github.com/goccy/go-json.unmarshal({0xc000191b00?, 0x473afa?, 0x0?}, {0xbd2a40, 0xc00007e278}, {0x0, 0x0, 0x706928661101?})
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/decode.go:47 +0x16e fp=0xc04d77f180 sp=0xc04d77f100 pc=0xb0022e
github.com/goccy/go-json.Unmarshal({0xc000191b00?, 0xc1cf00?, 0xcb00a0?}, {0xbd2a40?, 0xc00007e278?})
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/json.go:274 +0x2b fp=0xc04d77f1d0 sp=0xc04d77f180 pc=0xb00acb
github.com/projectdiscovery/nuclei/v3/pkg/authprovider/authx.(*Dynamic).UnmarshalJSON(0xc00012e090, {0xc000191b00, 0x178, 0x178})
	/home/dw1/Development/PD/nuclei/pkg/authprovider/authx/dynamic.go:55 +0x89 fp=0xc04d77f218 sp=0xc04d77f1d0 pc=0xb153a9
github.com/goccy/go-json/internal/decoder.(*unmarshalJSONDecoder).Decode(0xc00032c930, 0xc0001308c0, 0x0?, 0x0?, 0xc00012e090)
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/internal/decoder/unmarshal_json.go:94 +0x1bf fp=0xc04d77f298 sp=0xc04d77f218 pc=0xabb51f
github.com/goccy/go-json/internal/decoder.(*ptrDecoder).Decode(0x147e8a0?, 0xc00007e270?, 0x417174?, 0xc000191800?, 0xc00007e270)
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/internal/decoder/ptr.go:86 +0xc3 fp=0xc04d77f2d8 sp=0xc04d77f298 pc=0xab39e3
github.com/goccy/go-json.unmarshal({0xc000191800?, 0x473afa?, 0x0?}, {0xbd2a40, 0xc00007e270}, {0x0, 0x0, 0x706928661101?})
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/decode.go:47 +0x16e fp=0xc04d77f358 sp=0xc04d77f2d8 pc=0xb0022e
github.com/goccy/go-json.Unmarshal({0xc000191800?, 0xc1cf00?, 0xcb00a0?}, {0xbd2a40?, 0xc00007e270?})
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/json.go:274 +0x2b fp=0xc04d77f3a8 sp=0xc04d77f358 pc=0xb00acb
github.com/projectdiscovery/nuclei/v3/pkg/authprovider/authx.(*Dynamic).UnmarshalJSON(0xc00012e090, {0xc000191800, 0x178, 0x178})
	/home/dw1/Development/PD/nuclei/pkg/authprovider/authx/dynamic.go:55 +0x89 fp=0xc04d77f3f0 sp=0xc04d77f3a8 pc=0xb153a9
github.com/goccy/go-json/internal/decoder.(*unmarshalJSONDecoder).Decode(0xc00032c930, 0xc000130880, 0x0?, 0x0?, 0xc00012e090)
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/internal/decoder/unmarshal_json.go:94 +0x1bf fp=0xc04d77f470 sp=0xc04d77f3f0 pc=0xabb51f
github.com/goccy/go-json/internal/decoder.(*ptrDecoder).Decode(0x147e8a0?, 0xc00007e268?, 0x417174?, 0xc000191500?, 0xc00007e268)
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/internal/decoder/ptr.go:86 +0xc3 fp=0xc04d77f4b0 sp=0xc04d77f470 pc=0xab39e3
github.com/goccy/go-json.unmarshal({0xc000191500?, 0x473afa?, 0x0?}, {0xbd2a40, 0xc00007e268}, {0x0, 0x0, 0x706928661101?})
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/decode.go:47 +0x16e fp=0xc04d77f530 sp=0xc04d77f4b0 pc=0xb0022e
github.com/goccy/go-json.Unmarshal({0xc000191500?, 0xc1cf00?, 0xcb00a0?}, {0xbd2a40?, 0xc00007e268?})
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/json.go:274 +0x2b fp=0xc04d77f580 sp=0xc04d77f530 pc=0xb00acb
github.com/projectdiscovery/nuclei/v3/pkg/authprovider/authx.(*Dynamic).UnmarshalJSON(0xc00012e090, {0xc000191500, 0x178, 0x178})
	/home/dw1/Development/PD/nuclei/pkg/authprovider/authx/dynamic.go:55 +0x89 fp=0xc04d77f5c8 sp=0xc04d77f580 pc=0xb153a9
github.com/goccy/go-json/internal/decoder.(*unmarshalJSONDecoder).Decode(0xc00032c930, 0xc000130840, 0x0?, 0x0?, 0xc00012e090)
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/internal/decoder/unmarshal_json.go:94 +0x1bf fp=0xc04d77f648 sp=0xc04d77f5c8 pc=0xabb51f
github.com/goccy/go-json/internal/decoder.(*ptrDecoder).Decode(0x147e8a0?, 0xc00007e260?, 0x417174?, 0xc000191200?, 0xc00007e260)
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/internal/decoder/ptr.go:86 +0xc3 fp=0xc04d77f688 sp=0xc04d77f648 pc=0xab39e3
github.com/goccy/go-json.unmarshal({0xc000191200?, 0x473afa?, 0xc68800?}, {0xbd2a40, 0xc00007e260}, {0x0, 0x0, 0x706928661101?})
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/decode.go:47 +0x16e fp=0xc04d77f708 sp=0xc04d77f688 pc=0xb0022e
github.com/goccy/go-json.Unmarshal({0xc000191200?, 0xc1cf00?, 0xcb00a0?}, {0xbd2a40?, 0xc00007e260?})
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/json.go:274 +0x2b fp=0xc04d77f758 sp=0xc04d77f708 pc=0xb00acb
github.com/projectdiscovery/nuclei/v3/pkg/authprovider/authx.(*Dynamic).UnmarshalJSON(0xc00012e090, {0xc000191200, 0x178, 0x178})
	/home/dw1/Development/PD/nuclei/pkg/authprovider/authx/dynamic.go:55 +0x89 fp=0xc04d77f7a0 sp=0xc04d77f758 pc=0xb153a9
github.com/goccy/go-json/internal/decoder.(*unmarshalJSONDecoder).Decode(0xc00032c930, 0xc0001307e0, 0x0?, 0x0?, 0xc00012e090)
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/internal/decoder/unmarshal_json.go:94 +0x1bf fp=0xc04d77f820 sp=0xc04d77f7a0 pc=0xabb51f
github.com/goccy/go-json/internal/decoder.(*ptrDecoder).Decode(0x147e8a0?, 0xc00007e250?, 0x417174?, 0xc000190f00?, 0xc00007e250)
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/internal/decoder/ptr.go:86 +0xc3 fp=0xc04d77f860 sp=0xc04d77f820 pc=0xab39e3
github.com/goccy/go-json.unmarshal({0xc000190f00?, 0x473afa?, 0xc68800?}, {0xbd2a40, 0xc00007e250}, {0x0, 0x0, 0x706928661101?})
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/decode.go:47 +0x16e fp=0xc04d77f8e0 sp=0xc04d77f860 pc=0xb0022e
github.com/goccy/go-json.Unmarshal({0xc000190f00?, 0xc1cf00?, 0xcb00a0?}, {0xbd2a40?, 0xc00007e250?})
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/json.go:274 +0x2b fp=0xc04d77f930 sp=0xc04d77f8e0 pc=0xb00acb
github.com/projectdiscovery/nuclei/v3/pkg/authprovider/authx.(*Dynamic).UnmarshalJSON(0xc00012e090, {0xc000190f00, 0x178, 0x178})
	/home/dw1/Development/PD/nuclei/pkg/authprovider/authx/dynamic.go:55 +0x89 fp=0xc04d77f978 sp=0xc04d77f930 pc=0xb153a9
github.com/goccy/go-json/internal/decoder.(*unmarshalJSONDecoder).Decode(0xc00032c930, 0xc0001307a0, 0x0?, 0x0?, 0xc00012e090)
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/internal/decoder/unmarshal_json.go:94 +0x1bf fp=0xc04d77f9f8 sp=0xc04d77f978 pc=0xabb51f
github.com/goccy/go-json/internal/decoder.(*ptrDecoder).Decode(0x147e8a0?, 0xc00007e248?, 0x417174?, 0xc000190c00?, 0xc00007e248)
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/internal/decoder/ptr.go:86 +0xc3 fp=0xc04d77fa38 sp=0xc04d77f9f8 pc=0xab39e3
github.com/goccy/go-json.unmarshal({0xc000190c00?, 0x473afa?, 0x4743f9?}, {0xbd2a40, 0xc00007e248}, {0x0, 0x0, 0x706928661101?})
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/decode.go:47 +0x16e fp=0xc04d77fab8 sp=0xc04d77fa38 pc=0xb0022e
github.com/goccy/go-json.Unmarshal({0xc000190c00?, 0xc1cf00?, 0xcb00a0?}, {0xbd2a40?, 0xc00007e248?})
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/json.go:274 +0x2b fp=0xc04d77fb08 sp=0xc04d77fab8 pc=0xb00acb
github.com/projectdiscovery/nuclei/v3/pkg/authprovider/authx.(*Dynamic).UnmarshalJSON(0xc00012e090, {0xc000190c00, 0x178, 0x178})
	/home/dw1/Development/PD/nuclei/pkg/authprovider/authx/dynamic.go:55 +0x89 fp=0xc04d77fb50 sp=0xc04d77fb08 pc=0xb153a9
github.com/goccy/go-json/internal/decoder.(*unmarshalJSONDecoder).Decode(0xc00032c930, 0xc000130760, 0x0?, 0x0?, 0xc00012e090)
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/internal/decoder/unmarshal_json.go:94 +0x1bf fp=0xc04d77fbd0 sp=0xc04d77fb50 pc=0xabb51f
github.com/goccy/go-json/internal/decoder.(*ptrDecoder).Decode(0x147e8a0?, 0xc00007e240?, 0x417174?, 0xc000190900?, 0xc00007e240)
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/internal/decoder/ptr.go:86 +0xc3 fp=0xc04d77fc10 sp=0xc04d77fbd0 pc=0xab39e3
github.com/goccy/go-json.unmarshal({0xc000190900?, 0x473be5?, 0x7068d0502880?}, {0xbd2a40, 0xc00007e240}, {0x0, 0x0, 0x706928661101?})
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/decode.go:47 +0x16e fp=0xc04d77fc90 sp=0xc04d77fc10 pc=0xb0022e
github.com/goccy/go-json.Unmarshal({0xc000190900?, 0xc1cf00?, 0xcb00a0?}, {0xbd2a40?, 0xc00007e240?})
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/json.go:274 +0x2b fp=0xc04d77fce0 sp=0xc04d77fc90 pc=0xb00acb
github.com/projectdiscovery/nuclei/v3/pkg/authprovider/authx.(*Dynamic).UnmarshalJSON(0xc00012e090, {0xc000190900, 0x178, 0x178})
	/home/dw1/Development/PD/nuclei/pkg/authprovider/authx/dynamic.go:55 +0x89 fp=0xc04d77fd28 sp=0xc04d77fce0 pc=0xb153a9
github.com/goccy/go-json/internal/decoder.(*unmarshalJSONDecoder).Decode(0xc00032c930, 0xc000130720, 0x0?, 0x0?, 0xc00012e090)
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/internal/decoder/unmarshal_json.go:94 +0x1bf fp=0xc04d77fda8 sp=0xc04d77fd28 pc=0xabb51f
github.com/goccy/go-json/internal/decoder.(*ptrDecoder).Decode(0x147e8a0?, 0xc00007e230?, 0x417174?, 0xc000190300?, 0xc00007e230)
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/internal/decoder/ptr.go:86 +0xc3 fp=0xc04d77fde8 sp=0xc04d77fda8 pc=0xab39e3
github.com/goccy/go-json.unmarshal({0xc000190300?, 0x7068e017e688?, 0x706928661108?}, {0xbd2a40, 0xc00007e230}, {0x0, 0x0, 0x474301?})
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/decode.go:47 +0x16e fp=0xc04d77fe68 sp=0xc04d77fde8 pc=0xb0022e
github.com/goccy/go-json.Unmarshal({0xc000190300?, 0x13f5c60?, 0xc00050def0?}, {0xbd2a40?, 0xc00007e230?})
	/home/dw1/go/pkg/mod/github.com/goccy/go-json@v0.10.5/json.go:274 +0x2b fp=0xc04d77feb8 sp=0xc04d77fe68 pc=0xb00acb
github.com/projectdiscovery/nuclei/v3/pkg/authprovider/authx.(*Dynamic).UnmarshalJSON(0xc00012e090, {0xc000190300, 0x178, 0x178})
	/home/dw1/Development/PD/nuclei/pkg/authprovider/authx/dynamic.go:55 +0x89 fp=0xc04d77ff00 sp=0xc04d77feb8 pc=0xb153a9
github.com/projectdiscovery/nuclei/v3/pkg/authprovider/authx.TestDynamicUnmarshalJSON.func1(0xc00021d6c0)
	/home/dw1/Development/PD/nuclei/pkg/authprovider/authx/dynamic_test.go:34 +0x7c fp=0xc04d77ff70 sp=0xc04d77ff00 pc=0xb16b7c
testing.tRunner(0xc00021d6c0, 0xe4c190)
	/usr/local/go/src/testing/testing.go:1792 +0xf4 fp=0xc04d77ffc0 sp=0xc04d77ff70 pc=0x51b254
testing.(*T).Run.gowrap1()
	/usr/local/go/src/testing/testing.go:1851 +0x25 fp=0xc04d77ffe0 sp=0xc04d77ffc0 pc=0x51c2e5
runtime.goexit({})
	/usr/local/go/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc04d77ffe8 sp=0xc04d77ffe0 pc=0x47e601
created by testing.(*T).Run in goroutine 11
	/usr/local/go/src/testing/testing.go:1851 +0x413

goroutine 1 gp=0xc000002380 m=nil [chan receive]:
runtime.gopark(0x300000000f2b7c0?, 0x3000000d2740848?, 0x48?, 0x8?, 0x706928661108?)
	/usr/local/go/src/runtime/proc.go:435 +0xce fp=0xc0006ab998 sp=0xc0006ab978 pc=0x476aae
runtime.chanrecv(0xc0003667e0, 0xc0006aba7f, 0x1)
	/usr/local/go/src/runtime/chan.go:664 +0x445 fp=0xc0006aba10 sp=0xc0006ab998 pc=0x40fc25
runtime.chanrecv1(0x14f8440?, 0xf4b6e0?)
	/usr/local/go/src/runtime/chan.go:506 +0x12 fp=0xc0006aba38 sp=0xc0006aba10 pc=0x40f7b2
testing.(*T).Run(0xc00021d180, {0xd52091?, 0xc0006abb30?}, 0xe4c088)
	/usr/local/go/src/testing/testing.go:1859 +0x431 fp=0xc0006abb10 sp=0xc0006aba38 pc=0x51c171
testing.runTests.func1(0xc00021d180)
	/usr/local/go/src/testing/testing.go:2279 +0x37 fp=0xc0006abb50 sp=0xc0006abb10 pc=0x51e4d7
testing.tRunner(0xc00021d180, 0xc0006abc70)
	/usr/local/go/src/testing/testing.go:1792 +0xf4 fp=0xc0006abba0 sp=0xc0006abb50 pc=0x51b254
testing.runTests(0xc000600000, {0x147ece0, 0x2, 0x2}, {0x14fb980?, 0x7?, 0x14f9480?})
	/usr/local/go/src/testing/testing.go:2277 +0x4b4 fp=0xc0006abca0 sp=0xc0006abba0 pc=0x51e3b4
testing.(*M).Run(0xc000483900)
	/usr/local/go/src/testing/testing.go:2142 +0x64a fp=0xc0006abed0 sp=0xc0006abca0 pc=0x51cd6a
main.main()
	_testmain.go:47 +0x9b fp=0xc0006abf50 sp=0xc0006abed0 pc=0xb17b1b
runtime.main()
	/usr/local/go/src/runtime/proc.go:283 +0x28b fp=0xc0006abfe0 sp=0xc0006abf50 pc=0x441f2b
runtime.goexit({})
	/usr/local/go/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc0006abfe8 sp=0xc0006abfe0 pc=0x47e601

goroutine 2 gp=0xc000002e00 m=nil [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
	/usr/local/go/src/runtime/proc.go:435 +0xce fp=0xc000084fa8 sp=0xc000084f88 pc=0x476aae
runtime.goparkunlock(...)
	/usr/local/go/src/runtime/proc.go:441
runtime.forcegchelper()
	/usr/local/go/src/runtime/proc.go:348 +0xb3 fp=0xc000084fe0 sp=0xc000084fa8 pc=0x442273
runtime.goexit({})
	/usr/local/go/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc000084fe8 sp=0xc000084fe0 pc=0x47e601
created by runtime.init.7 in goroutine 1
	/usr/local/go/src/runtime/proc.go:336 +0x1a

goroutine 3 gp=0xc000003340 m=nil [GC sweep wait]:
runtime.gopark(0x1?, 0x0?, 0x0?, 0x0?, 0x0?)
	/usr/local/go/src/runtime/proc.go:435 +0xce fp=0xc000085780 sp=0xc000085760 pc=0x476aae
runtime.goparkunlock(...)
	/usr/local/go/src/runtime/proc.go:441
runtime.bgsweep(0xc0000ae000)
	/usr/local/go/src/runtime/mgcsweep.go:316 +0xdf fp=0xc0000857c8 sp=0xc000085780 pc=0x42a25f
runtime.gcenable.gowrap1()
	/usr/local/go/src/runtime/mgc.go:204 +0x25 fp=0xc0000857e0 sp=0xc0000857c8 pc=0x41e6e5
runtime.goexit({})
	/usr/local/go/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc0000857e8 sp=0xc0000857e0 pc=0x47e601
created by runtime.gcenable in goroutine 1
	/usr/local/go/src/runtime/mgc.go:204 +0x66

goroutine 4 gp=0xc000003500 m=nil [GC scavenge wait]:
runtime.gopark(0x10000?, 0xf24640?, 0x0?, 0x0?, 0x0?)
	/usr/local/go/src/runtime/proc.go:435 +0xce fp=0xc000085f78 sp=0xc000085f58 pc=0x476aae
runtime.goparkunlock(...)
	/usr/local/go/src/runtime/proc.go:441
runtime.(*scavengerState).park(0x14f9600)
	/usr/local/go/src/runtime/mgcscavenge.go:425 +0x49 fp=0xc000085fa8 sp=0xc000085f78 pc=0x427cc9
runtime.bgscavenge(0xc0000ae000)
	/usr/local/go/src/runtime/mgcscavenge.go:658 +0x59 fp=0xc000085fc8 sp=0xc000085fa8 pc=0x428259
runtime.gcenable.gowrap2()
	/usr/local/go/src/runtime/mgc.go:205 +0x25 fp=0xc000085fe0 sp=0xc000085fc8 pc=0x41e685
runtime.goexit({})
	/usr/local/go/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc000085fe8 sp=0xc000085fe0 pc=0x47e601
created by runtime.gcenable in goroutine 1
	/usr/local/go/src/runtime/mgc.go:205 +0xa5

goroutine 5 gp=0xc000003dc0 m=nil [finalizer wait]:
runtime.gopark(0x1b8?, 0xc000002380?, 0x1?, 0x23?, 0xc000084688?)
	/usr/local/go/src/runtime/proc.go:435 +0xce fp=0xc000084630 sp=0xc000084610 pc=0x476aae
runtime.runfinq()
	/usr/local/go/src/runtime/mfinal.go:196 +0x107 fp=0xc0000847e0 sp=0xc000084630 pc=0x41d6a7
runtime.goexit({})
	/usr/local/go/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc0000847e8 sp=0xc0000847e0 pc=0x47e601
created by runtime.createfing in goroutine 1
	/usr/local/go/src/runtime/mfinal.go:166 +0x3d

goroutine 6 gp=0xc00021c540 m=nil [chan receive]:
runtime.gopark(0xc000482820?, 0xc0006001b0?, 0x60?, 0x67?, 0x5cfc68?)
	/usr/local/go/src/runtime/proc.go:435 +0xce fp=0xc000086718 sp=0xc0000866f8 pc=0x476aae
runtime.chanrecv(0xc000366700, 0x0, 0x1)
	/usr/local/go/src/runtime/chan.go:664 +0x445 fp=0xc000086790 sp=0xc000086718 pc=0x40fc25
runtime.chanrecv1(0x0?, 0x0?)
	/usr/local/go/src/runtime/chan.go:506 +0x12 fp=0xc0000867b8 sp=0xc000086790 pc=0x40f7b2
runtime.unique_runtime_registerUniqueMapCleanup.func2(...)
	/usr/local/go/src/runtime/mgc.go:1796
runtime.unique_runtime_registerUniqueMapCleanup.gowrap1()
	/usr/local/go/src/runtime/mgc.go:1799 +0x2f fp=0xc0000867e0 sp=0xc0000867b8 pc=0x42182f
runtime.goexit({})
	/usr/local/go/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc0000867e8 sp=0xc0000867e0 pc=0x47e601
created by unique.runtime_registerUniqueMapCleanup in goroutine 1
	/usr/local/go/src/runtime/mgc.go:1794 +0x79

goroutine 7 gp=0xc00021c700 m=nil [GC worker (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
	/usr/local/go/src/runtime/proc.go:435 +0xce fp=0xc000086f38 sp=0xc000086f18 pc=0x476aae
runtime.gcBgMarkWorker(0xc0003668c0)
	/usr/local/go/src/runtime/mgc.go:1423 +0xe9 fp=0xc000086fc8 sp=0xc000086f38 pc=0x420b49
runtime.gcBgMarkStartWorkers.gowrap1()
	/usr/local/go/src/runtime/mgc.go:1339 +0x25 fp=0xc000086fe0 sp=0xc000086fc8 pc=0x420a25
runtime.goexit({})
	/usr/local/go/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc000086fe8 sp=0xc000086fe0 pc=0x47e601
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/usr/local/go/src/runtime/mgc.go:1339 +0x105

goroutine 18 gp=0xc000102700 m=nil [GC worker (idle)]:
runtime.gopark(0x11419c64da112?, 0x0?, 0x0?, 0x0?, 0x0?)
	/usr/local/go/src/runtime/proc.go:435 +0xce fp=0xc000080738 sp=0xc000080718 pc=0x476aae
runtime.gcBgMarkWorker(0xc0003668c0)
	/usr/local/go/src/runtime/mgc.go:1423 +0xe9 fp=0xc0000807c8 sp=0xc000080738 pc=0x420b49
runtime.gcBgMarkStartWorkers.gowrap1()
	/usr/local/go/src/runtime/mgc.go:1339 +0x25 fp=0xc0000807e0 sp=0xc0000807c8 pc=0x420a25
runtime.goexit({})
	/usr/local/go/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc0000807e8 sp=0xc0000807e0 pc=0x47e601
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/usr/local/go/src/runtime/mgc.go:1339 +0x105

goroutine 19 gp=0xc0001028c0 m=nil [GC worker (idle)]:
runtime.gopark(0x11419c64da155?, 0x1?, 0xb7?, 0x33?, 0x0?)
	/usr/local/go/src/runtime/proc.go:435 +0xce fp=0xc000080f38 sp=0xc000080f18 pc=0x476aae
runtime.gcBgMarkWorker(0xc0003668c0)
	/usr/local/go/src/runtime/mgc.go:1423 +0xe9 fp=0xc000080fc8 sp=0xc000080f38 pc=0x420b49
runtime.gcBgMarkStartWorkers.gowrap1()
	/usr/local/go/src/runtime/mgc.go:1339 +0x25 fp=0xc000080fe0 sp=0xc000080fc8 pc=0x420a25
runtime.goexit({})
	/usr/local/go/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc000080fe8 sp=0xc000080fe0 pc=0x47e601
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/usr/local/go/src/runtime/mgc.go:1339 +0x105

goroutine 34 gp=0xc000504000 m=nil [GC worker (idle)]:
runtime.gopark(0x151f180?, 0x1?, 0x46?, 0x8b?, 0x0?)
	/usr/local/go/src/runtime/proc.go:435 +0xce fp=0xc00050a738 sp=0xc00050a718 pc=0x476aae
runtime.gcBgMarkWorker(0xc0003668c0)
	/usr/local/go/src/runtime/mgc.go:1423 +0xe9 fp=0xc00050a7c8 sp=0xc00050a738 pc=0x420b49
runtime.gcBgMarkStartWorkers.gowrap1()
	/usr/local/go/src/runtime/mgc.go:1339 +0x25 fp=0xc00050a7e0 sp=0xc00050a7c8 pc=0x420a25
runtime.goexit({})
	/usr/local/go/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc00050a7e8 sp=0xc00050a7e0 pc=0x47e601
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/usr/local/go/src/runtime/mgc.go:1339 +0x105

goroutine 8 gp=0xc00021c8c0 m=nil [GC worker (idle)]:
runtime.gopark(0x11419c64f97f9?, 0x3?, 0x1?, 0xcf?, 0x0?)
	/usr/local/go/src/runtime/proc.go:435 +0xce fp=0xc000087738 sp=0xc000087718 pc=0x476aae
runtime.gcBgMarkWorker(0xc0003668c0)
	/usr/local/go/src/runtime/mgc.go:1423 +0xe9 fp=0xc0000877c8 sp=0xc000087738 pc=0x420b49
runtime.gcBgMarkStartWorkers.gowrap1()
	/usr/local/go/src/runtime/mgc.go:1339 +0x25 fp=0xc0000877e0 sp=0xc0000877c8 pc=0x420a25
runtime.goexit({})
	/usr/local/go/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc0000877e8 sp=0xc0000877e0 pc=0x47e601
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/usr/local/go/src/runtime/mgc.go:1339 +0x105

goroutine 20 gp=0xc000102a80 m=nil [GC worker (idle)]:
runtime.gopark(0x11419c64da0f3?, 0x3?, 0xb9?, 0x27?, 0x0?)
	/usr/local/go/src/runtime/proc.go:435 +0xce fp=0xc000081738 sp=0xc000081718 pc=0x476aae
runtime.gcBgMarkWorker(0xc0003668c0)
	/usr/local/go/src/runtime/mgc.go:1423 +0xe9 fp=0xc0000817c8 sp=0xc000081738 pc=0x420b49
runtime.gcBgMarkStartWorkers.gowrap1()
	/usr/local/go/src/runtime/mgc.go:1339 +0x25 fp=0xc0000817e0 sp=0xc0000817c8 pc=0x420a25
runtime.goexit({})
	/usr/local/go/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc0000817e8 sp=0xc0000817e0 pc=0x47e601
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/usr/local/go/src/runtime/mgc.go:1339 +0x105

goroutine 35 gp=0xc0005041c0 m=nil [GC worker (idle)]:
runtime.gopark(0x151f180?, 0x1?, 0x4?, 0x8c?, 0x0?)
	/usr/local/go/src/runtime/proc.go:435 +0xce fp=0xc00050af38 sp=0xc00050af18 pc=0x476aae
runtime.gcBgMarkWorker(0xc0003668c0)
	/usr/local/go/src/runtime/mgc.go:1423 +0xe9 fp=0xc00050afc8 sp=0xc00050af38 pc=0x420b49
runtime.gcBgMarkStartWorkers.gowrap1()
	/usr/local/go/src/runtime/mgc.go:1339 +0x25 fp=0xc00050afe0 sp=0xc00050afc8 pc=0x420a25
runtime.goexit({})
	/usr/local/go/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc00050afe8 sp=0xc00050afe0 pc=0x47e601
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/usr/local/go/src/runtime/mgc.go:1339 +0x105

goroutine 9 gp=0xc00021ca80 m=nil [GC worker (idle)]:
runtime.gopark(0x11419c64da128?, 0x3?, 0xc7?, 0xf?, 0x0?)
	/usr/local/go/src/runtime/proc.go:435 +0xce fp=0xc000087f38 sp=0xc000087f18 pc=0x476aae
runtime.gcBgMarkWorker(0xc0003668c0)
	/usr/local/go/src/runtime/mgc.go:1423 +0xe9 fp=0xc000087fc8 sp=0xc000087f38 pc=0x420b49
runtime.gcBgMarkStartWorkers.gowrap1()
	/usr/local/go/src/runtime/mgc.go:1339 +0x25 fp=0xc000087fe0 sp=0xc000087fc8 pc=0x420a25
runtime.goexit({})
	/usr/local/go/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc000087fe8 sp=0xc000087fe0 pc=0x47e601
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/usr/local/go/src/runtime/mgc.go:1339 +0x105

goroutine 21 gp=0xc000102c40 m=nil [GC worker (idle)]:
runtime.gopark(0x151f180?, 0x1?, 0x7e?, 0xfa?, 0x0?)
	/usr/local/go/src/runtime/proc.go:435 +0xce fp=0xc000081f38 sp=0xc000081f18 pc=0x476aae
runtime.gcBgMarkWorker(0xc0003668c0)
	/usr/local/go/src/runtime/mgc.go:1423 +0xe9 fp=0xc000081fc8 sp=0xc000081f38 pc=0x420b49
runtime.gcBgMarkStartWorkers.gowrap1()
	/usr/local/go/src/runtime/mgc.go:1339 +0x25 fp=0xc000081fe0 sp=0xc000081fc8 pc=0x420a25
runtime.goexit({})
	/usr/local/go/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc000081fe8 sp=0xc000081fe0 pc=0x47e601
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/usr/local/go/src/runtime/mgc.go:1339 +0x105

goroutine 36 gp=0xc000504380 m=nil [GC worker (idle)]:
runtime.gopark(0x11419c64da7aa?, 0x3?, 0x9d?, 0x68?, 0x0?)
	/usr/local/go/src/runtime/proc.go:435 +0xce fp=0xc00050b738 sp=0xc00050b718 pc=0x476aae
runtime.gcBgMarkWorker(0xc0003668c0)
	/usr/local/go/src/runtime/mgc.go:1423 +0xe9 fp=0xc00050b7c8 sp=0xc00050b738 pc=0x420b49
runtime.gcBgMarkStartWorkers.gowrap1()
	/usr/local/go/src/runtime/mgc.go:1339 +0x25 fp=0xc00050b7e0 sp=0xc00050b7c8 pc=0x420a25
runtime.goexit({})
	/usr/local/go/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc00050b7e8 sp=0xc00050b7e0 pc=0x47e601
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/usr/local/go/src/runtime/mgc.go:1339 +0x105

goroutine 10 gp=0xc00021cc40 m=nil [GC worker (idle)]:
runtime.gopark(0x11419c64da9db?, 0x1?, 0x49?, 0x2f?, 0x0?)
	/usr/local/go/src/runtime/proc.go:435 +0xce fp=0xc000506738 sp=0xc000506718 pc=0x476aae
runtime.gcBgMarkWorker(0xc0003668c0)
	/usr/local/go/src/runtime/mgc.go:1423 +0xe9 fp=0xc0005067c8 sp=0xc000506738 pc=0x420b49
runtime.gcBgMarkStartWorkers.gowrap1()
	/usr/local/go/src/runtime/mgc.go:1339 +0x25 fp=0xc0005067e0 sp=0xc0005067c8 pc=0x420a25
runtime.goexit({})
	/usr/local/go/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc0005067e8 sp=0xc0005067e0 pc=0x47e601
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/usr/local/go/src/runtime/mgc.go:1339 +0x105

goroutine 22 gp=0xc000102e00 m=nil [GC worker (idle)]:
runtime.gopark(0x151f180?, 0x1?, 0x5d?, 0x90?, 0x0?)
	/usr/local/go/src/runtime/proc.go:435 +0xce fp=0xc000082738 sp=0xc000082718 pc=0x476aae
runtime.gcBgMarkWorker(0xc0003668c0)
	/usr/local/go/src/runtime/mgc.go:1423 +0xe9 fp=0xc0000827c8 sp=0xc000082738 pc=0x420b49
runtime.gcBgMarkStartWorkers.gowrap1()
	/usr/local/go/src/runtime/mgc.go:1339 +0x25 fp=0xc0000827e0 sp=0xc0000827c8 pc=0x420a25
runtime.goexit({})
	/usr/local/go/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc0000827e8 sp=0xc0000827e0 pc=0x47e601
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/usr/local/go/src/runtime/mgc.go:1339 +0x105

goroutine 23 gp=0xc000102fc0 m=nil [GC worker (idle)]:
runtime.gopark(0x11419c64da146?, 0x3?, 0x6f?, 0xa5?, 0x0?)
	/usr/local/go/src/runtime/proc.go:435 +0xce fp=0xc000082f38 sp=0xc000082f18 pc=0x476aae
runtime.gcBgMarkWorker(0xc0003668c0)
	/usr/local/go/src/runtime/mgc.go:1423 +0xe9 fp=0xc000082fc8 sp=0xc000082f38 pc=0x420b49
runtime.gcBgMarkStartWorkers.gowrap1()
	/usr/local/go/src/runtime/mgc.go:1339 +0x25 fp=0xc000082fe0 sp=0xc000082fc8 pc=0x420a25
runtime.goexit({})
	/usr/local/go/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc000082fe8 sp=0xc000082fe0 pc=0x47e601
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/usr/local/go/src/runtime/mgc.go:1339 +0x105

goroutine 24 gp=0xc000103180 m=nil [GC worker (idle)]:
runtime.gopark(0x11419c64da448?, 0x3?, 0xa4?, 0xa6?, 0x0?)
	/usr/local/go/src/runtime/proc.go:435 +0xce fp=0xc000083738 sp=0xc000083718 pc=0x476aae
runtime.gcBgMarkWorker(0xc0003668c0)
	/usr/local/go/src/runtime/mgc.go:1423 +0xe9 fp=0xc0000837c8 sp=0xc000083738 pc=0x420b49
runtime.gcBgMarkStartWorkers.gowrap1()
	/usr/local/go/src/runtime/mgc.go:1339 +0x25 fp=0xc0000837e0 sp=0xc0000837c8 pc=0x420a25
runtime.goexit({})
	/usr/local/go/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc0000837e8 sp=0xc0000837e0 pc=0x47e601
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/usr/local/go/src/runtime/mgc.go:1339 +0x105

goroutine 25 gp=0xc000103340 m=nil [GC worker (idle)]:
runtime.gopark(0x11419c65063f9?, 0x3?, 0x14?, 0x6?, 0x0?)
	/usr/local/go/src/runtime/proc.go:435 +0xce fp=0xc000083f38 sp=0xc000083f18 pc=0x476aae
runtime.gcBgMarkWorker(0xc0003668c0)
	/usr/local/go/src/runtime/mgc.go:1423 +0xe9 fp=0xc000083fc8 sp=0xc000083f38 pc=0x420b49
runtime.gcBgMarkStartWorkers.gowrap1()
	/usr/local/go/src/runtime/mgc.go:1339 +0x25 fp=0xc000083fe0 sp=0xc000083fc8 pc=0x420a25
runtime.goexit({})
	/usr/local/go/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc000083fe8 sp=0xc000083fe0 pc=0x47e601
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/usr/local/go/src/runtime/mgc.go:1339 +0x105

goroutine 26 gp=0xc000103500 m=nil [GC worker (idle)]:
runtime.gopark(0x11419c64da625?, 0x1?, 0x49?, 0x9d?, 0x0?)
	/usr/local/go/src/runtime/proc.go:435 +0xce fp=0xc000124738 sp=0xc000124718 pc=0x476aae
runtime.gcBgMarkWorker(0xc0003668c0)
	/usr/local/go/src/runtime/mgc.go:1423 +0xe9 fp=0xc0001247c8 sp=0xc000124738 pc=0x420b49
runtime.gcBgMarkStartWorkers.gowrap1()
	/usr/local/go/src/runtime/mgc.go:1339 +0x25 fp=0xc0001247e0 sp=0xc0001247c8 pc=0x420a25
runtime.goexit({})
	/usr/local/go/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc0001247e8 sp=0xc0001247e0 pc=0x47e601
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/usr/local/go/src/runtime/mgc.go:1339 +0x105

goroutine 11 gp=0xc00021d500 m=nil [chan receive]:
runtime.gopark(0x300000000f2b7c0?, 0x3000000d2740848?, 0x48?, 0x8?, 0x706928661108?)
	/usr/local/go/src/runtime/proc.go:435 +0xce fp=0xc000095dc8 sp=0xc000095da8 pc=0x476aae
runtime.chanrecv(0xc0003668c0, 0xc000095eaf, 0x1)
	/usr/local/go/src/runtime/chan.go:664 +0x445 fp=0xc000095e40 sp=0xc000095dc8 pc=0x40fc25
runtime.chanrecv1(0x14f8440?, 0xf4b6e0?)
	/usr/local/go/src/runtime/chan.go:506 +0x12 fp=0xc000095e68 sp=0xc000095e40 pc=0x40f7b2
testing.(*T).Run(0xc00021d340, {0xd3aa74?, 0x51ae53?}, 0xe4c190)
	/usr/local/go/src/testing/testing.go:1859 +0x431 fp=0xc000095f40 sp=0xc000095e68 pc=0x51c171
github.com/projectdiscovery/nuclei/v3/pkg/authprovider/authx.TestDynamicUnmarshalJSON(0xc00021d340)
	/home/dw1/Development/PD/nuclei/pkg/authprovider/authx/dynamic_test.go:10 +0x2f fp=0xc000095f70 sp=0xc000095f40 pc=0xb1674f
testing.tRunner(0xc00021d340, 0xe4c088)
	/usr/local/go/src/testing/testing.go:1792 +0xf4 fp=0xc000095fc0 sp=0xc000095f70 pc=0x51b254
testing.(*T).Run.gowrap1()
	/usr/local/go/src/testing/testing.go:1851 +0x25 fp=0xc000095fe0 sp=0xc000095fc0 pc=0x51c2e5
runtime.goexit({})
	/usr/local/go/src/runtime/asm_amd64.s:1700 +0x1 fp=0xc000095fe8 sp=0xc000095fe0 pc=0x47e601
created by testing.(*T).Run in goroutine 1
	/usr/local/go/src/testing/testing.go:1851 +0x413
FAIL	github.com/projectdiscovery/nuclei/v3/pkg/authprovider/authx	4.823s
FAIL
```

Solution patch:
diff --git a/pkg/authprovider/authx/dynamic.go b/pkg/authprovider/authx/dynamic.go
index 0efee1ea..f3e361e4 100644
--- a/pkg/authprovider/authx/dynamic.go
+++ b/pkg/authprovider/authx/dynamic.go
@@ -52,14 +52,19 @@ func (d *Dynamic) GetDomainAndDomainRegex() ([]string, []string) {
 }
 
 func (d *Dynamic) UnmarshalJSON(data []byte) error {
-	if err := json.Unmarshal(data, &d); err != nil {
-		return err
+	if d == nil {
+		return errorutil.New("cannot unmarshal into nil Dynamic struct")
 	}
-	var s Secret
-	if err := json.Unmarshal(data, &s); err != nil {
+
+	// Use an alias type (auxiliary) to avoid a recursive call in this method.
+	type Alias Dynamic
+
+	// If d.Secret was nil, json.Unmarshal will allocate a new Secret object
+	// and populate it from the top level JSON fields.
+	if err := json.Unmarshal(data, (*Alias)(d)); err != nil {
 		return err
 	}
-	d.Secret = &s
+
 	return nil
 }
 
diff --git a/pkg/core/executors.go b/pkg/core/executors.go
index 2e8c4d18..05430233 100644
--- a/pkg/core/executors.go
+++ b/pkg/core/executors.go
@@ -38,7 +38,7 @@ func (e *Engine) executeAllSelfContained(ctx context.Context, alltemplates []*te
 				match, err = template.Executer.Execute(ctx)
 			}
 			if err != nil {
-				gologger.Warning().Msgf("[%s] Could not execute step: %s\n", e.executerOpts.Colorizer.BrightBlue(template.ID), err)
+				gologger.Warning().Msgf("[%s] Could not execute step (self-contained): %s\n", e.executerOpts.Colorizer.BrightBlue(template.ID), err)
 			}
 			results.CompareAndSwap(false, match)
 		}(v)
@@ -140,7 +140,7 @@ func (e *Engine) executeTemplateWithTargets(ctx context.Context, template *templ
 				}
 			}
 			if err != nil {
-				gologger.Warning().Msgf("[%s] Could not execute step: %s\n", e.executerOpts.Colorizer.BrightBlue(template.ID), err)
+				gologger.Warning().Msgf("[%s] Could not execute step on %s: %s\n", e.executerOpts.Colorizer.BrightBlue(template.ID), value.Input, err)
 			}
 			results.CompareAndSwap(false, match)
 		}(index, skip, scannedValue)
@@ -206,7 +206,7 @@ func (e *Engine) executeTemplatesOnTarget(ctx context.Context, alltemplates []*t
 				}
 			}
 			if err != nil {
-				gologger.Warning().Msgf("[%s] Could not execute step: %s\n", e.executerOpts.Colorizer.BrightBlue(template.ID), err)
+				gologger.Warning().Msgf("[%s] Could not execute step on %s: %s\n", e.executerOpts.Colorizer.BrightBlue(template.ID), value.Input, err)
 			}
 			results.CompareAndSwap(false, match)
 		}(tpl, target, sg)
diff --git a/pkg/protocols/dns/dns.go b/pkg/protocols/dns/dns.go
index d6f462c4..198bb87b 100644
--- a/pkg/protocols/dns/dns.go
+++ b/pkg/protocols/dns/dns.go
@@ -185,6 +185,7 @@ func (request *Request) Compile(options *protocols.ExecutorOptions) error {
 func (request *Request) getDnsClient(options *protocols.ExecutorOptions, metadata map[string]interface{}) (*retryabledns.Client, error) {
 	dnsClientOptions := &dnsclientpool.Configuration{
 		Retries: request.Retries,
+		Proxy:   options.Options.AliveSocksProxy,
 	}
 	if len(request.Resolvers) > 0 {
 		if len(request.Resolvers) > 0 {
diff --git a/pkg/protocols/dns/dnsclientpool/clientpool.go b/pkg/protocols/dns/dnsclientpool/clientpool.go
index 4f019808..8eb19b8b 100644
--- a/pkg/protocols/dns/dnsclientpool/clientpool.go
+++ b/pkg/protocols/dns/dnsclientpool/clientpool.go
@@ -51,6 +51,8 @@ type Configuration struct {
 	Retries int
 	// Resolvers contains the specific per request resolvers
 	Resolvers []string
+	// Proxy contains the proxy to use for the dns client
+	Proxy string
 }
 
 // Hash returns the hash of the configuration to allow client pooling
@@ -60,6 +62,8 @@ func (c *Configuration) Hash() string {
 	builder.WriteString(strconv.Itoa(c.Retries))
 	builder.WriteString("l")
 	builder.WriteString(strings.Join(c.Resolvers, ""))
+	builder.WriteString("p")
+	builder.WriteString(c.Proxy)
 	hash := builder.String()
 	return hash
 }
@@ -83,7 +87,11 @@ func Get(options *types.Options, configuration *Configuration) (*retryabledns.Cl
 	} else if len(configuration.Resolvers) > 0 {
 		resolvers = configuration.Resolvers
 	}
-	client, err := retryabledns.New(resolvers, configuration.Retries)
+	client, err := retryabledns.NewWithOptions(retryabledns.Options{
+		BaseResolvers: resolvers,
+		MaxRetries:    configuration.Retries,
+		Proxy:         options.AliveSocksProxy,
+	})
 	if err != nil {
 		return nil, errors.Wrap(err, "could not create dns client")
 	}
diff --git a/pkg/protocols/http/http.go b/pkg/protocols/http/http.go
index 0b30a740..7a45fcd0 100644
--- a/pkg/protocols/http/http.go
+++ b/pkg/protocols/http/http.go
@@ -11,6 +11,7 @@ import (
 	json "github.com/json-iterator/go"
 	"github.com/pkg/errors"
 
+	"github.com/projectdiscovery/fastdialer/fastdialer"
 	_ "github.com/projectdiscovery/nuclei/v3/pkg/fuzz/analyzers/time"
 
 	"github.com/projectdiscovery/nuclei/v3/pkg/fuzz"
@@ -22,6 +23,7 @@ import (
 	"github.com/projectdiscovery/nuclei/v3/pkg/protocols/common/generators"
 	"github.com/projectdiscovery/nuclei/v3/pkg/protocols/common/protocolstate"
 	"github.com/projectdiscovery/nuclei/v3/pkg/protocols/http/httpclientpool"
+	"github.com/projectdiscovery/nuclei/v3/pkg/protocols/network/networkclientpool"
 	httputil "github.com/projectdiscovery/nuclei/v3/pkg/protocols/utils/http"
 	"github.com/projectdiscovery/nuclei/v3/pkg/utils/stats"
 	"github.com/projectdiscovery/rawhttp"
@@ -144,6 +146,7 @@ type Request struct {
 	generator         *generators.PayloadGenerator // optional, only enabled when using payloads
 	httpClient        *retryablehttp.Client
 	rawhttpClient     *rawhttp.Client
+	dialer            *fastdialer.Dialer
 
 	// description: |
 	//   SelfContained specifies if the request is self-contained.
@@ -348,6 +351,15 @@ func (request *Request) Compile(options *protocols.ExecutorOptions) error {
 	}
 	request.customHeaders = make(map[string]string)
 	request.httpClient = client
+
+	dialer, err := networkclientpool.Get(options.Options, &networkclientpool.Configuration{
+		CustomDialer: options.CustomFastdialer,
+	})
+	if err != nil {
+		return errors.Wrap(err, "could not get dialer")
+	}
+	request.dialer = dialer
+
 	request.options = options
 	for _, option := range request.options.Options.CustomHeaders {
 		parts := strings.SplitN(option, ":", 2)
diff --git a/pkg/protocols/http/request.go b/pkg/protocols/http/request.go
index 6d8ad3e1..090de2ed 100644
--- a/pkg/protocols/http/request.go
+++ b/pkg/protocols/http/request.go
@@ -841,7 +841,7 @@ func (request *Request) executeRequest(input *contextargs.Context, generatedRequ
 		if input.MetaInput.CustomIP != "" {
 			outputEvent["ip"] = input.MetaInput.CustomIP
 		} else {
-			outputEvent["ip"] = protocolstate.Dialer.GetDialedIP(hostname)
+			outputEvent["ip"] = request.dialer.GetDialedIP(hostname)
 			// try getting cname
 			request.addCNameIfAvailable(hostname, outputEvent)
 		}
@@ -1085,11 +1085,11 @@ func (request *Request) validateNFixEvent(input *contextargs.Context, gr *genera
 
 // addCNameIfAvailable adds the cname to the event if available
 func (request *Request) addCNameIfAvailable(hostname string, outputEvent map[string]interface{}) {
-	if protocolstate.Dialer == nil {
+	if request.dialer == nil {
 		return
 	}
 
-	data, err := protocolstate.Dialer.GetDNSData(hostname)
+	data, err := request.dialer.GetDNSData(hostname)
 	if err == nil {
 		switch len(data.CNAME) {
 		case 0:
diff --git a/pkg/protocols/network/network.go b/pkg/protocols/network/network.go
index 5c072aff..7aba6244 100644
--- a/pkg/protocols/network/network.go
+++ b/pkg/protocols/network/network.go
@@ -237,7 +237,9 @@ func (request *Request) Compile(options *protocols.ExecutorOptions) error {
 	}
 
 	// Create a client for the class
-	client, err := networkclientpool.Get(options.Options, &networkclientpool.Configuration{})
+	client, err := networkclientpool.Get(options.Options, &networkclientpool.Configuration{
+		CustomDialer: options.CustomFastdialer,
+	})
 	if err != nil {
 		return errors.Wrap(err, "could not get network client")
 	}
@@ -259,7 +261,3 @@ func (request *Request) Compile(options *protocols.ExecutorOptions) error {
 func (request *Request) Requests() int {
 	return len(request.Address)
 }
-
-func (request *Request) SetDialer(dialer *fastdialer.Dialer) {
-	request.dialer = dialer
-}
diff --git a/pkg/protocols/network/networkclientpool/clientpool.go b/pkg/protocols/network/networkclientpool/clientpool.go
index a67cee29..6293a931 100644
--- a/pkg/protocols/network/networkclientpool/clientpool.go
+++ b/pkg/protocols/network/networkclientpool/clientpool.go
@@ -21,7 +21,9 @@ func Init(options *types.Options) error {
 }
 
 // Configuration contains the custom configuration options for a client
-type Configuration struct{}
+type Configuration struct {
+	CustomDialer *fastdialer.Dialer
+}
 
 // Hash returns the hash of the configuration to allow client pooling
 func (c *Configuration) Hash() string {
@@ -30,5 +32,10 @@ func (c *Configuration) Hash() string {
 
 // Get creates or gets a client for the protocol based on custom configuration
 func Get(options *types.Options, configuration *Configuration /*TODO review unused parameters*/) (*fastdialer.Dialer, error) {
+
+	if configuration != nil && configuration.CustomDialer != nil {
+		return configuration.CustomDialer, nil
+	}
+
 	return normalClient, nil
 }
diff --git a/pkg/protocols/network/request.go b/pkg/protocols/network/request.go
index f7b11fbb..197ef533 100644
--- a/pkg/protocols/network/request.go
+++ b/pkg/protocols/network/request.go
@@ -25,9 +25,9 @@ import (
 	"github.com/projectdiscovery/nuclei/v3/pkg/protocols/common/helpers/eventcreator"
 	"github.com/projectdiscovery/nuclei/v3/pkg/protocols/common/helpers/responsehighlighter"
 	"github.com/projectdiscovery/nuclei/v3/pkg/protocols/common/interactsh"
-	"github.com/projectdiscovery/nuclei/v3/pkg/protocols/common/protocolstate"
 	"github.com/projectdiscovery/nuclei/v3/pkg/protocols/common/replacer"
 	"github.com/projectdiscovery/nuclei/v3/pkg/protocols/common/utils/vardump"
+	"github.com/projectdiscovery/nuclei/v3/pkg/protocols/network/networkclientpool"
 	protocolutils "github.com/projectdiscovery/nuclei/v3/pkg/protocols/utils"
 	templateTypes "github.com/projectdiscovery/nuclei/v3/pkg/templates/types"
 	errorutil "github.com/projectdiscovery/utils/errors"
@@ -64,7 +64,11 @@ func (request *Request) getOpenPorts(target *contextargs.Context) ([]string, err
 			errs = append(errs, err)
 			continue
 		}
-		conn, err := protocolstate.Dialer.Dial(target.Context(), "tcp", addr)
+		if request.dialer == nil {
+			request.dialer, _ = networkclientpool.Get(request.options.Options, &networkclientpool.Configuration{})
+		}
+
+		conn, err := request.dialer.Dial(target.Context(), "tcp", addr)
 		if err != nil {
 			errs = append(errs, err)
 			continue
diff --git a/pkg/protocols/protocols.go b/pkg/protocols/protocols.go
index 7b7f71d4..6b5c089b 100644
--- a/pkg/protocols/protocols.go
+++ b/pkg/protocols/protocols.go
@@ -5,6 +5,7 @@ import (
 	"encoding/base64"
 	"sync/atomic"
 
+	"github.com/projectdiscovery/fastdialer/fastdialer"
 	"github.com/projectdiscovery/ratelimit"
 	mapsutil "github.com/projectdiscovery/utils/maps"
 	stringsutil "github.com/projectdiscovery/utils/strings"
@@ -132,6 +133,8 @@ type ExecutorOptions struct {
 	ExportReqURLPattern bool
 	// GlobalMatchers is the storage for global matchers with http passive templates
 	GlobalMatchers *globalmatchers.Storage
+	// CustomFastdialer is a fastdialer dialer instance
+	CustomFastdialer *fastdialer.Dialer
 }
 
 // todo: centralizing components is not feasible with current clogged architecture
diff --git a/pkg/protocols/ssl/ssl.go b/pkg/protocols/ssl/ssl.go
index fd0dae83..8943d597 100644
--- a/pkg/protocols/ssl/ssl.go
+++ b/pkg/protocols/ssl/ssl.go
@@ -115,7 +115,9 @@ func (request *Request) IsClusterable() bool {
 func (request *Request) Compile(options *protocols.ExecutorOptions) error {
 	request.options = options
 
-	client, err := networkclientpool.Get(options.Options, &networkclientpool.Configuration{})
+	client, err := networkclientpool.Get(options.Options, &networkclientpool.Configuration{
+		CustomDialer: options.CustomFastdialer,
+	})
 	if err != nil {
 		return errorutil.NewWithTag("ssl", "could not get network client").Wrap(err)
 	}
diff --git a/pkg/protocols/websocket/websocket.go b/pkg/protocols/websocket/websocket.go
index 8eeeedf2..02cf7519 100644
--- a/pkg/protocols/websocket/websocket.go
+++ b/pkg/protocols/websocket/websocket.go
@@ -100,7 +100,9 @@ const (
 func (request *Request) Compile(options *protocols.ExecutorOptions) error {
 	request.options = options
 
-	client, err := networkclientpool.Get(options.Options, &networkclientpool.Configuration{})
+	client, err := networkclientpool.Get(options.Options, &networkclientpool.Configuration{
+		CustomDialer: options.CustomFastdialer,
+	})
 	if err != nil {
 		return errors.Wrap(err, "could not get network client")
 	}



Test patch:
diff --git a/pkg/authprovider/authx/dynamic_test.go b/pkg/authprovider/authx/dynamic_test.go
new file mode 100644
index 00000000..05bf9c13
--- /dev/null
+++ b/pkg/authprovider/authx/dynamic_test.go
@@ -0,0 +1,125 @@
+package authx
+
+import (
+	"testing"
+
+	"github.com/stretchr/testify/require"
+)
+
+func TestDynamicUnmarshalJSON(t *testing.T) {
+	t.Run("basic-unmarshal", func(t *testing.T) {
+		data := []byte(`{
+			"template": "test-template.yaml",
+			"variables": [
+				{
+					"key": "username",
+					"value": "testuser"
+				}
+			],
+			"secrets": [
+				{
+					"type": "BasicAuth",
+					"domains": ["example.com"],
+					"username": "user1",
+					"password": "pass1"
+				}
+			],
+			"type": "BasicAuth",
+			"domains": ["test.com"],
+			"username": "testuser",
+			"password": "testpass"
+		}`)
+
+		var d Dynamic
+		err := d.UnmarshalJSON(data)
+		require.NoError(t, err)
+
+		// Secret
+		require.NotNil(t, d.Secret)
+		require.Equal(t, "BasicAuth", d.Secret.Type)
+		require.Equal(t, []string{"test.com"}, d.Secret.Domains)
+		require.Equal(t, "testuser", d.Secret.Username)
+		require.Equal(t, "testpass", d.Secret.Password)
+
+		// Dynamic fields
+		require.Equal(t, "test-template.yaml", d.TemplatePath)
+		require.Len(t, d.Variables, 1)
+		require.Equal(t, "username", d.Variables[0].Key)
+		require.Equal(t, "testuser", d.Variables[0].Value)
+		require.Len(t, d.Secrets, 1)
+		require.Equal(t, "BasicAuth", d.Secrets[0].Type)
+		require.Equal(t, []string{"example.com"}, d.Secrets[0].Domains)
+		require.Equal(t, "user1", d.Secrets[0].Username)
+		require.Equal(t, "pass1", d.Secrets[0].Password)
+	})
+
+	t.Run("complex-unmarshal", func(t *testing.T) {
+		data := []byte(`{
+			"template": "test-template.yaml",
+			"variables": [
+				{
+					"key": "token",
+					"value": "Bearer xyz"
+				}
+			],
+			"secrets": [
+				{
+					"type": "CookiesAuth",
+					"domains": ["example.com"],
+					"cookies": [
+						{
+							"key": "session",
+							"value": "abc123"
+						}
+					]
+				}
+			],
+			"type": "HeadersAuth",
+			"domains": ["api.test.com"],
+			"headers": [
+				{
+					"key": "X-API-Key",
+					"value": "secret-key"
+				}
+			]
+		}`)
+
+		var d Dynamic
+		err := d.UnmarshalJSON(data)
+		require.NoError(t, err)
+
+		// Secret
+		require.NotNil(t, d.Secret)
+		require.Equal(t, "HeadersAuth", d.Secret.Type)
+		require.Equal(t, []string{"api.test.com"}, d.Secret.Domains)
+		require.Len(t, d.Secret.Headers, 1)
+		require.Equal(t, "X-API-Key", d.Secret.Headers[0].Key)
+		require.Equal(t, "secret-key", d.Secret.Headers[0].Value)
+
+		// Dynamic fields
+		require.Equal(t, "test-template.yaml", d.TemplatePath)
+		require.Len(t, d.Variables, 1)
+		require.Equal(t, "token", d.Variables[0].Key)
+		require.Equal(t, "Bearer xyz", d.Variables[0].Value)
+		require.Len(t, d.Secrets, 1)
+		require.Equal(t, "CookiesAuth", d.Secrets[0].Type)
+		require.Equal(t, []string{"example.com"}, d.Secrets[0].Domains)
+		require.Len(t, d.Secrets[0].Cookies, 1)
+		require.Equal(t, "session", d.Secrets[0].Cookies[0].Key)
+		require.Equal(t, "abc123", d.Secrets[0].Cookies[0].Value)
+	})
+
+	t.Run("invalid-json", func(t *testing.T) {
+		data := []byte(`{invalid json}`)
+		var d Dynamic
+		err := d.UnmarshalJSON(data)
+		require.Error(t, err)
+	})
+
+	t.Run("empty-json", func(t *testing.T) {
+		data := []byte(`{}`)
+		var d Dynamic
+		err := d.UnmarshalJSON(data)
+		require.NoError(t, err)
+	})
+}