docs: private JSONObject getConfiguration() throws JSONException {
      JSONObject configuration = new JSONObject();
  
      configuration.put("port", config.getPort());
      configuration.put("register", true);
  
      if (config.getProxy() != null) {
        configuration.put("proxy", config.getProxy());
      } else {
        configuration.put("proxy", "org.openqa.grid.selenium.proxy.DefaultRemoteProxy");
      }
      configuration.put("role", "node");
      configuration.put("registerCycle", config.getRegisterCycle());
      if (config.getMaxSession() == 0) {
        configuration.put("maxSession", driver.getSupportedDevices().length());
      } else {
        configuration.put("maxSession", config.getMaxSession());
      }
      configuration.put("browserTimeout", config.getSessionTimeoutMillis() / 1000);
      configuration.put("cleanupCycle", config.getCleanupCycle());
      configuration.put("timeout", config.getTimeout());
      configuration.put("nodePolling", config.getNodePolling());
      configuration.put("unregisterIfStillDownAfter", config.getUnregisterIfStillDownAfter());
      configuration.put("downPollingLimit", config.getDownPollingLimit());
      configuration.put("nodeStatusCheckTimeout", config.getNodeStatusCheckTimeout());
  
      // adding hub details
      configuration.put("hubHost", hub.getHost());
      configuration.put("hubPort", hub.getPort());
  
      // adding driver details
      configuration.put("seleniumProtocol", "WebDriver");
      configuration.put("host", config.getServerHost());
      configuration.put("remoteHost", "http://" + config.getServerHost() + ":" + config.getPort());
      return configuration;
    }