Exemplo n.º 1
0
func (p *PermitCommand) Allow(ctx context.Context, req *socks5.Request) (context.Context, bool) {
	r := shared.AcceptedIP(req.DestAddr.IP) && shared.AcceptedPort(req.DestAddr.Port)
	if r {
		allowedConnects.Inc()
	} else {
		deniedConnects.Inc()
	}
	return ctx, r
}
Exemplo n.º 2
0
func (p PermitCommand) Allow(req *socks5.Request) bool {
	return shared.AcceptedIP(req.DestAddr.IP) && shared.AcceptedPort(req.DestAddr.Port)
}