Documentation ¶
Index ¶
- Constants
- Variables
- func PrepareConfig(out IOutbound, inboundPort int, logPath, geoInfoDir string) (conf []byte)
- type IClient
- type IOutbound
- type SInstance
- func (that *SInstance) Close()
- func (that *SInstance) GetConf() []byte
- func (that *SInstance) SetAssetDir(geoinfoDir string)
- func (that *SInstance) SetInPortAndLogFile(inboundPort int, logPath string)
- func (that *SInstance) SetOutbound(out IOutbound)
- func (that *SInstance) Start() (err error)
- func (that *SInstance) Type() string
- type XInstance
- func (that *XInstance) Close()
- func (that *XInstance) GetConf() []byte
- func (that *XInstance) SetAssetDir(geoinfoDir string)
- func (that *XInstance) SetInPortAndLogFile(inboundPort int, logPath string)
- func (that *XInstance) SetOutbound(out IOutbound)
- func (that *XInstance) Start() error
- func (that *XInstance) Type() string
Constants ¶
View Source
const ( SingBoxGeoIPFileName string = "geoip.db" SingboxGeoSiteFileName string = "geosite.db" XrayCoreEnableSocksEnv string = "XRAY_CORE_ENABLE_SOCKS" )
Variables ¶
View Source
var SingBoxConfigString string = `` /* 2654-byte string literal not displayed */
Docs: https://sing-box.sagernet.org/zh/configuration/
View Source
var XrayCoreConfigStr = `` /* 2106-byte string literal not displayed */
Functions ¶
Types ¶
type IClient ¶
type IOutbound ¶
type IOutbound interface { GetHost() string GetOutbound() string GetOutboundType() outbound.ClientType }
type SInstance ¶
func NewSClient ¶
func NewSClient() *SInstance
func (*SInstance) SetAssetDir ¶
func (*SInstance) SetInPortAndLogFile ¶
func (*SInstance) SetOutbound ¶
type XInstance ¶
func NewXClient ¶
func NewXClient() *XInstance
func (*XInstance) SetAssetDir ¶
func (*XInstance) SetInPortAndLogFile ¶
func (*XInstance) SetOutbound ¶
Click to show internal directories.
Click to hide internal directories.