github.com/xtls/xray-core@v1.8.12-0.20240518155711-3168d27b0bdb/proxy/dokodemo/config.go (about)

     1  package dokodemo
     2  
     3  import (
     4  	"github.com/xtls/xray-core/common/net"
     5  )
     6  
     7  // GetPredefinedAddress returns the defined address from proto config. Null if address is not valid.
     8  func (v *Config) GetPredefinedAddress() net.Address {
     9  	addr := v.Address.AsAddress()
    10  	if addr == nil {
    11  		return nil
    12  	}
    13  	return addr
    14  }