use of com.github.jh3nd3rs0n.jargyle.server.rules.impl.Socks5RequestFirewallRules in project jargyle by jh3nd3rs0n.
the class Socks5Worker method canAllowSocks5Request.
private boolean canAllowSocks5Request(final FirewallRule.Context context) {
Socks5RequestFirewallRules socks5RequestFirewallRules = this.settings.getLastValue(Socks5SettingSpecConstants.SOCKS5_SOCKS5_REQUEST_FIREWALL_RULES);
socks5RequestFirewallRules.applyTo(context);
if (FirewallRuleAction.ALLOW.equals(context.getFirewallRuleAction())) {
return true;
}
Socks5Reply socks5Rep = Socks5Reply.newFailureInstance(Reply.CONNECTION_NOT_ALLOWED_BY_RULESET);
this.socks5WorkerContext.sendSocks5Reply(this, socks5Rep, LOGGER);
return false;
}
Aggregations