mirror of
https://github.com/aljazceru/haven.git
synced 2025-12-18 14:24:18 +01:00
Add support for configurable binding address
This commit is contained in:
6
main.go
6
main.go
@@ -48,8 +48,10 @@ func main() {
|
||||
|
||||
http.HandleFunc("/", dynamicRelayHandler)
|
||||
|
||||
log.Printf("🔗 listening at http://localhost:3355")
|
||||
http.ListenAndServe("0.0.0.0:3355", nil)
|
||||
addr := fmt.Sprintf("%s:%d", config.RelayBindAddress, config.RelayPort)
|
||||
|
||||
log.Printf("🔗 listening at %s", addr)
|
||||
http.ListenAndServe(addr, nil)
|
||||
}
|
||||
|
||||
func dynamicRelayHandler(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
Reference in New Issue
Block a user