use gin instead of standard http lib in main

This commit is contained in:
Benson Wong
2024-11-18 15:58:28 -08:00
parent a33ac6f8fb
commit c9233d2c9a
2 changed files with 13 additions and 5 deletions

View File

@@ -46,6 +46,10 @@ func New(config *Config) *ProxyManager {
return pm
}
func (pm *ProxyManager) Run(addr ...string) error {
return pm.ginEngine.Run(addr...)
}
func (pm *ProxyManager) HandlerFunc(w http.ResponseWriter, r *http.Request) {
pm.ginEngine.ServeHTTP(w, r)
}