mirror of https://github.com/cbeuw/Cloak
Fix redir null pointer
This commit is contained in:
parent
15f343db31
commit
77c33ff352
|
|
@ -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
|
// 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) {
|
func InitState(preParse RawConfig, nowFunc func() time.Time) (sta *State, err error) {
|
||||||
sta = &State{
|
sta = &State{
|
||||||
Now: nowFunc,
|
Now: nowFunc,
|
||||||
BypassUID: make(map[[16]byte]struct{}),
|
BypassUID: make(map[[16]byte]struct{}),
|
||||||
ProxyBook: map[string]net.Addr{},
|
ProxyBook: map[string]net.Addr{},
|
||||||
usedRandom: map[[32]byte]int64{},
|
usedRandom: map[[32]byte]int64{},
|
||||||
|
RedirDialer: &net.Dialer{},
|
||||||
}
|
}
|
||||||
if preParse.CncMode {
|
if preParse.CncMode {
|
||||||
err = errors.New("command & control mode not implemented")
|
err = errors.New("command & control mode not implemented")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue