Allow for verifying CA of http2 server

This commit is contained in:
Adam Stankiewicz
2017-03-09 23:53:01 +01:00
parent 42a9d102dd
commit 8901a92289
2 changed files with 96 additions and 6 deletions
+6 -1
View File
@@ -3,12 +3,13 @@ package gost
import (
"bufio"
"fmt"
"github.com/golang/glog"
"net"
"net/url"
"os"
"strconv"
"strings"
"github.com/golang/glog"
)
// Proxy node represent a proxy
@@ -142,6 +143,10 @@ func (node *ProxyNode) insecureSkipVerify() bool {
return !node.getBool("secure")
}
func (node *ProxyNode) caFile() string {
return node.Get("ca")
}
func (node *ProxyNode) certFile() string {
if cert := node.Get("cert"); cert != "" {
return cert