Skip to content

Commit

Permalink
feat: add support for MaxConnsPerHost
Browse files Browse the repository at this point in the history
  • Loading branch information
mrhaoxx committed May 29, 2024
1 parent db050c9 commit a15c755
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions ui/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,11 @@ type ProxierConfig struct {
Hosts []ProxyHost `yaml:"Hosts,flow"`
}
type ProxyHost struct {
Name string `yaml:"Name"`
Hosts []string `yaml:"Hosts"`
Backend string `yaml:"Backend"`
TlsSkipVerify bool `yaml:"TlsSkipVerify"`
Name string `yaml:"Name"`
Hosts []string `yaml:"Hosts"`
Backend string `yaml:"Backend"`
TlsSkipVerify bool `yaml:"TlsSkipVerify"`
MaxConnsPerHost int `yaml:"MaxConnsPerHost"`
}

type logConfig struct {
Expand Down
2 changes: 1 addition & 1 deletion ui/myservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ func LoadCfg(cfgs []byte) error {

for _, host := range cfg.HTTP.Proxier.Hosts {
log.Println("sys", "httpproxy", host.Name, host.Hosts)
if err := HttpProxier.Add(host.Name, host.Hosts, host.Backend, 0, host.TlsSkipVerify); err != nil {
if err := HttpProxier.Add(host.Name, host.Hosts, host.Backend, host.MaxConnsPerHost, host.TlsSkipVerify); err != nil {
break
}
}
Expand Down

0 comments on commit a15c755

Please sign in to comment.