Documentation ¶
Index ¶
- Variables
- func ApplyConfig(c map[string]json.RawMessage)
- func RegisterRoutes(g *gin.Engine)
- type ConfigController
- type DataBaseController
- type SUBController
- type StatusController
- func (s *StatusController) ApplyConfig(c map[string]json.RawMessage) error
- func (self *StatusController) ChangeStatus(c *gin.Context)
- func (self *StatusController) GetStatus(c *gin.Context)
- func (self *StatusController) RegisterRoutes(g *gin.Engine)
- func (self *StatusController) Test(c *gin.Context)
- type TemplateController
- type URLController
- type V2RayController
- func (v *V2RayController) AddInboundConfig(config *core.InboundHandlerConfig) error
- func (v *V2RayController) AddInboundConfigs(config []*core.InboundHandlerConfig) error
- func (v *V2RayController) AddOutboundConfig(config *core.OutboundHandlerConfig) error
- func (v *V2RayController) AddOutboundConfigs(config []*core.OutboundHandlerConfig) error
- func (v *V2RayController) ApplyConfig(c map[string]json.RawMessage) error
- func (v *V2RayController) Clear() error
- func (v *V2RayController) ClearInbound() error
- func (v *V2RayController) ClearOutbound() error
- func (v *V2RayController) GetInList() []string
- func (v *V2RayController) GetOutList() []string
- func (v *V2RayController) LoadJSONConfig(config string) error
- func (v *V2RayController) RegisterRoutes(g *gin.Engine)
- func (v *V2RayController) RemoveInboundConfig(tag string) error
- func (v *V2RayController) RemoveOutboundConfig(tag string) error
- func (v *V2RayController) Start() error
- func (v *V2RayController) Status() bool
- func (v *V2RayController) Stop() error
Constants ¶
This section is empty.
Variables ¶
View Source
var V2rayID struct {
}
Functions ¶
Types ¶
type ConfigController ¶
type ConfigController struct { }
func (*ConfigController) Append ¶
func (c *ConfigController) Append(g *gin.Context)
func (*ConfigController) RegisterRoutes ¶
func (c *ConfigController) RegisterRoutes(g *gin.Engine)
type DataBaseController ¶
type DataBaseController struct {
// contains filtered or unexported fields
}
var ( DataBase *DataBaseController DataBaseMap *map[string]database.DataBaseObj )
func NewDataBaseController ¶
func NewDataBaseController(path string) (*DataBaseController, error)
初始化数据库,单例.
func (*DataBaseController) ApplyConfig ¶
func (d *DataBaseController) ApplyConfig(c map[string]json.RawMessage) error
应用配置
func (DataBaseController) RegisterRoutes ¶
func (self DataBaseController) RegisterRoutes(g *gin.Engine)
type SUBController ¶
type SUBController struct { }
func (*SUBController) Append ¶
func (sub *SUBController) Append(c *gin.Context)
func (*SUBController) Cmd ¶
func (sub *SUBController) Cmd(c *gin.Context)
func (*SUBController) Get ¶
func (sub *SUBController) Get(c *gin.Context)
func (*SUBController) List ¶
func (sub *SUBController) List(c *gin.Context)
func (*SUBController) RegisterRoutes ¶
func (sub *SUBController) RegisterRoutes(g *gin.Engine)
type StatusController ¶
type StatusController struct {
// contains filtered or unexported fields
}
func (*StatusController) ApplyConfig ¶
func (s *StatusController) ApplyConfig(c map[string]json.RawMessage) error
func (*StatusController) ChangeStatus ¶
func (self *StatusController) ChangeStatus(c *gin.Context)
func (*StatusController) GetStatus ¶
func (self *StatusController) GetStatus(c *gin.Context)
func (*StatusController) RegisterRoutes ¶
func (self *StatusController) RegisterRoutes(g *gin.Engine)
func (*StatusController) Test ¶
func (self *StatusController) Test(c *gin.Context)
type TemplateController ¶
type TemplateController struct {
// contains filtered or unexported fields
}
var Template *TemplateController
func NewTemplateController ¶
func NewTemplateController() (*TemplateController, error)
func (*TemplateController) ApplyConfig ¶
func (t *TemplateController) ApplyConfig(c map[string]json.RawMessage) error
func (*TemplateController) DealWithPath ¶
func (t *TemplateController) DealWithPath(g *gin.Context)
func (*TemplateController) RegisterRoutes ¶
func (t *TemplateController) RegisterRoutes(g *gin.Engine)
注册路由,加载模板
type URLController ¶
type URLController struct { }
var ( URLMap *map[string]url.URLObj URL *URLController )
func NewURLController ¶
func NewURLController() (*URLController, error)
func (*URLController) RegisterRoutes ¶
func (c *URLController) RegisterRoutes(g *gin.Engine)
type V2RayController ¶
type V2RayController struct {
// contains filtered or unexported fields
}
var V2Ray *V2RayController
func (*V2RayController) AddInboundConfig ¶
func (v *V2RayController) AddInboundConfig(config *core.InboundHandlerConfig) error
添加进站协议
func (*V2RayController) AddInboundConfigs ¶
func (v *V2RayController) AddInboundConfigs(config []*core.InboundHandlerConfig) error
批量添加进站协议
func (*V2RayController) AddOutboundConfig ¶
func (v *V2RayController) AddOutboundConfig(config *core.OutboundHandlerConfig) error
添加出站协议
func (*V2RayController) AddOutboundConfigs ¶
func (v *V2RayController) AddOutboundConfigs(config []*core.OutboundHandlerConfig) error
批量添加出站协议
func (*V2RayController) ApplyConfig ¶
func (v *V2RayController) ApplyConfig(c map[string]json.RawMessage) error
func (*V2RayController) ClearInbound ¶
func (v *V2RayController) ClearInbound() error
func (*V2RayController) ClearOutbound ¶
func (v *V2RayController) ClearOutbound() error
func (*V2RayController) GetInList ¶
func (v *V2RayController) GetInList() []string
func (*V2RayController) GetOutList ¶
func (v *V2RayController) GetOutList() []string
func (*V2RayController) LoadJSONConfig ¶
func (v *V2RayController) LoadJSONConfig(config string) error
读取JSON数据
func (*V2RayController) RegisterRoutes ¶
func (v *V2RayController) RegisterRoutes(g *gin.Engine)
func (*V2RayController) RemoveInboundConfig ¶
func (v *V2RayController) RemoveInboundConfig(tag string) error
func (*V2RayController) RemoveOutboundConfig ¶
func (v *V2RayController) RemoveOutboundConfig(tag string) error
func (*V2RayController) Status ¶
func (v *V2RayController) Status() bool
func (*V2RayController) Stop ¶
func (v *V2RayController) Stop() error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.