2015-12-06 17:21:15 +00:00
|
|
|
package dokodemo
|
|
|
|
|
|
|
|
import (
|
2017-01-13 23:27:45 +00:00
|
|
|
"v2ray.com/core/common/net"
|
2015-12-06 17:21:15 +00:00
|
|
|
)
|
|
|
|
|
2016-12-22 12:33:28 +00:00
|
|
|
// GetPredefinedAddress returns the defined address from proto config. Null if address is not valid.
|
2017-01-13 23:27:45 +00:00
|
|
|
func (v *Config) GetPredefinedAddress() net.Address {
|
2016-11-27 20:39:09 +00:00
|
|
|
addr := v.Address.AsAddress()
|
2016-09-24 21:36:26 +00:00
|
|
|
if addr == nil {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
return addr
|
2015-12-06 17:21:15 +00:00
|
|
|
}
|