Xray-core/proxy/dokodemo/config.go

15 lines
308 B
Go
Raw Normal View History

2020-11-25 14:01:53 +03:00
package dokodemo
import (
"github.com/xtls/xray-core/v1/common/net"
)
// GetPredefinedAddress returns the defined address from proto config. Null if address is not valid.
func (v *Config) GetPredefinedAddress() net.Address {
addr := v.Address.AsAddress()
if addr == nil {
return nil
}
return addr
}