• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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?
 
Marshal
Posts: 28193
95
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.
 
Ew. You guys are ugly with a capital UG. Here, maybe this tiny ad can help:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic