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

ClientLibrary fixes

- Always set RemoteServerListDownloadFilename when
  DataRootDirectory is not nil, as documented.

- NetworkID now may be blank, as tunnel-core
  has changed to enable tactics in this case.
Rod Hynes 7 лет назад
Родитель
Сommit
aa3f6c40b9
1 измененных файлов с 1 добавлено и 8 удалено
  1. 1 8
      ClientLibrary/clientlib/clientlib.go

+ 1 - 8
ClientLibrary/clientlib/clientlib.go

@@ -116,19 +116,12 @@ func StartTunnel(ctx context.Context,
 		config.DataStoreDirectory = *params.DataRootDirectory
 		config.ObfuscatedServerListDownloadDirectory = *params.DataRootDirectory
 
-		if *params.DataRootDirectory == "" {
-			config.RemoteServerListDownloadFilename = ""
-		} else {
-			config.RemoteServerListDownloadFilename = filepath.Join(*params.DataRootDirectory, "server_list_compressed")
-		}
+		config.RemoteServerListDownloadFilename = filepath.Join(*params.DataRootDirectory, "server_list_compressed")
 	}
 
 	if params.NetworkID != nil {
 		config.NetworkID = *params.NetworkID
 	}
-	if config.NetworkID == "" {
-		return nil, common.ContextError(fmt.Errorf("networkID must be non-empty"))
-	}
 
 	if params.ClientPlatform != nil {
 		config.ClientPlatform = *params.ClientPlatform