@hackage / haskell-proxy-list

Simple library for retrieving proxy servers info from https://proxy-list.org

Latest0.0.1

About

Metadata

  • Last updated , by grzegorzgolda
  • License LicenseRef-PublicDomain
  • Categories Web Development
  • Maintained by: contact@grzegorzgolda.com

  • Lottery factor: 0

Links

Installation

Readme

PROXY LIST

Very simple library for downloading a list of proxies from http://proxy-list.org

HOW TO USE

Library exports two functions. Proxy is represented by a tuple (Host, Port).

getProxyList :: Bool -> IO [(String, Int)]
getProxyList ssl
 
Argument indicates if requested proxy servers should have HTTPS support. 
Returns a list of proxy servers.

randomProxy :: [(String, Int)] -> (String, Int)
randomProxy proxyList

Selects random proxy.

Example:

import HTTP.ThirdParty.ProxyList

main = do
    proxyList <- getProxyList True
    proxyServer <- randomProxy proxyList
    print proxyServer