setting.py 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. # -*- coding: utf-8 -*-
  2. """
  3. -------------------------------------------------
  4. File Name: setting.py
  5. Description : 配置文件
  6. Author : JHao
  7. date: 2019/2/15
  8. -------------------------------------------------
  9. Change Activity:
  10. 2019/2/15:
  11. -------------------------------------------------
  12. """
  13. BANNER = r"""
  14. ****************************************************************
  15. *** ______ ********************* ______ *********** _ ********
  16. *** | ___ \_ ******************** | ___ \ ********* | | ********
  17. *** | |_/ / \__ __ __ _ __ _ | |_/ /___ * ___ | | ********
  18. *** | __/| _// _ \ \ \/ /| | | || __// _ \ / _ \ | | ********
  19. *** | | | | | (_) | > < \ |_| || | | (_) | (_) || |___ ****
  20. *** \_| |_| \___/ /_/\_\ \__ |\_| \___/ \___/ \_____/ ****
  21. **** __ / / *****
  22. ************************* /___ / *******************************
  23. ************************* ********************************
  24. ****************************************************************
  25. """
  26. VERSION = "2.1.1"
  27. # ############### server config ###############
  28. HOST = "0.0.0.0"
  29. PORT = 5010
  30. # ############### database config ###################
  31. # db connection uri
  32. # example:
  33. # Redis: redis://:password@ip:port/db
  34. # Ssdb: ssdb://:password@ip:port
  35. DB_CONN = 'redis://@myhome.97admin.com:63790/1'
  36. # proxy table name
  37. TABLE_NAME = 'use_proxy'
  38. # ###### config the proxy fetch function ######
  39. PROXY_FETCHER = [
  40. "freeProxy01",
  41. "freeProxy02",
  42. # "freeProxy03",
  43. "freeProxy04",
  44. "freeProxy05",
  45. # "freeProxy06",
  46. # "freeProxy07",
  47. # "freeProxy08",
  48. "freeProxy09",
  49. "freeProxy13",
  50. "freeProxy14",
  51. "freeProxy15",
  52. "freeProxy16",
  53. ]
  54. # ############# proxy validator #################
  55. VERIFY_URL = "https://www.cloudflare.com/"
  56. VERIFY_TIMEOUT = 3
  57. MAX_FAIL_COUNT = 2
  58. # ############# scheduler config #################
  59. # Set the timezone for the scheduler forcely (optional)
  60. # If it is running on a VM, and
  61. # "ValueError: Timezone offset does not match system offset"
  62. # was raised during scheduling.
  63. # Please uncomment the following line and set a timezone for the scheduler.
  64. # Otherwise it will detect the timezone from the system automatically.
  65. # TIMEZONE = "Asia/Shanghai"