mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-04 00:15:09 +03:00
Merge remote-tracking branch 'origin/main' into codex/nodes-fleet-7342
This commit is contained in:
@@ -118,6 +118,7 @@ var monitorScopeAllow = map[string]struct{}{
|
||||
var nodeSyncScopeAllow = map[string]map[string]struct{}{
|
||||
"/server/status": {http.MethodGet: {}},
|
||||
"/inbounds/list": {http.MethodGet: {}},
|
||||
"/inbounds/catalog": {http.MethodGet: {}},
|
||||
"/inbounds/trafficSnapshot": {http.MethodGet: {}},
|
||||
"/inbounds/add": {http.MethodPost: {}},
|
||||
"/inbounds/del/:id": {http.MethodPost: {}},
|
||||
|
||||
@@ -84,6 +84,7 @@ func (a *InboundController) initRouter(g *gin.RouterGroup) {
|
||||
g.GET("/trafficSnapshot", a.getTrafficSnapshot)
|
||||
g.GET("/list/slim", a.getInboundsSlim)
|
||||
g.GET("/options", a.getInboundOptions)
|
||||
g.GET("/catalog", a.getInboundCatalog)
|
||||
g.GET("/allLinks", a.getAllInboundLinks)
|
||||
g.GET("/get/:id", a.getInbound)
|
||||
g.GET("/:id/fallbacks", a.getFallbacks)
|
||||
@@ -152,6 +153,15 @@ func (a *InboundController) getInboundOptions(c *gin.Context) {
|
||||
jsonObj(c, options, nil)
|
||||
}
|
||||
|
||||
func (a *InboundController) getInboundCatalog(c *gin.Context) {
|
||||
options, err := a.inboundService.GetInboundCatalog(session.GetLoginUser(c).Id)
|
||||
if err != nil {
|
||||
jsonMsg(c, I18nWeb(c, "pages.inbounds.toasts.obtain"), err)
|
||||
return
|
||||
}
|
||||
jsonObj(c, options, nil)
|
||||
}
|
||||
|
||||
// getAmneziaWGKernelReadiness reports whether this host can run an AmneziaWG
|
||||
// inbound on the kernel module, so the form can disable the toggle and say why.
|
||||
func (a *InboundController) getAmneziaWGKernelReadiness(c *gin.Context) {
|
||||
|
||||
Reference in New Issue
Block a user