aspose file tools*
The moose likes Sockets and Internet Protocols and the fly likes Socket Call using proxing not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Socket Call using proxing not working" Watch "Socket Call using proxing not working" New topic
Author

Socket Call using proxing not working

pank gup
Greenhorn

Joined: Jan 22, 2014
Posts: 3
I am using the following code to make a socket call using the proxy.



This is not working as I am getting
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
Bartender

Joined: Oct 14, 2005
Posts: 18655
    
    8

Are you sure it's a Socks proxy server, rather than (say) an HTTP proxy server?
pank gup
Greenhorn

Joined: Jan 22, 2014
Posts: 3
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

Joined: Jan 22, 2014
Posts: 3
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Socket Call using proxing not working