Configuration

Skynet configuration is placed in file:
/src/SkynetUser/SkynetConfig.php

When compiling, this file will be included at the beginning of compiled standalone version.
Remember that you must recompile all of your clusters (or update config manually) when you will change configuration data.

Configuration options:



const KEY_ID -> string default: '1234567890'
Your Skynet Key ID

const PASSWORD -> string default: ''
Admin password for Skynet Control Panel

private static $config = [

A) Core configuration - base options:



core_secure -> bool:[true|false] default: true
If TRUE, Skynet will verify KEY ID in every response, if FALSE - you will able to connect without key (USE THIS ONLY FOR TESTS!!!)

core_raw -> bool:[true|false] default: false
If TRUE all sending and receiving data will be encrypted, if FALSE - all data will be send in plain text

core_updater -> bool:[true|false] default: true
If TRUE Skynet will enable self-remote-update engine, if FALSE - self-remote-engine will be disabled

core_cloner -> bool:[true|false] default: false
If TRUE - cloner will be enabled and listening for clone command */

core_check_new_versions -> bool:[true|false] default: true
Enables or disables new version check

core_urls_chain -> bool:[true|false] default: true
If TRUE - Skynet will include urls chain to requests/responses and will be updates new clusters from it

core_mode -> integer:[0|1|2] default: 2
Default Skynet Mode. 0 = Idle, 1 = Single, 2 = Broadcast
This is uses by Control Panel by default when you opens Control Panel

core_encryptor -> string:[openSSL|mcrypt|base64|...] default: 'openSSL'
Name of registered class used for encrypting data

core_encryptor_algorithm -> string default: 'aes-256-ctr'
Algorithm for OpenSSL encryption

core_renderer_theme -> string:[dark|light|raw|...] default: 'dark'
Theme CSS for HTML Renderer

core_date_format -> string default: 'H:i:s d.m.Y'
Date format for date() function

core_admin_ip_whitelist -> string[] default: []
IP Whitelist for accepting access to Control Panel. If array is empty then Control Panel allows access from all IP's
If array have IP addresses then Control Panel will be accessible only from this addresses

core_open_sender -> bool:[true|false] default: false
If TRUE then Skynet will always sends requests when open (without login to Control Panel)
If FALSE then Skynet will sends requests only when logged in Control Panel


B) Client configuration



client_registry -> bool:[true|false] default: false
If TRUE, Skynet Client will store clusters in its registry
If FALSE then Skynet Client will not store remote clusters addresses in its database

client_registry_responder -> bool:[true|false] default: false
If TRUE, Skynet Responder will save cluster when receive connection from client
If FALSE then Skynet Responder will not store Client addresses.


C) Translate configuration - Control Panel display mode:



translator_config -> bool:[true|false] default: true
If TRUE config view will be translated

translator_params -> bool:[true|false] default: true
If TRUE Skynet inetrnal params will be translated


D) Core configuration - connections with clusters:



core_connection_mode -> string:[host|ip] default: 'host'
Specified connection addresses by host or IP.
Skynet can work by hostnames or by IP addresses - it can be set here.

core_connection_type -> string:[curl|file_get_contents|...] default: 'curl'
Name of registered class used for connection with clusters

core_connection_protocol -> string:[http|https] default: 'http://'
Connections protocol (http:// or https://)

core_connection_ssl_verify -> bool:[true|false] default: false
Only for cURL, set to FALSE to disable verification of SSL certificates

core_connection_curl_output -> bool:[true|false] default: false
If true CURL will display connection output in CLI mode (VERBOSE OPTION)

core_connection_ip_whitelist -> string[] default: []
IP Whitelist for accepting requests from, if empty then all IP's has access to response


E) Emailer configuration:



core_email_send -> bool:[true|false] default: true
TRUE for enable auto-emailer engine for responses, FALSE to disable

core_email_send -> bool:[true|false] default: true
TRUE for enable auto-emailer engine for requests, FALSE to disable

core_email_address -> [email] default: 'your@email.com'
Specify email address for receiving emails from Skynet


F) Response:



response_include_request -> bool:[true|false] default: true
If TRUE, response will be attaching requests data with @ prefix, if FALSE requests data will not be included into response


G) Logs:



logs_errors_with_full_trace -> bool:[true|false] default: true
If TRUE then Skynet will save full debug trace in errors logs

logs_txt_include_secure_data -> bool:[true|false] default: true
Set TRUE to log Skynet Key ID and Hash (use this only for debug, not in production

logs_txt_include_clusters_data -> bool:[true|false] default: true
Set TRUE to log clusters URLs and clusters chain (use this only for debug, not in production

logs_dir -> string:[path/] default: 'logs/'
Specify path to dir where Skynet will save logs, or leave empty to save logs in Skynet directory

logs_txt_* -> bool:[true|false] default: true
Enable or disable txt logs for specified Event

logs_txt_include_internal_data -> bool:[true|false] default: true
If TRUE, Skynet will include internal params in txt logs

logs_db_* -> bool:[true|false] default: true
Enable or disable database logs for specified Event

logs_db_include_internal_data -> bool:[true|false] default: false
If TRUE, Skynet will include internal params in database logs


H) Database configuration:



db -> bool:[true|false] default: true
Enable or disable database support. If disabled some of functions of Skynet will not work

db_type -> string:[dsn] default: 'sqlite'
Specify adapter for PDO (sqlite is recommended)


db_host -> string default: '127.0.0.1'
Database host

db_user -> string default: 'root'
Database username

db_password -> string default: ''
Database password

db_dbname -> string default: 'skynet'
Database name

db_encoding -> string default: 'utf-8'
Database encoding

db_port -> integer default: 3306
Database port

db_file -> string:[filename] default: ''
SQLite database filename, leave empty to let Skynet specify names itself (recommended)

db_file -> string:[path/] default: ''
SQLite database path, if empty db will be created in Skynet directory


I) Debug options



console_debug -> bool:[true|false] default: true
If TRUE, console command debugger will be displayed in Control Panel when parsing input

debug_exceptions -> bool:[true|false] default: false
If TRUE, debugger will show more info like line, file and trace on errors in Control Panel

debug_internal -> bool:[true|false] default: true
If TRUE, internal params will be displayed in connection data

debug_echo -> bool:[true|false] default: true
If TRUE, internal @echo params will be show in Control Panel

debug_key -> bool:[true|false] default: true
If TRUE, KEY ID will be displayed in Control Panel
Full API Documentation is included in Skynet packages available on GitHub.