diff --git a/proxyserver/main.go b/proxyserver/main.go index ac033fdd..a03aeeb0 100644 --- a/proxyserver/main.go +++ b/proxyserver/main.go @@ -114,7 +114,18 @@ func main() { ServerAddress := ":9900" log.Println("listen on ", ServerAddress) - log.Fatal(http.ListenAndServe(ServerAddress, mux)) + + keydata, err := os.ReadFile("/opt/server.fusen.3718.cn.key") + if err != nil { + panic(err) + } + + pemdata, err := os.ReadFile("/opt/server.fusen.3718.cn.pem") + if err != nil { + panic(err) + } + + log.Fatal(http.ListenAndServeTLS(ServerAddress, string(pemdata), string(keydata), mux)) } // 后端服务的类型