mirror of
https://github.com/XrayR-project/XrayR.git
synced 2025-06-07 21:09:53 +00:00

Enabled the REALITY feature on both model.go and sspanel.go for the api and service assemblies and updated the inboundbuilder to switch the REALITY feature based on the new field and condition statements. This enhancement allows finer control and visibility of the REALITY feature's activation. In addition, the REALITYConfig in config.go was updated to remove the DisableLocal field and add the DisableLocalREALITYConfig field. The main/config.yml.example file has also been updated to reflect these changes and provide users with a clearer understanding of the config setup.
55 lines
2.8 KiB
Go
55 lines
2.8 KiB
Go
package controller
|
|
|
|
import (
|
|
"github.com/XrayR-project/XrayR/common/limiter"
|
|
"github.com/XrayR-project/XrayR/common/mylego"
|
|
)
|
|
|
|
type Config struct {
|
|
ListenIP string `mapstructure:"ListenIP"`
|
|
SendIP string `mapstructure:"SendIP"`
|
|
UpdatePeriodic int `mapstructure:"UpdatePeriodic"`
|
|
CertConfig *mylego.CertConfig `mapstructure:"CertConfig"`
|
|
EnableDNS bool `mapstructure:"EnableDNS"`
|
|
DNSType string `mapstructure:"DNSType"`
|
|
DisableUploadTraffic bool `mapstructure:"DisableUploadTraffic"`
|
|
DisableGetRule bool `mapstructure:"DisableGetRule"`
|
|
EnableProxyProtocol bool `mapstructure:"EnableProxyProtocol"`
|
|
EnableFallback bool `mapstructure:"EnableFallback"`
|
|
DisableIVCheck bool `mapstructure:"DisableIVCheck"`
|
|
DisableSniffing bool `mapstructure:"DisableSniffing"`
|
|
AutoSpeedLimitConfig *AutoSpeedLimitConfig `mapstructure:"AutoSpeedLimitConfig"`
|
|
GlobalDeviceLimitConfig *limiter.GlobalDeviceLimitConfig `mapstructure:"GlobalDeviceLimitConfig"`
|
|
FallBackConfigs []*FallBackConfig `mapstructure:"FallBackConfigs"`
|
|
DisableLocalREALITYConfig bool `mapstructure:"DisableLocalREALITYConfig"`
|
|
EnableREALITY bool `mapstructure:"EnableREALITY"`
|
|
REALITYConfigs *REALITYConfig `mapstructure:"REALITYConfigs"`
|
|
}
|
|
|
|
type AutoSpeedLimitConfig struct {
|
|
Limit int `mapstructure:"Limit"` // mbps
|
|
WarnTimes int `mapstructure:"WarnTimes"`
|
|
LimitSpeed int `mapstructure:"LimitSpeed"` // mbps
|
|
LimitDuration int `mapstructure:"LimitDuration"` // minute
|
|
}
|
|
|
|
type FallBackConfig struct {
|
|
SNI string `mapstructure:"SNI"`
|
|
Alpn string `mapstructure:"Alpn"`
|
|
Path string `mapstructure:"Path"`
|
|
Dest string `mapstructure:"Dest"`
|
|
ProxyProtocolVer uint64 `mapstructure:"ProxyProtocolVer"`
|
|
}
|
|
|
|
type REALITYConfig struct {
|
|
Show bool `mapstructure:"Show"`
|
|
Dest string `mapstructure:"Dest"`
|
|
ProxyProtocolVer uint64 `mapstructure:"ProxyProtocolVer"`
|
|
ServerNames []string `mapstructure:"ServerNames"`
|
|
PrivateKey string `mapstructure:"PrivateKey"`
|
|
MinClientVer string `mapstructure:"MinClientVer"`
|
|
MaxClientVer string `mapstructure:"MaxClientVer"`
|
|
MaxTimeDiff uint64 `mapstructure:"MaxTimeDiff"`
|
|
ShortIds []string `mapstructure:"ShortIds"`
|
|
}
|