api.go 611 B

123456789101112131415161718192021222324
  1. package main
  2. import "net/http"
  3. /*
  4. API.go
  5. This file contains all the API called by the web management interface
  6. */
  7. func initAPIs() {
  8. //Reverse proxy
  9. http.HandleFunc("/enable", ReverseProxyHandleOnOff)
  10. http.HandleFunc("/add", ReverseProxyHandleAddEndpoint)
  11. http.HandleFunc("/status", ReverseProxyStatus)
  12. http.HandleFunc("/list", ReverseProxyList)
  13. http.HandleFunc("/del", DeleteProxyEndpoint)
  14. http.HandleFunc("/setIncoming", HandleIncomingPortSet)
  15. //TLS / SSL config
  16. http.HandleFunc("/cert/upload", handleCertUpload)
  17. http.HandleFunc("/cert/list", handleListCertificate)
  18. }