-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.lua
24 lines (20 loc) · 870 Bytes
/
main.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
-- SubProxifier, a Sub Rosa server proxy project created by checkraisefold.
-- Load configuration file
local _config = require("./misc/config")
local config = _config:init("config.json")
if not config then
return
end
-- Load the logger
local logger = require("./misc/logger")
logger:init(config.logger.logColor, config.logger.logLevel)
-- Module imports
local masterServer = require("./masterServer")
local gameServer = require("./gameServer")
require("./packets/gameServer")
require("./packets/masterServer")
local proxyConfig = config.proxyGameServer
local targetConfig = config.targetGameServer
local masterConfig = config.proxyMasterServer
local currMaster = masterServer.create(masterConfig.host, masterConfig.port, config)
gameServer.create(targetConfig.host, targetConfig.port, proxyConfig.host, proxyConfig.port, config, currMaster)