示例#1
0
func getTestConfig() *proxy.Config {
	config := &proxy.Config{}

	pubKey, err := proxy.ParsePublicKey("../test_utils/public.pem")
	if err != nil {
		log.Fatal("Failed to parse key. ", err)
	}
	config.PublicKey = pubKey
	return config
}
示例#2
0
文件: utils.go 项目: wlan0/host-api
func GetTestConfig(addr string) *proxy.Config {
	config := &proxy.Config{
		ListenAddr: addr,
	}

	pubKey, err := proxy.ParsePublicKey("../test_utils/public.pem")
	if err != nil {
		log.Fatal("Failed to parse key. ", err)
	}
	config.PublicKey = pubKey
	return config
}