Update sniff parser to fix index out of bound error
This commit is contained in:
parent
e4c4b22c73
commit
20e99fa409
4 changed files with 41 additions and 37 deletions
|
|
@ -22,6 +22,10 @@ type proxy struct {
|
|||
}
|
||||
|
||||
func (p *proxy) Get(host string) *server {
|
||||
if p.ServerList == nil {
|
||||
return p.Default
|
||||
}
|
||||
|
||||
for _, s := range p.ServerList {
|
||||
if s.Hostname == host {
|
||||
return s
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue