Proxy settings causing unwanted use of SOCKS

I have a Java app that, among other things, has to connect to a web server and get a response. Pretty simple stuff. I needed to be able to support proxy servers out of the box. So I looked around and discovered the ProxySelector and the java.net.useSystemProxies=true property. I read that it would auto-magically detect proxy settings for the platform. I added the code to detect and use the proxy if present and it worked without a hitch in testing.
I was contacted by a customer stating that they weren't able to communicate to the internet. I looked at my logs and saw that I was detecting their HTTP proxy server and port correctly. I spoke to their proxy server administrator and confirmed everything. Then, I saw this in the logs:
java.net.SocketException: Malformed reply from SOCKS server
     at java.net.SocksSocketImpl.readSocksReply(Unknown Source)
     at java.net.SocksSocketImpl.connect(Unknown Source)
     at java.net.Socket.connect(Unknown Source)
     at java.net.Socket.connect(Unknown Source)
     at java.net.Socket.<init>(Unknown Source)
     at java.net.Socket.<init>(Unknown Source)They were not using a SOCKS proxy, only a standard HTTP proxy. The customer's IE could connect to the site without issue. I then asked them to describe their IE connection settings to me. They said they simply checked "Use a proxy server for your LAN" and entered the proxy address and port. I asked them to check the "Advanced" proxy settings and they had "Use the same proxy server for all protocols" checked, and that's it. They mentioned that they had never clicked "Advanced" when setting it up.
I setup my machine's config to match theirs and I got the issue to occur. I then un-checked "Use the same proxy server for all protocols" and everything worked fine. No SOCKS sockets were used.
Hopefully you're still with me here...
Why does Java assume that it should use SOCKS for the socket and IE does not when "Use the same proxy server for all protocols" is checked? How can I prevent this from happening?
Specs: WinXP, Java 6, IE 7
Edited: Changed title...

Hello rhimo�
I�m torturing my self for 3 day with a similar problem.
At first a thought it was a Java version problem, so I installed the latest 6u3.
After a lot of testing and googling, now I�m sure that it�s some kind of a bug.
So, I�m using one public web address as a test:
http://www.dailyfx.com/charts/Chart.html
I set the java proxy settings to �USE BROWSER SETTINGS�
I set the IE 7 PROXY with the exact server using port 8080.
In ADVANCED SETTINGS, I Copy/Paste the same server/port to all the rest of the fields (HTTP, SECURE, FTP, SOCKS)
So the �USE THE SAME PROXY SERVER FOR ALL PROTOCOLS� is unchecked.
When I start the web site, everything is working OK, the �daily graph� comes out, and the java console log looks like this:
Dec 25, 2007 2:54:09 PM com.netdania.ui.applet.c init
INFO: Finance Chart 2.1.3
Applet Browser: sun.plugin
Dec 25, 2007 2:54:16 PM com.netdania.ui.applet.c init
INFO: ... Loading complete.
In connect() -> Switched to polling!, attemps: 1
As you can see, the page loads after the 1st attempt.
Java is using the SOCKS protocol with the defined server.
Now, the problem comes when I select the �USE THE SAME PROXY SERVER FOR ALL PROTOCOLS�.
First strange thing is that all fields becoming gray (which is OK) but the SOCKS field becomes blank and gray.
Whit these settings I�m unable to open the �daily graph� and I receive this java console messages:
Dec 25, 2007 3:02:07 PM com.netdania.ui.applet.c init
INFO: Finance Chart 2.1.3
Applet Browser: sun.plugin
Dec 25, 2007 3:02:14 PM com.netdania.ui.applet.c init
INFO: ... Loading complete.
In connect() -> null, attemps: 1
In connect() -> null, attemps: 2
In connect() -> null, attemps: 3
And so on�
I assuming that the java is tying to connect using the same SOCKS protocol as before, but now, the server is undefined.
I�ve try testing the same scenario with Firefox but there I find more bugs:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6504564
So, if you decide to do the same tests, I recommend using IE7 and latest Java 6u3.
I think that this is one more Microsoft issue, and the solution will come as sooner as possible.
Please reply me with eventual solution.
Thanks.

