Skip to content

Commit

Permalink
bind: add read and write limit
Browse files Browse the repository at this point in the history
  • Loading branch information
Choraden authored and mmatczuk committed Sep 15, 2023
1 parent fa5ecce commit 8297fe9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions bind/flag.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,14 @@ func HTTPProxyConfig(fs *pflag.FlagSet, cfg *forwarder.HTTPProxyConfig, lcfg *lo
"<name>"+
"If the header is present in the request, "+
"the proxy will associate the value with the request in the logs. ")

fs.Var(&cfg.ReadLimit, "read-limit", "<bandwidth>"+
"Global read rate limit in bytes per second i.e. how many bytes per second you can receive from a proxy. "+
"Accepts binary format (e.g. 1.5Ki, 1Mi, 3.6Gi). ")

fs.Var(&cfg.WriteLimit, "write-limit", "<bandwidth>"+
"Global write rate limit in bytes per second i.e. how many bytes per second you can send to proxy. "+
"Accepts binary format (e.g. 1.5Ki, 1Mi, 3.6Gi). ")
}

func DenyDomains(fs *pflag.FlagSet, cfg *[]ruleset.RegexpListItem) {
Expand Down

0 comments on commit 8297fe9

Please sign in to comment.