From 77c33ff35229795812a55ad4dfe58f154504d3a6 Mon Sep 17 00:00:00 2001 From: Andy Wang Date: Thu, 9 Apr 2020 13:37:33 +0100 Subject: [PATCH] Fix redir null pointer --- internal/server/state.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/internal/server/state.go b/internal/server/state.go index facab60..7327cda 100644 --- a/internal/server/state.go +++ b/internal/server/state.go @@ -146,10 +146,11 @@ func ParseConfig(conf string) (raw RawConfig, err error) { // ParseConfig parses the config (either a path to json or the json itself as argument) into a State variable func InitState(preParse RawConfig, nowFunc func() time.Time) (sta *State, err error) { sta = &State{ - Now: nowFunc, - BypassUID: make(map[[16]byte]struct{}), - ProxyBook: map[string]net.Addr{}, - usedRandom: map[[32]byte]int64{}, + Now: nowFunc, + BypassUID: make(map[[16]byte]struct{}), + ProxyBook: map[string]net.Addr{}, + usedRandom: map[[32]byte]int64{}, + RedirDialer: &net.Dialer{}, } if preParse.CncMode { err = errors.New("command & control mode not implemented")