Similar Messages

  • Why won't the proxy settings be created in the keychain access?

    Hello,
    I'm having an issue with an iMac that won't keep the proxy settings saved. My company has proxy settings active to use the internet and for some reason they will not stick. I noticed that the keychain access is not creating this internet password and I also noticed it's only happening for a certain user only. In the administrator profile, the keychain is working perfectly fine so I narrow it down to the profile issue. Any suggestions?
    Thanks,

    Network settings apply to all users on the system. Administrator privileges are required to change them.

  • Itunes and proxy settings. Itunes keeps the proxy setting from IE and I can't adapt it due to company policy. How can I force itunes to use firefox?

    itunes can not connect to server and I can't find its proxy settings.
    So I think it uses these from IE and those are blocked by company policy.
    So, how can I force itunes to use the firefox settings

    I fixed this issue (with help from tech support) and it involved several things.
    After adding a song to iTunes, right-click on the song in iTunes and select "Update iTunes Match."
    OR go to the iTunes menu-->Store-->Update iTunes Match.
    Maybe that's the reason, it just hadn't updated to the cloud.
    OR maybe it's not a high-enough bitrate file.   This happens to me because most of my tunes are home-recorded.
    Sometimes converting to .mp3 or Create AAC version might work. (You do this with a right-click in iTunes, and then you will want to remove the original file from iTunes.)
    There is an iTunes Preferences setting, under General Preferences called Import Settings.  Try setting it to AAC Encoder and iTunes Plus.   That (I think) causes imports to be slightly better quality.
    Good luck!  The tech support person at Apple is requesting that a knowlege-base article be written about this.

  • When I open firefox it says something about proxy settings! how do i fix this so I can start using it again

    It won't let me do anything! All it says The proxy server is refusing connections
    Firefox is configured to use a proxy server that is refusing connections.
    * Check the proxy settings to make sure that they are correct.
    * Contact your network administrator to make sure the proxy server is
    working.
    I clicked the button to reload or whatever and nothing happens just the same old thing over and over!

    Check the connection settings.
    *Tools > Options > Advanced : Network : Connection > Settings
    If you do not need to use a proxy to connect to internet then select "No Proxy" if the default "Use the system proxy settings" setting doesn't work.
    See "Firefox connection settings":
    *https://support.mozilla.com/kb/Firefox+cannot+load+websites+but+other+programs+can
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.com/kb/Safe+Mode

  • How to use proxy settings for one website

    Hello,
    I have to access the only one website using Proxy settings and for others I don't need proxy to access. Is there a way to configure the internet settings to allow one website using Proxy... Please advise. Thanks!
    Regards,
    Aravin S

    I am also getting this "error".  The printer (8500 A910) connected to the web well enough that it went out and supposedly downloaded a new update, but then it was supposed to print a page showing the email address, but did not.
    So I go in and try to set up the eprint, and it tells me it cannot connect to the sever and I'll need to enter a proxy address and port number.  But my ISP's cable modems do NOT have any static IP address nor do they provide any sort of proxy service.  Everything works just fine with "automatic discovery" (DHCP) for every computer in the house.  No problems there.
    So, since  that's the case, of course I cannot look up some proxy address and port number in my web browser because they're all set up for "automatically detect settings".
    What's baffling is that the printer connected to something at HP to download the "update", and it went through a process that appeared to be what I'd expect it to do if it was updating its firmware.  But it won't connect to whatever it's supposed to connect to to have an email address assigned.
    Does HP supply a proxy server?  If so, what's its IP address or URL, and what port should a person set the printer to try to use?
    UPDATE:
    It appears that the HP site must have just been "down" for about six or seven hours while I was trying to get the printer to connect because it now connected and I got an email address asigned without needing to have any "proxy" stuff set up at all.  It's a shame that the printer does not simply report "HP Site down - try again later" instead of reporting that you need to use a proxy when that's impossible.
    "Now, on to the next problem which is that my emails to the assigned address are all bouncing with a "550 5.7.1 Command rejected" error!

  • Steps to apply Proxy settings for all Server in a specific OU using Group Policy ?

    People,
    I have several terminal server (2008 R2) running as RDSH in an OU called Terminal Servers.
    So how can I create the GPO setting to make sure that everyone who login to this terminal server will be getting the proxy settings automatically to proxy.domain.com on port 3128 ?
    I've created the GP object and then link it directly to the Terminal Servers OU using the following options:
    User Configuration (Enabled) > Policies > Windows Settings > Internet Explorer Maintenance >
    Connection/Proxy Settings > Enable proxy settings 
    But somehow when I login as myself and DOMAIN\Administrator the proxy settings in the IE11 is still unchecked with the old Proxy value and sometimes blank in some servers.
    /* Server Support Specialist */

    > I've created the GP object and then link it directly to the Terminal
    > Servers OU using the following options:
    >
    > User Configuration (Enabled) > Policies > Windows Settings > Internet
    > Explorer Maintenance >
    > Connection/Proxy Settings > Enable proxy settings
    User policies apply to user objects - the servers will ignore them, and
    as long as there is no user in your terminal servers OU, no one will get
    this setting.
    Link your policy to the OUs where the users are, then use item level
    targeting to filter for a security group you create for this purpose,
    and add all your terminal servers to this group. Don't forget to reboot
    the servers after changing group memberships...
    Greetings/Grüße,
    Martin
    Mal ein
    gutes Buch über GPOs lesen?
    Good or bad GPOs? - my blog…
    And if IT bothers me -
    coke bottle design refreshment (-:
    Martin,
    Since the browser in the Terminal Servers are all running IE 11, do I need to do the GPO using IEAK or GPP with the new ADMX template ?
    /* Server Support Specialist */

  • BizTalk published WCF service throwing HTTP 404 error using ISA reverse proxy settings

    I have published my schemas as a WCF service from BizTalk 2010 "Publish WCF Service" wizard. I used Wcf-basicHTTP adapter in receive port. I am able to run the service successfully on localhost IIS and I tested my biztalk solution by sending request using SOAP UI and got response successfully.... Now: Actually, I need to give this service endpoint to my vendor who will send request from outside my company's network i.e. internet. In my infrastrucrue BizTalk is behind the firewall so, we setup a REVERSE proxy server at DMZ layer and it is configured properly. I have tested a simple WCF service by replacing the localhost with Proxy server configured address <DNSName> and it worked absolutely fine. But when I change localhost in my BizTalk schema based published WCF service it is not working and I am getting following error. Really strugling to get it resolved. I wasted a whole 3 days....very upset. Please help me out by giving the detailed step solution. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly. Requested URL: /BizTalkServiceInstance/MyService.svc I am surprized why other c# code based WCF services are working fine with reverse proxy settings. Server Error in '/' Application. The resource cannot be found.Is there any special things to consider Biztalk exposed wcf servcie over ssl in IIS cluster with ISA

    Hi Singam :)
    First I would start by browsing any other files (files other than the one from WCF) just to ensure that the reverse-proxy’s redirection rules are set correctly. If you get the same 404 error when you try to access other service/files “through reverse-proxy”,
    then it’s an issue in the redirection rule(s) in reverse-proxy.
    If others are fine i.e. no issue in reverse-proxy setup as such, then try the following for WCF service's web.config file. I have seen this issue in WCF service (not just BizTalk’s artifacts exposed as service in reverse-proxy). Add serviceHostingEnvironment
    config as show with in serviceModel section.
    <system.serviceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
    </system.serviceModel>
    Regards,
    M.R.Ashwin Prabhu
    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

  • Windows - Use system proxy settings not working as expected

    Hi everyone,
    I have a bit of an issue that I could use some help with. We currently have remote users that utilize an SSTP VPN connection to access our internal network. Once connected, those users are required to use an internal proxy server to connect to the Internet. The proxy server is Microsoft's TMG and utilized domain authentication.
    On our remote Windows clients we have their Internet Options configured to utilize a proxy as follows:
    Internet Options -> Connections -> LAN Settings -> No proxy configured at all
    Internet Options -> Connections -> Highlight SSTP Connection -> Settings
    Use a proxy server for this connection -> IP/Port of Proxy Server
    Firefox and Chrome are both configured to use system proxy settings.
    Here is my process to demonstrate the issues:
    Remote client workstation is rebooted.
    With the above configuration just after a reboot, a remote user that is not connected to the VPN can browse the Internet with Internet Explorer, Chrome, and Firefox. None of the browsers prompt for credentials.
    A remote VPN connection is then established.
    FF is opened and HTTP connections utilize the proxy server. However, HTTPS connections do not use the proxy server, but instead attempt to use the default gateway. FF does not prompt for credentials. FF is closed.
    Chrome is opened and can access both HTTP and HTTPS sites without issue. No credential prompt. Chrome is closed.
    IE is opened and can access both HTTP and HTTPS sites without issue. No credential prompt. IE is closed.
    Here's where it gets weirder...
    FF is then reopened. The VPN connection is still up. FF will prompt for credentials. Domain credentials are supplied and FF can now utilize the proxy for both HTTP and HTTPS connections. FF is closed.
    VPN is disconnected.
    FF is opened and cannot access the Internet as it is still trying to use the proxy server. FF is closed.
    IE is opened and can access the Internet. IE is closed.
    Chrome is opened and can access the Internet. Chrome is closed.
    FF is reopened and can now access the Internet. FF is closed.
    In summary, in the above scenario FF acts in an unexpected manner with regards to proxy usage when "use system proxy settings" is applied. However, Firefox begins acting as expected after IE is opened and closed. For example, connect to VPN, open IE, close IE, open FF, and everything works accordingly. Disconnect the VPN, open IE, close IE, open FF and everything works as expected.
    Any insight you can provide would be appreciated as it is affecting our FF users and the sooner we can achieve resolution the better. As a note, we've also worked through this issue with WPAD and proxy auto-detect. I've intentionally removed these from the equation to simplify troubleshooting.
    Thanks

    Quick update. Added to a previously filed bug. Looks like it's assigned now so maybe we'll see a fix for this soon.
    https://bugzilla.mozilla.org/show_bug.cgi?id=563169

  • Firefox not detecting/using system proxy settings

    I use a command line script to change among various proxies (and none). Firefox does not recognize when a proxy is turned on or fails to connect to it (no error messages), while other browsers and applications do just fine.
    I have tried selecting "Use system proxy settings" and "Auto-detect proxy settings for this network."
    My script contains these lines to activate a proxy
    reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections" /v DefaultConnectionSettings /t REG_BINARY /d 46000000b10000000200000014000000736f636b733d3132372e302e302e313a313131311c0000002a2e6c6f63616c3b3139322e3136382e31312e2a3b3c6c6f63616c3e000000000000000000000000000000000000000000000000000000000000000000000000 /f
    reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 1 /f
    reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v MigrateProxy /t REG_DWORD /d 1 /f
    The first line enables the proxy to take effect without entering inetcpl.cpl. Again, this works for any application other than Firefox.
    The proxies are all through ssh with port forwarding.
    I do not want to manually configure a proxy in Firefox, because I do not want to change this every time I need to change proxies or turn them off. This is not an acceptable solution.
    I am on Windows 8.1 64bit, with Firefox version 35.0
    Any idea what might be going on here?

    Thank you for the response, but as above, the "Auto-detect proxy settings for this network." setting does not work.

  • What HTTP Proxy settings to use and when?

    On the Wi-Fi Networks menu there are three options for HTTP Proxy - Off, Manual, Auto
    Which one should I use and when/why would I use the others?
    thx, gordo

    99% of the time, you should have the proxy settings turned off. Unless you are trying to connect to a corporate network, or some other network that requires a proxy server. In that case you would need to talk to the network administrators to obtain the settings you would need. If your just connecting to your wireless network at home, your almost for sure not going to need to enter anything for the proxy server settings.

  • How to use Proxy Settings in swf?

    Hi ,
        I am using swf inside an MFC application. Both MFC applciation and swf can call web pages(some web services). Everything was working fine until my company added a proxy server. I have made changes to the MFC application and that can communicate through proxy server but swf is still not able to call remote services.
    Where should I make changes in swf to call remote service through proxy? I just want to know which class or property should I use? There should be some propety to specify that I want to make a request through Proxy server on some port with a username and password.
    - Rahul

    I've resolved it : proxy settings can be modified in <PT_HOME>/settings/common/serverconfig.xml
    It was not easy to find it, there's no doc talking about this

  • Can lync client use internet proxy settings to proxy edge servers, if direct access is not reachable?

    Hi everybody I am trying to Login with my lync Client out of my organization. So I am using lync as a remote user. I am in another organization, and I am using their coporate lan wired and wireless, but I cannot Login to lync in my organization.
    I see that I cannot Access my edge Server on port 443 to authenticate directly, I know that Client in this organization use Internet Proxy to browse the Internet. they have a .pac in their ie Settings.
    my question is; can lync Client use Internet Proxy Settings to reach the Destination? I mean the Access edge on port 443?
    or it can use only Client direct Access to reach the edge Servers?
    I Think that the answer is that I use tcp protocol and not http, and maybe that is the reason why I cannot use the Internet Explorer Proxy Settings to reach the Access edge Servers, different maybe is the case I Need to reach the reverse Proxy for live Meetings.
    Hope my question is clear.
    Thanks

    Proxy settings are used to tell Internet Explorer the network address of an intermediary server (known as a proxy server) that is used between the browser and the Internet on some networks.
    Lync client doesn’t use Internet Proxy Setting. You need to access the Edge service directly.
    Lisa Zheng
    TechNet Community Support

  • Is it possible to install a consumer app for mass usage that would alter the ios device proxy settings? Over the air not supervised. Can an app company use an MDM server to do this if the customer consents?

    Is it possible to install a consumer app for mass usage that would alter the ios device proxy settings? Over the air not supervised. Can an app company use an MDM server to do this if the customer consents?

    HI Chris,
    Thanks for taking the time to reply.
    Could you expand on your answer, which bit is very doubtful?
    Also in your knowledge would Apple work with a company and license it if the software they were developing was desired by consumer demand?
    Thanks
    Gary

  • Using a socks proxy

    Hi all,
    I have a socks proxy setup and have had no issues with any apps using it. I am on my own local network so the proxy does not have a username, its mostly just for testing. Well i tried to use the socks proxy from java command line for my app setting the proxyhost and all that. I can see in the socks daemon logs that for some reason java is trying to send a username even though i am not specifying one.
    I looked through some java documentation and it seems that java will always try and send a username. Is this true? Can I turn it off somehow?
    Thanks!

    Hey There,
    Thanks for the swift reply. I tried your suggestion and disabled the fraudulent website check, exited safari, and restarted (with the SOCKS5 proxy still enabled) and Safari still crashes at the same point on the same pages. I've also tried removing Safari (using App Zapper) and reinstalling, and also using Pacifist to extract just the Safari.app from the installer package to overwrite the files in the folder (without altering other system files). None of these seemed to do the trick either. I have this bad feeling like something from the previously installed Unsanity.ape is lurking in the corners of the computer, but the crash dump doesn't seem to support that notion. Any other ideas? I'm up for anything. Rings of salt around the computer (or is it over the shoulder?) - thanks for the help.
    -Shawn

  • Force iCloud to use network proxy settings.

    It seems that iCloud does not use the system wide proxy settings. I am in college and we must use the authenticated system proxy, and iCloud has been unable to update since I have been here. How can I force it to use the authenticated protocol?

    You need to talk to the IT people at your college.  College ITs can do strange things at times, I know, I work at one (but mine is very good at supporting macs and all things mac).

