• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Socket Call using proxing not working

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Sheriff
Posts: 28360
99
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
If you live in a cold climate and on the grid, incandescent light can use less energy than LED. Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic