mirror of
				https://github.com/onyx-and-iris/q3rcon-proxy.git
				synced 2025-11-03 22:31:48 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			30 lines
		
	
	
		
			451 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			30 lines
		
	
	
		
			451 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")
 | 
						|
 | 
						|
	log.Fatal(c.ListenAndServe())
 | 
						|
}
 |