host.lua 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. local SERVER_ID = 1 -- 服务器标识
  2. local MAX_CLIENT = 8000 -- 最大连接数限制
  3. local GAME_PORT = 8010 -- 向客户开放的游戏端口
  4. local WEB_PORT = 9010 -- 向WEB开放的控制端口
  5. local CONSOLE_PORT = 7010 -- 控制台端口
  6. local REDIS_HOST = "127.0.0.1" -- 数据库主机ip地址
  7. local REDIS_PORT = 6010 -- 数据库端口
  8. local REDIS_AUTH = 'xh123' -- 数据库密码
  9. local WEB_HOST = "0.0.0.0"
  10. option = {
  11. sid = SERVER_ID,
  12. game_port = GAME_PORT,
  13. web_port = WEB_PORT,
  14. console_port = CONSOLE_PORT,
  15. max_client = MAX_CLIENT,
  16. web_host = WEB_HOST,
  17. redis = {
  18. auth = REDIS_AUTH,
  19. host = REDIS_HOST,
  20. port = REDIS_PORT,
  21. },
  22. cluster_redis = {
  23. auth = REDIS_AUTH,
  24. host = REDIS_HOST,
  25. port = 7000,
  26. },
  27. cluster = {
  28. -- log = "127.0.0.1:2345",
  29. }
  30. }
  31. -- 集群地址配置
  32. -- CLUSTER = {
  33. -- watchdog = "127.0.0.1:10001", -- 接受集群推送
  34. -- master = "127.0.0.1:12000",
  35. -- }
  36. -- 集群启动使用参数
  37. -- MASTER_CONF = {
  38. -- debug_port = 5558,
  39. -- web_port = 5559,
  40. -- }
  41. -- 服务器启动相关参数
  42. LAUNCH = {
  43. test_recharge = true; -- 测试充值
  44. maintain = false, -- true:维护 false:开放
  45. battle_log = true, -- true:开启战斗日志 false:关闭战斗日志
  46. white_list = {
  47. },
  48. }
  49. RECHARGE_SERVICE = "127.0.0.1:8081"