api.go 846 B

12345678910111213141516171819202122232425262728
  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. http.HandleFunc("/useHttpsRedirect", HandleUpdateHttpsRedirect)
  16. //TLS / SSL config
  17. http.HandleFunc("/cert/tls", handleToggleTLSProxy)
  18. http.HandleFunc("/cert/upload", handleCertUpload)
  19. http.HandleFunc("/cert/list", handleListCertificate)
  20. http.HandleFunc("/cert/checkDefault", handleDefaultCertCheck)
  21. http.HandleFunc("/cert/delete", handleCertRemove)
  22. }