fix jsonsub required rules #451
This commit is contained in:
@@ -67,7 +67,6 @@ func InitDB(dbPath string) error {
|
||||
db.Migrator().CreateTable(&model.Outbound{})
|
||||
defaultOutbound := []model.Outbound{
|
||||
{Type: "direct", Tag: "direct", Options: json.RawMessage(`{}`)},
|
||||
{Type: "dns", Tag: "dns-out", Options: json.RawMessage(`{}`)},
|
||||
}
|
||||
db.Create(&defaultOutbound)
|
||||
}
|
||||
|
||||
@@ -211,12 +211,17 @@ func (j *JsonService) addDefaultOutbounds(outbounds *[]map[string]interface{}, o
|
||||
|
||||
func (j *JsonService) addOthers(jsonConfig *map[string]interface{}) error {
|
||||
rules := []interface{}{
|
||||
map[string]interface{}{
|
||||
"action": "sniff",
|
||||
},
|
||||
map[string]interface{}{
|
||||
"clash_mode": "Direct",
|
||||
"action": "route",
|
||||
"outbound": "direct",
|
||||
},
|
||||
map[string]interface{}{
|
||||
"clash_mode": "Global",
|
||||
"action": "route",
|
||||
"outbound": "proxy",
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user