• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Socket Call using proxing not working

 
pank gup
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using the following code to make a socket call using the proxy.



This is not working as I am getting
(java.net.SocketException) java.net.SocketException: Connection reset
error. I am unable to find what is wrong with this.

Couple of things:

1. I am using the IP address of the target HOST like 143.223.456.2 instead of any host name.
2. I am able to telnet host ip from the proxy server.
3. I am able to send HTTP request using the same proxy to other servers.

Can anybody suggest what all things I can try?
 
Paul Clapham
Sheriff
Posts: 21111
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you sure it's a Socks proxy server, rather than (say) an HTTP proxy server?
 
pank gup
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The proxy person saying this proxy is correct.

I did one more test today. I tried to connect to "www.google.com" on port 80 using the same code. When I don't use the proxy I am able to connect but not with proxy. Just wondering if the code written to set the proxy is 100% correct.
 
pank gup
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried to reach google.com using browser (chrome) and specifying proxy as "socks proxy" and were able to open google but cannot do so with the following code.




If I use proxy as HTTP in code i.e.



Then I can get to google from code.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic