How to use reCaptcha through a proxy server?

3,698 views
Skip to first unread message

AIP Dev Team

unread,
Jul 7, 2008, 10:58:27 AM7/7/08
to reCAPTCHA
We setup our reCaptcha on our webserver using Java/JSP. When I call
the reCaptcha.checkAnswer() function, we received the following error
code after a long wait:

net.tanesha.recaptcha.ReCaptchaException: Cannot load URL: Tried all:
'1' addresses, but could not connect over HTTP to server: 'api-
verify.recaptcha.net', port: '80'

CODE:
String remoteAddr = request.getRemoteAddr();
ReCaptchaImpl reCaptcha = new ReCaptchaImpl();
reCaptcha.setPrivateKey(PRIVATEKEY);
ReCaptchaResponse reCaptchaResponse =
reCaptcha.checkAnswer(remoteAddr, challenge, capresponse);

Our network administrators suggested defining a local proxy address to
send the request to the reCaptcha server for form validation.

Are there any methods in the reCaptcha API that allow me to specify
the proxy address to send from, so that we can go around our load
balancer and firewall.

James

unread,
Jul 21, 2008, 12:00:52 AM7/21/08
to reCAPTCHA
There is a new article in the reCaptcha wiki relating to proxy
configuration on Windows servers...
http://wiki.recaptcha.net/index.php/Using_reCaptcha_on_IIS_through_a_proxy

This solution doens't require any changes to your code!!
Hope this helps.

Regards,
James.

On Jul 8, 12:58 am, AIP Dev Team <thrillgraph...@gmail.com> wrote:
> We setup our reCaptcha on our webserver using Java/JSP. When I call
> the reCaptcha.checkAnswer() function, we received the following error
> code after a long wait:
>
> net.tanesha.recaptcha.ReCaptchaException: Cannot load URL: Tried all:
> '1' addresses, but could not connect over HTTP to server: 'api-
> verify.recaptcha.net', port: '80'
>
> CODE:
>     String remoteAddr = request.getRemoteAddr();
>     ReCaptchaImpl reCaptcha = new ReCaptchaImpl();
>     reCaptcha.setPrivateKey(PRIVATEKEY);
>     ReCaptchaResponse reCaptchaResponse =
> reCaptcha.checkAnswer(remoteAddr, challenge, capresponse);
>
> Our network administrators suggested defining a localproxyaddress to
> send the request to the reCaptcha server for form validation.
>
> Are there any methods in the reCaptcha API that allow me to specify
> theproxyaddress to send from, so that we can go around our load
> balancer and firewall.
Reply all
Reply to author
Forward
0 new messages