Explorar o código

rename json fields

v2ray %!s(int64=9) %!d(string=hai) anos
pai
achega
be81d246f2
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      transport/internet/connection_json.go

+ 2 - 2
transport/internet/connection_json.go

@@ -13,11 +13,11 @@ import (
 
 func (this *TLSSettings) UnmarshalJSON(data []byte) error {
 	type JSONCertConfig struct {
-		CertFile string `json:"certFile"`
+		CertFile string `json:"certificateFile"`
 		KeyFile  string `json:"keyFile"`
 	}
 	type JSONConfig struct {
-		Certs []*JSONCertConfig `json:"certs"`
+		Certs []*JSONCertConfig `json:"certificates"`
 	}
 	jsonConfig := new(JSONConfig)
 	if err := json.Unmarshal(data, jsonConfig); err != nil {