v2ray пре 9 година
родитељ
комит
9c3f2ada47
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      proxy/blackhole/config_json.go

+ 2 - 2
proxy/blackhole/config_json.go

@@ -17,9 +17,9 @@ func (this *Config) UnmarshalJSON(data []byte) error {
 	if err := json.Unmarshal(data, jsonConfig); err != nil {
 		return err
 	}
+
+	this.Response = new(NoneResponse)
 	if jsonConfig.Response == nil {
-		this.Response = new(NoneResponse)
-	} else {
 		loader := loader.NewJSONConfigLoader("type", "")
 		loader.RegisterCreator("none", func() interface{} { return new(NoneResponse) })
 		loader.RegisterCreator("http", func() interface{} { return new(HTTPResponse) })