Compare commits

...

2 Commits

Author SHA1 Message Date
5ac3f805e2 add example debian unit file 2024-03-24 12:31:04 +00:00
ab548d669a no need to call String() explicitly here 2024-03-24 12:29:48 +00:00
2 changed files with 19 additions and 1 deletions

18
debian/q3rcon-proxy.service vendored Normal file
View File

@ -0,0 +1,18 @@
[Unit]
Description=Q3Rcon Proxy Service
Wants=network.target
After=network.target
[Service]
Type=simple
User=gameservers
Environment="Q3RCON_PROXY=20000:28960;20001:28961;20002:28962"
Environment="Q3RCON_HOST=0.0.0.0"
Environment="Q3RCON_DEBUG=0"
ExecStart=/usr/local/bin/q3rcon-proxy
Restart=always
RestartSec=3
[Install]
WantedBy=multi-user.target

View File

@ -108,7 +108,7 @@ func (s *Session) proxyTo(buf []byte) error {
if s.isRconRequestPacket(buf) { if s.isRconRequestPacket(buf) {
parts := strings.Split(string(buf), " ") parts := strings.Split(string(buf), " ")
log.Infof("From [%s] To [%s] Command: %s", s.caddr.IP.String(), s.serverConn.RemoteAddr().String(), strings.Join(parts[2:], " ")) log.Infof("From [%s] To [%s] Command: %s", s.caddr.IP, s.serverConn.RemoteAddr(), strings.Join(parts[2:], " "))
} }
return nil return nil