api.go 556 B

1234567891011121314151617181920212223
  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. }