q3rcon-proxy/cmd/http/main.go
2023-01-08 05:04:44 -06:00

30 lines
500 B
Go

package main
import (
"log"
"os"
"github.com/dgparker/lilproxy/pkg/udpproxy"
)
func main() {
target := os.Getenv("LILPROXY_TARGET")
if target == "" {
log.Fatal("env LILPROXY_TARGET required")
}
port := os.Getenv("LILPROXY_PORT")
if port == "" {
log.Fatal("env LILPROXY_PORT required")
}
c, err := udpproxy.New(port, target)
if err != nil {
log.Fatal(err)
}
log.Printf("lilproxy initialized on port: (%s) target address: (%s)", port, target)
log.Fatal(c.ListenAndServe())
}