(conn bareneter.Conn)
| 28 | ) |
| 29 | |
| 30 | func (p *Proxy) accept(conn bareneter.Conn) bool { |
| 31 | if config.Get().IPWhiteList.Enable { |
| 32 | host, _, _ := net.SplitHostPort(conn.RemoteAddr()) |
| 33 | if !utils.InArray(host, config.Get().IPWhiteList.List) { |
| 34 | return false |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | return true |
| 39 | } |
| 40 | |
| 41 | func (p *Proxy) closed(conn bareneter.Conn, err error) { |
| 42 | return |