mirror of https://github.com/bjdgyc/anylink.git
增加、默认路由
This commit is contained in:
parent
8187fb548f
commit
65463fee6c
|
@ -84,8 +84,10 @@ func SetGroup(g *Group) error {
|
|||
for _, v := range g.RouteInclude {
|
||||
if v.Val != "" {
|
||||
if v.Val == "all" {
|
||||
routeInclude = append(routeInclude, v)
|
||||
continue
|
||||
}
|
||||
|
||||
ipMask, _, err := parseIpNet(v.Val)
|
||||
if err != nil {
|
||||
return errors.New("RouteInclude 错误" + err.Error())
|
||||
|
|
|
@ -96,6 +96,9 @@ func LinkTunnel(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
// 允许的路由
|
||||
for _, v := range cSess.Group.RouteInclude {
|
||||
if v.Val == "all" {
|
||||
continue
|
||||
}
|
||||
w.Header().Add("X-CSTP-Split-Include", v.IpMask)
|
||||
}
|
||||
// 不允许的路由
|
||||
|
|
Loading…
Reference in New Issue