package org.holer.server.constant;

import io.netty.channel.Channel;
import io.netty.util.AttributeKey;
import java.util.Map;


public class ServerConst
{
  public static final AttributeKey<Map<String, Channel>> EXTRA_CLIENTS = AttributeKey.newInstance("EXTRA_CLIENT");
  
  public static final String OS_TYPE = System.getProperty("os.name").toLowerCase();
  
  public static final String SSL = "ssl";
  
  public static final String HOLER = "holer";
  
  public static final String EXTRA_CLIENT = "EXTRA_CLIENT";
  
  public static final String DOMAIN = "@DOMAIN@";
  
  public static final String PORT = "@PORT@";
  
  public static final String PROTOCOL = "@PROTOCOL@";
  
  public static final String LISTEN_PORT = "@LISTEN_PORT@";
  
  public static final String PROXY_CONF = "conf/proxy.conf";
  
  public static final String HOLER_CONF = "holer.conf";
  
  public static final String NGINX_CONF = "nginx.conf";
  
  public static final String HOLER_SSL_JKS = "conf/holer.jks";
  
  public static final String CONF = "conf";
  
  public static final String NGINX_SSL = "nginx-server.";
  
  public static final String HTTP = "http";
  
  public static final String HTTPS = "https";
  
  public static final String HTTPS_PORT = "443 ssl";
  
  public static final String HTTP_PORT = "80";
  
  public static final String SSL_CRT = "ssl_certificate";
  
  public static final String DOMAIN_RULE = "^[0-9a-zA-Z-.\\s]{3,64}$";
  
  public static final String KEY_RULE = "^[0-9a-zA-Z_-]{16,64}$";
  
  public static final String SERVER_RULE = "^[0-9a-zA-Z.-:]{3,64}$";
  
  public static final String EMAIL_RULE = "^[0-9a-zA-Z.@-]{6,64}$";
  
  public static final String SERVER_MSG = "conf/message.json";
  
  public static final String TOKEN = "NOSUM-AUTH-TOKEN";
  
  public static final String VIEW_LOGIN = "/login.html";
  
  public static final int MAX_EXTRA_CLIENTS = 256;
  
  public static final int MAX_PORT = 65535;
  
  public static final int MIN_PORT = 1;
  
  public static final int MAX_DAY = 1000;
  
  public static final long DEFAULT_VALID_DAY = 10L;
  
  public static final String DEFAULT_DOMAIN = "holer%s.";
  
  public static final String WISDOM_DOMAIN = "wdom.net";
  
  public static final int ONLINE = 1;
  
  public static final int OFFLINE = 0;
  
  public static final long ONE_KB = 1024L;
  
  public static final int DEFAULT_HTTP_PORT = 8080;
  
  public static final String API_PREFIX = "http://holer.%s/holer-api/";
  
  public static final String LICENSE = "license";
  
  public static final String KEY = "key";
  
  public static final String NGINX_RELOAD = " -p %s -s reload";
  
  public static final String INCLUDE_CONF = "    server_names_hash_bucket_size 256;\n    include    holer/*.conf;\n}";
  
  public static String WEB_SERVER_PORT = "server.port";
  
  public static String SERVER_DOMAIN = "holer.server.domain";
  
  public static String SERVER_HOST = "holer.server.host";
  
  public static String SERVER_PORT = "holer.server.port";
  
  public static String SSLSERVER_ENABLE = "holer.sslserver.enable";
  
  public static String SSLSERVER_HOST = "holer.sslserver.host";
  
  public static String SSLSERVER_PORT = "holer.sslserver.port";
  
  public static String HOLER_DOMAIN_NAME = "holer.domain.name";
  
  public static String HOLER_SERIAL_NO = "holer.license.serialno";
  
  public static String HOLER_NGINX_BIN = "holer.nginx.bin";
  
  public static String HOLER_NGINX_CONF = "holer.nginx.conf";
  
  public static String HOLER_NGINX_HOME = "holer.nginx.home";
}
