runServer protocol torrentProcPath cachePath contacts (serverDesc, serverSk) = do

  proc <- uTorrentProc torrentProcPath
  let btC = serverBTClientConfig {
                 btProc = proc
               , outgoingRedirects
                  = redirectToRev (serverAddr serverDesc) clientBTClientConfig 
               }

  Server.listen (ServerConfig serverSk btC contacts cachePath) protocol


-- were are configuring the proxies to redirect the bittorrent traffic
-- to the reverse proxy port
-- so that we don't need to play with iptables
runServer protocol torrentProcPath cachePath contacts (serverDesc, serverSk) = do

  proc <- uTorrentProc torrentProcPath
  let btC = serverBTClientConfig {
                 btProc = proc
               , outgoingRedirects
                  = redirectToRev (serverAddr serverDesc) clientBTClientConfig 
               }

  Server.listen (ServerConfig serverSk btC contacts cachePath) protocol


-- were are configuring the proxies to redirect the bittorrent traffic
-- to the reverse proxy port
-- so that we don't need to play with iptables
runServer protocol torrentProcPath cachePath contacts (serverDesc, serverSk) = do

  proc <- uTorrentProc torrentProcPath
  let btC = serverBTClientConfig {
                 btProc = proc
               , outgoingRedirects
                  = redirectToRev (serverAddr serverDesc) clientBTClientConfig 
               }

  Server.listen (ServerConfig serverSk btC contacts cachePath) protocol


-- were are configuring the proxies to redirect the bittorrent traffic
-- to the reverse proxy port
-- so that we don't need to play with iptables