// not authorized through firewall blocking (ip does not match filter)
session.out.write((httpVersion+" 403 refused (IP not granted)"+serverCore.crlfString+serverCore.crlfString+"you are not allowed to connect to this proxy, because you are using the non-granted IP "+clientIP+". allowed are only connections that match with the following filter: "+switchboard.getConfig("proxyClient","*")+serverCore.crlfString).getBytes());
returnserverCore.TERMINATE_CONNECTION;
}
// parse port
// parse hostname and port
prop.setProperty(httpd.CONNECTION_PROP_HOST,arg);
pos=arg.indexOf(":");
intport=443;
if(pos>=0){
@ -710,11 +706,22 @@ public final class httpd implements serverHandler {
// not authorized through firewall blocking (ip does not match filter)
session.out.write((httpVersion+" 403 refused (IP not granted)"+serverCore.crlfString+serverCore.crlfString+"you are not allowed to connect to this proxy, because you are using the non-granted IP "+clientIP+". allowed are only connections that match with the following filter: "+switchboard.getConfig("proxyClient","*")+serverCore.crlfString).getBytes());
returnserverCore.TERMINATE_CONNECTION;
}
if(port!=443){
// security: connection only to ssl port
// we send a 403 (forbidden) error back
@ -723,12 +730,6 @@ public final class httpd implements serverHandler {
returnserverCore.TERMINATE_CONNECTION;
}
// prepare to pass values
Propertiesprop=newProperties();
prop.setProperty("HOST",arg);
prop.setProperty("PORT",Integer.toString(port));
prop.setProperty("HTTP",httpVersion);
// pass to proxy
if(allowProxy){
if(handleProxyAuthentication(header)){
@ -1119,8 +1120,9 @@ public final class httpd implements serverHandler {