Feature: add custom request header to proxy provider

`header` value is type of string array
header:
  Accept:
    - 'application/vnd.github.v3.raw'
  Authorization:
    - ' token xxxxxxxxxxx'
  User-Agent:
    - 'Clash/v1.10.6'

`prefix-name` add a prefix to proxy name
prefix-name: 'XXX-'
This commit is contained in:
yaling888
2022-06-03 05:00:13 +08:00
parent 8ed868b0f5
commit af5bd0f65e
5 changed files with 62 additions and 23 deletions

View File

@ -49,14 +49,14 @@ func updateGeoDatabases(w http.ResponseWriter, r *http.Request) {
return
}
log.Warnln("[REST-API] update GEO databases successful, apply config...")
cfg, err := executor.ParseWithPath(constant.Path.Config())
if err != nil {
log.Errorln("[REST-API] update GEO databases failed: %v", err)
return
}
log.Warnln("[REST-API] update GEO databases successful, apply config...")
executor.ApplyConfig(cfg, false)
}()