wireguard-ui/main.go

21 lines
646 B
Go
Raw Normal View History

2020-04-18 11:17:49 +02:00
package main
import (
"github.com/ngoduykhanh/wireguard-ui/handler"
"github.com/ngoduykhanh/wireguard-ui/router"
)
func main() {
app := router.New()
app.GET("/", handler.WireGuardClients())
2020-04-18 11:17:49 +02:00
app.POST("/new-client", handler.NewClient())
app.POST("/remove-client", handler.RemoveClient())
app.GET("/wg-server", handler.WireGuardServer())
app.POST("wg-server/interfaces", handler.WireGuardServerInterfaces())
app.POST("wg-server/keypair", handler.WireGuardServerKeyPair())
2020-04-20 04:54:41 +02:00
app.GET("/global-settings", handler.GlobalSettings())
app.POST("/global-settings", handler.GlobalSettingSubmit())
2020-04-18 11:17:49 +02:00
app.Logger.Fatal(app.Start("127.0.0.1:5000"))
}