mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-10-20 22:50:53 +00:00
REALITY config: Print Warning when user is choosing apple/icloud as the target or listening on non-443 ports
https://t.me/projectXtls/1754 https://github.com/XTLS/BBS/issues/21#issuecomment-4103308607
This commit is contained in:
parent
c1b67a961e
commit
157e65b34d
2 changed files with 10 additions and 0 deletions
|
|
@ -909,6 +909,12 @@ func (c *REALITYConfig) Build() (proto.Message, error) {
|
|||
}
|
||||
}
|
||||
|
||||
for _, sn := range config.ServerNames {
|
||||
if strings.Contains(sn, "apple") || strings.Contains(sn, "icloud") {
|
||||
errors.LogWarning(context.Background(), `REALITY: Choosing apple, icloud, etc. as the target may get your IP blocked by the GFW`)
|
||||
}
|
||||
}
|
||||
|
||||
config.LimitFallbackUpload = new(reality.LimitFallback)
|
||||
config.LimitFallbackUpload.AfterBytes = c.LimitFallbackUpload.AfterBytes
|
||||
config.LimitFallbackUpload.BytesPerSec = c.LimitFallbackUpload.BytesPerSec
|
||||
|
|
|
|||
|
|
@ -174,6 +174,10 @@ func (c *InboundDetourConfig) Build() (*core.InboundHandlerConfig, error) {
|
|||
return nil, err
|
||||
}
|
||||
receiverSettings.StreamSettings = ss
|
||||
if strings.Contains(ss.SecurityType, "reality") && (receiverSettings.PortList == nil ||
|
||||
len(receiverSettings.PortList.Ports()) != 1 || receiverSettings.PortList.Ports()[0] != 443) {
|
||||
errors.LogWarning(context.Background(), `REALITY: Listening on non-443 ports may get your IP blocked by the GFW`)
|
||||
}
|
||||
}
|
||||
if c.SniffingConfig != nil {
|
||||
s, err := c.SniffingConfig.Build()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue