code: @SuppressWarnings("StringSplitter")
      protected String[] getProtocolList() {
          SSLSocket socket = null;
          String[] availableProtocols = null;
          final String[] preferredProtocols = settings.getString(
                  Settings.KEYS.DOWNLOADER_TLS_PROTOCOL_LIST,
                  "TLSv1.1,TLSv1.2,TLSv1.3")
                  .split(",");
          try {
              final SSLSocketFactory factory = sslCtxt.getSocketFactory();
              socket = (SSLSocket) factory.createSocket();
  
              availableProtocols = socket.getSupportedProtocols();
              Arrays.sort(availableProtocols);
              if (LOGGER.isDebugEnabled() && !protocolsLogged) {
                  protocolsLogged = true;
                  LOGGER.debug("Available Protocols:");
                  for (String p : availableProtocols) {
                      LOGGER.debug(p);
                  }
              }
          } catch (Exception ex) {
              LOGGER.debug("Error getting protocol list, using TLSv1.1-1.3", ex);
              return new String[]{"TLSv1.1", "TLSv1.2", "TLSv1.3"};
          } finally {
              if (socket != null) {
                  try {
                      socket.close();
                  } catch (IOException ex) {
                      LOGGER.trace("Error closing socket", ex);
                  }
              }
          }
  
          final List<String> aa = new ArrayList<>();
          for (String preferredProtocol : preferredProtocols) {
              final int idx = Arrays.binarySearch(availableProtocols, preferredProtocol);
              if (idx >= 0) {
                  aa.add(preferredProtocol);
              }
          }
  
          return aa.toArray(new String[0]);
      }
docs: Returns the protocol list.
  
  @return the protocol list