Просмотр исходного кода

Update vendored github.com/sergeyfrolov/gotapdance

Rod Hynes 7 лет назад
Родитель
Сommit
3777352d5f
2 измененных файлов с 15 добавлено и 17 удалено
  1. 10 6
      vendor/github.com/sergeyfrolov/gotapdance/tapdance/assets.go
  2. 5 11
      vendor/vendor.json

+ 10 - 6
vendor/github.com/sergeyfrolov/gotapdance/tapdance/assets.go

@@ -3,9 +3,7 @@ package tapdance
 import (
 	"crypto/x509"
 	"encoding/binary"
-	"github.com/golang/protobuf/proto"
-	"github.com/pkg/errors"
-	pb "github.com/sergeyfrolov/gotapdance/protobuf"
+	"errors"
 	"io/ioutil"
 	"net"
 	"os"
@@ -13,6 +11,9 @@ import (
 	"strconv"
 	"strings"
 	"sync"
+
+	"github.com/golang/protobuf/proto"
+	pb "github.com/sergeyfrolov/gotapdance/protobuf"
 )
 
 type assets struct {
@@ -169,7 +170,7 @@ func (a *assets) GetDecoyAddress() (sni string, addr string) {
 	a.RLock()
 	defer a.RUnlock()
 
-	decoys := a.config.DecoyList.TlsDecoys
+	decoys := a.config.GetDecoyList().GetTlsDecoys()
 	if len(decoys) == 0 {
 		return "", ""
 	}
@@ -187,7 +188,7 @@ func (a *assets) GetDecoy() pb.TLSDecoySpec {
 	a.RLock()
 	defer a.RUnlock()
 
-	decoys := a.config.DecoyList.TlsDecoys
+	decoys := a.config.GetDecoyList().GetTlsDecoys()
 	chosenDecoy := pb.TLSDecoySpec{}
 	if len(decoys) == 0 {
 		return chosenDecoy
@@ -220,7 +221,7 @@ func (a *assets) GetPubkey() *[32]byte {
 	defer a.RUnlock()
 
 	var pKey [32]byte
-	copy(pKey[:], a.config.DefaultPubkey.Key[:])
+	copy(pKey[:], a.config.GetDefaultPubkey().GetKey()[:])
 	return &pKey
 }
 
@@ -273,6 +274,9 @@ func (a *assets) SetDecoys(decoys []*pb.TLSDecoySpec) (err error) {
 	a.Lock()
 	defer a.Unlock()
 
+	if a.config.DecoyList == nil {
+		a.config.DecoyList = &pb.DecoyList{}
+	}
 	a.config.DecoyList.TlsDecoys = decoys
 	err = a.saveClientConf()
 	return

+ 5 - 11
vendor/vendor.json

@@ -483,23 +483,17 @@
 			"revision": "94e85abb850729a5f54f383e8175e62931d04748",
 			"revisionTime": "2018-09-03T21:38:11Z"
 		},
-		{
-			"checksumSHA1": "bwonlVmjpR4hyzaTtBBYD+m+Sdo=",
-			"path": "github.com/sergeyfrolov/gotapdance",
-			"revision": "55566e09c166cb4d886c6a6090ca0c9d2ddc030d",
-			"revisionTime": "2018-11-02T17:06:22Z"
-		},
 		{
 			"checksumSHA1": "Ltd4VPMeRiXP4bpEqPKVkBZLMDM=",
 			"path": "github.com/sergeyfrolov/gotapdance/protobuf",
-			"revision": "55566e09c166cb4d886c6a6090ca0c9d2ddc030d",
-			"revisionTime": "2018-11-02T17:06:22Z"
+			"revision": "33726f6dfea4dd57e19b2c5749f5905423c3aa02",
+			"revisionTime": "2018-11-12T16:46:08Z"
 		},
 		{
-			"checksumSHA1": "HLNi+BOPYwiVggBFGClrl+rPOr8=",
+			"checksumSHA1": "9uDViXfp+dHpx2/DFArKSUJwxGU=",
 			"path": "github.com/sergeyfrolov/gotapdance/tapdance",
-			"revision": "55566e09c166cb4d886c6a6090ca0c9d2ddc030d",
-			"revisionTime": "2018-11-02T17:06:22Z"
+			"revision": "33726f6dfea4dd57e19b2c5749f5905423c3aa02",
+			"revisionTime": "2018-11-12T16:46:08Z"
 		},
 		{
 			"checksumSHA1": "Egp3n8yTaAuVtrA14LJrTWDgkO4=",