func init() {
	proxy := conf.Ext("proxy", map[interface{}]interface{}{})
	for k, v := range proxy.(map[interface{}]interface{}) {
		log4go.Debug("found proxy config: %s", k.(string))
		_v := v.(map[interface{}]interface{})
		local := _v["local"].(string)
		localSchema := "http"
		if ls, ok := _v["localSchema"]; ok {
			localSchema = ls.(string)
		}
		local = combinePort(local, localSchema)
		model.SvrCnf[local] = &model.Server{Host: local, Schema: localSchema}
		remote := _v["remote"].(string)
		remoteSchema := "http"
		if rs, ok := _v["remoteSchema"]; ok {
			remoteSchema = rs.(string)
		}
		model.SvrCnf[remote] = &model.Server{Host: remote, Schema: remoteSchema}
		model.ReverseProxies[remote] = local
		model.Proxies[local] = remote
		if model.LocalTopDomain == "" {
			model.LocalTopDomain = ioutils.TopDomainName(local)
		}
	}
	log4go.Info("Load proxy list: %v", util.ReflectToString(model.Proxies))
}
var Servers []route.Server = make([]route.Server, 0)
package main
import (
	"fmt"
	"github.com/kimiazhu/ginweb"
	"github.com/kimiazhu/ginweb/conf"
	"github.com/kimiazhu/golib/utils"
	"github.com/kimiazhu/grp/midware"
	"github.com/kimiazhu/grp/model"
	"github.com/kimiazhu/grp/util/io"
	"github.com/kimiazhu/log4go"
)