find_win32_proxy (Raggle::Proxy)

    # File raggle, line 639
        def Proxy::find_win32_proxy
          ret = nil

          Win32::Registry::open(
            Win32::Registry::HKEY_CURRENT_USER,
            'Software\Microsoft\Windows\CurrentVersion\Internet Settings'
          ) do |reg|
            # check and see if proxy is enabled
            if reg.read('ProxyEnable')[1] != 0
              # get server, port, and no_proxy (overrides)
              server = reg.read('ProxyServer')[1]
              np = reg.read('ProxyOverride')[1]

              server =~ /^([^:]+):(.+)$/
              ret = {
                'host'      => $1,
                'port'      => $2,
              }

              ret['no_proxy'] = np.tr(';', ',') if np && np.length > 0
            end
          end

          # dump proxy debug
          # ret && ret.each { |key, val| puts "DEBUG: #{key} => #{val}" }

          ret
        end