use of com.github.jh3nd3rs0n.jargyle.transport.socks5.AddressTypeNotSupportedException in project jargyle by jh3nd3rs0n.
the class Socks5Worker method newSocks5Request.
private Socks5Request newSocks5Request() {
Socks5Request socks5Request = null;
try {
socks5Request = Socks5Request.newInstanceFrom(this.clientFacingInputStream);
} catch (AddressTypeNotSupportedException e) {
LOGGER.debug(ObjectLogMessageHelper.objectLogMessage(this, "Unable to parse the SOCKS5 request"), e);
Socks5Reply socks5Rep = Socks5Reply.newFailureInstance(Reply.ADDRESS_TYPE_NOT_SUPPORTED);
this.socks5WorkerContext.sendSocks5Reply(this, socks5Rep, LOGGER);
return null;
} catch (CommandNotSupportedException e) {
LOGGER.debug(ObjectLogMessageHelper.objectLogMessage(this, "Unable to parse the SOCKS5 request"), e);
Socks5Reply socks5Rep = Socks5Reply.newFailureInstance(Reply.COMMAND_NOT_SUPPORTED);
this.socks5WorkerContext.sendSocks5Reply(this, socks5Rep, LOGGER);
return null;
} catch (IOException e) {
ClientFacingIOExceptionLoggingHelper.log(LOGGER, ObjectLogMessageHelper.objectLogMessage(this, "Error in parsing the SOCKS5 request"), e);
return null;
}
LOGGER.debug(ObjectLogMessageHelper.objectLogMessage(this, "Received %s", socks5Request.toString()));
return socks5Request;
}
Aggregations