Merge pull request #99 from rockisch/dev-proxy

Add dev proxy config
This commit is contained in:
wish
2023-11-26 20:50:27 +11:00
4 changed files with 16 additions and 6 deletions

View File

@@ -69,7 +69,11 @@ func encodeServerInfo(config *_config.Config, s *Server, local bool) []byte {
for channelIdx, ci := range si.Channels {
sid = (4096 + serverIdx*256) + (16 + channelIdx)
bf.WriteUint16(ci.Port)
if _config.ErupeConfig.DevMode && _config.ErupeConfig.ProxyPort != 0 {
bf.WriteUint16(_config.ErupeConfig.ProxyPort)
} else {
bf.WriteUint16(ci.Port)
}
bf.WriteUint16(16 + uint16(channelIdx))
bf.WriteUint16(ci.MaxPlayers)
var currentPlayers uint16