Browse Source

removed tool to prepare for v5

Shelikhoo 4 years ago
parent
commit
3138b3e815
2 changed files with 14 additions and 12 deletions
  1. 2 2
      infra/control/certchainhash.go
  2. 12 10
      infra/control/tlsping.go

+ 2 - 2
infra/control/certchainhash.go

@@ -5,7 +5,6 @@ import (
 	"fmt"
 	"io/ioutil"
 
-	"github.com/v2fly/v2ray-core/v4/common"
 	v2tls "github.com/v2fly/v2ray-core/v4/transport/internet/tls"
 )
 
@@ -42,5 +41,6 @@ func (c CertificateChainHashCommand) Execute(args []string) error {
 }
 
 func init() {
-	common.Must(RegisterCommand(&CertificateChainHashCommand{}))
+	// Do not release tool before v5's refactor
+	// common.Must(RegisterCommand(&CertificateChainHashCommand{}))
 }

+ 12 - 10
infra/control/tlsping.go

@@ -73,11 +73,12 @@ func (c *TLSPingCommand) Execute(args []string) error {
 			return newError("dial tcp").Base(err)
 		}
 		tlsConn := tls.Client(tcpConn, &tls.Config{
-			InsecureSkipVerify:    true,
-			NextProtos:            []string{"http/1.1"},
-			MaxVersion:            tls.VersionTLS12,
-			MinVersion:            tls.VersionTLS12,
-			VerifyPeerCertificate: showCert(),
+			InsecureSkipVerify: true,
+			NextProtos:         []string{"http/1.1"},
+			MaxVersion:         tls.VersionTLS12,
+			MinVersion:         tls.VersionTLS12,
+			// Do not release tool before v5's refactor
+			// VerifyPeerCertificate: showCert(),
 		})
 		err = tlsConn.Handshake()
 		if err != nil {
@@ -97,11 +98,12 @@ func (c *TLSPingCommand) Execute(args []string) error {
 			return newError("dial tcp").Base(err)
 		}
 		tlsConn := tls.Client(tcpConn, &tls.Config{
-			ServerName:            domain,
-			NextProtos:            []string{"http/1.1"},
-			MaxVersion:            tls.VersionTLS12,
-			MinVersion:            tls.VersionTLS12,
-			VerifyPeerCertificate: showCert(),
+			ServerName: domain,
+			NextProtos: []string{"http/1.1"},
+			MaxVersion: tls.VersionTLS12,
+			MinVersion: tls.VersionTLS12,
+			// Do not release tool before v5's refactor
+			// VerifyPeerCertificate: showCert(),
 		})
 		err = tlsConn.Handshake()
 		if err != nil {