mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2025-10-06 01:07:03 +08:00
Fix(restapi): debug missing mountpoints
This commit is contained in:
@@ -18,6 +18,10 @@ func SetStatsFunc(s func() tcpip.Stats) {
|
||||
_statsFunc = s
|
||||
}
|
||||
|
||||
func init() {
|
||||
registerMountPoint("/netstats", http.HandlerFunc(getNetStats))
|
||||
}
|
||||
|
||||
func getNetStats(w http.ResponseWriter, r *http.Request) {
|
||||
if _statsFunc == nil {
|
||||
render.Status(r, http.StatusInternalServerError)
|
||||
|
Reference in New Issue
Block a user