mirror of
https://github.com/psforever/PSF-LoginServer.git
synced 2026-07-16 08:55:18 +00:00
differentiate between bind and public
This commit is contained in:
parent
a5cd13ea92
commit
1beff98880
1 changed files with 6 additions and 1 deletions
|
|
@ -78,6 +78,11 @@ object Server {
|
||||||
|
|
||||||
def run(args: CliConfig): Unit = {
|
def run(args: CliConfig): Unit = {
|
||||||
val bindAddress: InetAddress =
|
val bindAddress: InetAddress =
|
||||||
|
args.bind match {
|
||||||
|
case Some(address) => InetAddress.getByName(address) // address from first argument
|
||||||
|
case None => InetAddress.getByName(Config.app.bind) // address from config
|
||||||
|
}
|
||||||
|
val publicAddress: InetAddress =
|
||||||
args.bind match {
|
args.bind match {
|
||||||
case Some(address) => InetAddress.getByName(address) // address from first argument
|
case Some(address) => InetAddress.getByName(address) // address from first argument
|
||||||
case None => InetAddress.getByName(Config.app.public) // address from config
|
case None => InetAddress.getByName(Config.app.public) // address from config
|
||||||
|
|
@ -137,7 +142,7 @@ object Server {
|
||||||
system.spawn(
|
system.spawn(
|
||||||
SocketPane(Seq(
|
SocketPane(Seq(
|
||||||
SocketSetup("login", SocketSetupInfo(bindAddress, Seq(Config.app.login.port), loginPlan)),
|
SocketSetup("login", SocketSetupInfo(bindAddress, Seq(Config.app.login.port), loginPlan)),
|
||||||
SocketSetup("world", SocketSetupInfo(bindAddress, Config.app.world.port +: Config.app.world.ports, sessionPlan))
|
SocketSetup("world", SocketSetupInfo(publicAddress, Config.app.world.port +: Config.app.world.ports, sessionPlan))
|
||||||
)),
|
)),
|
||||||
name = SocketPane.SocketPaneKey.id
|
name = SocketPane.SocketPaneKey.id
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue