1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-05-01 01:59:07 -04:00

remove use of any

This commit is contained in:
Darien Raymond
2016-10-16 14:22:21 +02:00
parent 5d9e6b0799
commit e33b7df34c
72 changed files with 728 additions and 792 deletions

View File

@@ -51,13 +51,16 @@ func ListenTCP(address v2net.Address, port v2net.Port, options internet.ListenOp
awaitingConns: make(chan *ConnectionWithError, 32),
config: tcpSettings,
}
if options.Stream != nil && options.Stream.SecurityType == internet.SecurityType_TLS {
if options.Stream != nil && options.Stream.HasSecuritySettings() {
securitySettings, err := options.Stream.GetEffectiveSecuritySettings()
if err != nil {
log.Error("TCP: Failed to apply TLS config: ", err)
log.Error("TCP: Failed to get security config: ", err)
return nil, err
}
l.tlsConfig = securitySettings.(*v2tls.Config).GetTLSConfig()
tlsConfig, ok := securitySettings.(*v2tls.Config)
if ok {
l.tlsConfig = tlsConfig.GetTLSConfig()
}
}
go l.KeepAccepting()
return l, nil