|
@@ -93,7 +93,7 @@ type RouterConfig struct {
|
|
|
cfgctx context.Context
|
|
cfgctx context.Context
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-func (c *RouterConfig) getDomainStrategy() router.Config_DomainStrategy {
|
|
|
|
|
|
|
+func (c *RouterConfig) getDomainStrategy() router.DomainStrategy {
|
|
|
ds := ""
|
|
ds := ""
|
|
|
if c.DomainStrategy != nil {
|
|
if c.DomainStrategy != nil {
|
|
|
ds = *c.DomainStrategy
|
|
ds = *c.DomainStrategy
|
|
@@ -103,13 +103,13 @@ func (c *RouterConfig) getDomainStrategy() router.Config_DomainStrategy {
|
|
|
|
|
|
|
|
switch strings.ToLower(ds) {
|
|
switch strings.ToLower(ds) {
|
|
|
case "alwaysip", "always_ip", "always-ip":
|
|
case "alwaysip", "always_ip", "always-ip":
|
|
|
- return router.Config_UseIp
|
|
|
|
|
|
|
+ return router.DomainStrategy_UseIp
|
|
|
case "ipifnonmatch", "ip_if_non_match", "ip-if-non-match":
|
|
case "ipifnonmatch", "ip_if_non_match", "ip-if-non-match":
|
|
|
- return router.Config_IpIfNonMatch
|
|
|
|
|
|
|
+ return router.DomainStrategy_IpIfNonMatch
|
|
|
case "ipondemand", "ip_on_demand", "ip-on-demand":
|
|
case "ipondemand", "ip_on_demand", "ip-on-demand":
|
|
|
- return router.Config_IpOnDemand
|
|
|
|
|
|
|
+ return router.DomainStrategy_IpOnDemand
|
|
|
default:
|
|
default:
|
|
|
- return router.Config_AsIs
|
|
|
|
|
|
|
+ return router.DomainStrategy_AsIs
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|