Maybe you are looking for

  • How to delete song on iPhone which can't be wiped?

    Hi there, after about one full day of fighting with iTunes Match (including full deletion of iCould Library by using an empty iTunes Library), I finally have a working iCloud Library with all my songs and artwork (tested in my iPhone 4S). Unfortunate

  • Mail: How to delete an email address in the "To" field that is no longer valid

    How to delete an email address that is no longer valid but still appears as an option when typing that person's name in the field "To"; in MS Outlook this simply works by deleting that email address in the field "To" or "Cc" or "Bcc". The old, non-va

  • Updated to the 7 version.  Under contacts there is no option for adding Notes.  How do you get it back?

    I updated to the 7 version.  When you add a contact now, you no longer have the option for adding notes.   Also all the apps I purchased are  no longer on my desktop. The apps are shown under settings but I do not see where you can add them to the de

  • Change queue id in mapping possible?!

    Hi guys, is it possible to change the queue id of message in the mapping, so that this message is added to the specified Queue during runtime for serialization reason? I tried to use the parameter StreamTransformationConstants.CONVERSATION_ID from th

  • Mail "forgets" passwords frequently

    Only on 1 machine throughout Tiger, Leopard and Snow Leopard at least once a week or as often as every 30 seconds, the mail app keeps losing the passwords for all of the accounts. Today it has asked me for the password to one account over 10 times. I