Connection_cache.Make_proxy
This functor keeps a cache of connections for reuse. Connections are reused based on their remote Conduit.endp
(effectively IP / port). It also supports automatically connecting and reconnecting to direct and tunneling proxies, based on the remote URI scheme (HTTP will select direct proxies, HTTPS tunneling proxies).
module Connection : S.Connection
val create :
?ctx:Connection.Net.ctx ->
?keep:int64 ->
?retry:int ->
?parallel:int ->
?depth:int ->
?scheme_proxy:(string * Uri.t) list ->
?all_proxy:Uri.t ->
?no_proxy:string ->
?proxy_headers:Http.Header.t ->
unit ->
t
Create a new connection cache. The outer connections to the proxy and the inner connections share the same parameters.