docs: def main(host, port, timeout, itimeout, qsize, backlog, maxtry, bsize, verbose, logfile=None, logcfgfile=None, cfgfile=None):
      """Simple python implementation of a socks5 proxy server. """
  
      dict_cfg = {}
      if cfgfile:
          dict_cfg = app_config.get_config_by_file(cfgfile)
  
      def get_param(key, param, default):
          return param or dict_cfg.get(key, None) or default
  
      cfg = app_config.Config(
          address=(get_param("host", host, "localhost"), get_param("port", port, 3333)),
          timeout=get_param("timeout", timeout, 10),
          msg_size=get_param("bsize", bsize, 4096),
          max_try_turn=get_param("maxtry", maxtry, 3),
          backlog=get_param("backlog", backlog, 1024),
          max_queue_size=get_param("qsize", qsize, 100),
          endpoint_timeout=get_param("itimeout", itimeout, 60),
          verbose=get_param("verbose", verbose, 0),
          logfile=get_param("logfile", logfile, None),
          logcfgfile=get_param("logcfgfile", logcfgfile, None)
      )
      click.echo("Starting sockspy...")
      sockspy_main.run(cfg)