Class WpadProxySearchStrategy

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private java.lang.String checkDhcpAckForPAC​(java.net.InetAddress ip, byte[] mac)  
      private java.lang.String detectScriptUrlPerDHCP()
      Uses DHCP to find the script URL.
      private java.lang.String detectScriptUrlPerDNS()
      Uses DNS to find the script URL.
      private java.lang.String getMacString​(byte[] mac)  
      java.lang.String getName()
      Gets the printable name of the search strategy.
      java.net.ProxySelector getProxySelector()
      Loads the proxy settings from a PAC file.
      java.util.Properties readSettings()
      Loads the settings and stores them in a properties map.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WpadProxySearchStrategy

        public WpadProxySearchStrategy()
        Constructor
    • Method Detail

      • getProxySelector

        public java.net.ProxySelector getProxySelector()
                                                throws ProxyException
        Loads the proxy settings from a PAC file. The location of the PAC file is determined automatically.
        Specified by:
        getProxySelector in interface ProxySearchStrategy
        Returns:
        a configured ProxySelector, null if none is found.
        Throws:
        ProxyException - on error.
      • getName

        public java.lang.String getName()
        Gets the printable name of the search strategy.
        Specified by:
        getName in interface ProxySearchStrategy
        Returns:
        the printable name of the search strategy
      • readSettings

        public java.util.Properties readSettings()
        Loads the settings and stores them in a properties map.
        Returns:
        the settings.
      • detectScriptUrlPerDNS

        private java.lang.String detectScriptUrlPerDNS()
                                                throws java.io.IOException
        Uses DNS to find the script URL. Attention: this detection method is known to have some severe security issues.
        Returns:
        the URL, null if not found.
        Throws:
        java.io.IOException
      • detectScriptUrlPerDHCP

        private java.lang.String detectScriptUrlPerDHCP()
                                                 throws java.io.IOException
        Uses DHCP to find the script URL.
        Returns:
        the URL, null if not found.
        Throws:
        java.io.IOException
      • getMacString

        private java.lang.String getMacString​(byte[] mac)
      • checkDhcpAckForPAC

        private java.lang.String checkDhcpAckForPAC​(java.net.InetAddress ip,
                                                    byte[] mac)
                                             throws java.io.IOException
        Throws:
        java.io.IOException