fix exceptions for outjson #459
This commit is contained in:
@@ -8,6 +8,10 @@ import (
|
|||||||
|
|
||||||
// Fill Inbound's out_json
|
// Fill Inbound's out_json
|
||||||
func FillOutJson(i *model.Inbound, hostname string) error {
|
func FillOutJson(i *model.Inbound, hostname string) error {
|
||||||
|
switch i.Type {
|
||||||
|
case "direct", "tun", "redirect", "tproxy":
|
||||||
|
return nil
|
||||||
|
}
|
||||||
var outJson map[string]interface{}
|
var outJson map[string]interface{}
|
||||||
err := json.Unmarshal(i.OutJson, &outJson)
|
err := json.Unmarshal(i.OutJson, &outJson)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user