license updated

This commit is contained in:
Yan
2017-12-22 16:33:12 +06:30
parent 3be8a56ac6
commit da4af7bfc5
8 changed files with 250 additions and 260 deletions

View File

@@ -36,20 +36,23 @@ class ApplicationController < ActionController::Base
# redirect_to root_url(:host => request.domain) + "store_error"
render :json => [{ status: false, message: 'Invalid Access!'}]
end
else
else
# check for license file
if check_license
current_license(ENV["SX_PROVISION_URL"])
else
redirect_to activate_path
end
end
end
def current_license(url)
@license = License.new(url)
if (@license.detail_with_local_file() == 0)
puts "Expired or No License!"
elsif (@license.detail_with_local_file() == 2)
puts "Expiring! pls, license extend..."
flag = @license.detail_with_local_file()
if (flag == 0)
flash[:notice] = 'Expired or No License!'
elsif (flag == 2)
flash[:notice] = 'Expiring! Please, License extend...'
else
puts "RUN SAY BYAR"
end
@@ -108,9 +111,8 @@ class ApplicationController < ActionController::Base
def check_license
if License.check_license_file
return true
else
redirect_to activate_path
end
return false
end
end

View File

@@ -1,6 +1,6 @@
class InstallController < BaseController
skip_before_action :verify_authenticity_token
before_action :check_license
# before_action :check_license
def index
end
@@ -17,20 +17,20 @@ class InstallController < BaseController
db_schema = params[:db_schema]
db_user = params[:db_user]
db_password = params[:db_password]
phrase = license_key
phrase = license_key
# Check Exists IV
if flag == "<%= ENV['AES_IV'] %>"
# Export for Key
aes = MyAesCrypt.new
aes_key, aes_iv = aes.export_key(phrase)
else
aes_key = ENV["AES_KEY"]
aes_iv = ENV["AES_IV"]
end
# if flag == "<%= ENV['AES_IV'] %>"
# # Export for Key
# aes = MyAesCrypt.new
# aes_key, aes_iv = aes.export_key(phrase)
# else
# aes_key = ENV["AES_KEY"]
# aes_iv = ENV["AES_IV"]
# end
@license = License.new(ENV["SX_PROVISION_URL"])
response = @license.license_activate(aes_key, aes_iv, license_key, db_host, db_schema, db_user, db_password)
response = @license.license_activate(restaurant, license_key, db_host, db_schema, db_user, db_password)
if response[:status]
redirect_to root_url, notice: response["message"]
else
@@ -38,7 +38,7 @@ class InstallController < BaseController
end
end
def check_license
def check_license
if License.check_license_file
redirect_to root_url
end

View File

@@ -68,31 +68,9 @@ class License
end
# For Local System
def detail_with_local_file()
# flag = ENV["AES_KEY"]
# # Check Exists IV
# if flag == "<%= ENV['AES_IV'] %>"
# # Export for Key
# aes = MyAesCrypt.new
# aes_key, aes_iv = aes.export_key(lookup)
# else
# aes_key = ENV["AES_KEY"]
# aes_iv = ENV["AES_IV"]
# end
def detail_with_local_file()
renewal_date_str = read_license("renewable_date")
# ##Check from local redis - if available load local otherwise get from remote
# renewable_date = "renewable_date:#{renewal_date_str}"
# ##Get redis connection from connection pool
# redis = Redis.new
# cache_renewable_date = redis.get(renewable_date)
# if cache_renewable_date.nil?
# redis = Redis.new
# redis.set(renewable_date, Marshal.dump(@license))
# else
# get_renewable_date = Marshal.load(cache_renewable_date)
if check_expiring(renewal_date_str)
# return for all ok
return 1
@@ -110,13 +88,34 @@ class License
end
# License Activation
def license_activate (key, iv, license_key, db_host, db_schema, db_user, db_password)
@params = { query: { lookup_type: self.server_mode, iv_key: iv, license_key: license_key } }
def license_activate (shop, license_key, db_host, db_schema, db_user, db_password)
aes = MyAesCrypt.new
aes_key, aes_iv = aes.export_key(license_key)
@params = { query: { lookup_type: self.server_mode, iv_key: aes_iv, license_key: license_key } }
response = self.class.get("/activate", @params)
@activate = response.parsed_response
Rails.logger.debug "License Remote Response - " + response.parsed_response.to_s
if (@activate["status"])
##Check from local redis - if available load local otherwise get from remote
cache_key = "shop:#{@activate["shop_name"]}"
cache_license = nil
##Get redis connection from connection pool
redis = Redis.new
cache_license = redis.get(cache_key)
Rails.logger.info "Cache key - " + cache_key.to_s
if cache_license.nil?
cache = {"shop" => @activate["shop_name"], "key" => aes_key, "iv" => @activate["iv_key"], "renewable_date" => @activate["renewable_date"] }
redis = Redis.new
redis.set(cache_key, Marshal.dump(cache))
end
Rails.logger.info "License - " + response.parsed_response.to_s
response = create_license_file(@activate)
if(response[:status])
sym_path = "/home/yan/symmetric/"
@@ -149,19 +148,21 @@ class License
end
# Check Expired before 30 days
def check_expiring(renewal_date_str)
renewal_date = DateTime.parse(renewal_date_str)
renewal_date > Date.today.advance(:days => 30)
def check_expiring(renewal_date_str)
if !renewal_date_str.empty?
renewal_date = DateTime.parse(renewal_date_str)
renewal_date > Date.today.advance(:days => 30)
end
end
# Check License expired date from PROVISION SERVER
def check_expired(renewal_date_str)
def check_expired(renewal_date_str)
expired_date_str = read_license("renewable_date")
expired_date = DateTime.parse(expired_date_str)
renewal_date = DateTime.parse(renewal_date_str)
if(renewal_date != expired_date){
if(renewal_date_str != expired_date_str)
update_license("renewable_date", renewal_date_str)
}
end
if (renewal_date < Date.today)
return true
@@ -176,16 +177,18 @@ class License
end
# read line by key for license file
def read_license(key)
decrypted_line = ""
def read_license(key_name)
decrypted_line = ""
key, iv = get_redis_key()
if File.exist?("config/license.yml")
File.open("config/license.yml").each do |line|
if line.include? (key)
decrypted_line_array = line.split(": ")
decrypted_line = AESCrypt.decrypt_data(decode_str(decrypted_line_array[1]), decode_str(ENV['AES_KEY']), decode_str(ENV['AES_IV']), ENV['CIPHER_TYPE'])
if line.include? (key_name)
decrypted_line_array = line.split(": ")
decrypted_line = AESCrypt.decrypt_data(decode_str(decrypted_line_array[1]), decode_str(key), decode_str(iv), ENV['CIPHER_TYPE'])
end
end
end
end
return decrypted_line
end
@@ -205,18 +208,19 @@ class License
# Update license file for line
def update_license(content, new_content)
if !new_content.include? "=="
str = encode_str(new_content)
crypted_str = AESCrypt.encrypt_data(str, ENV['AES_KEY'], ENV['AES_IV'], ENV['CIPHER_TYPE'])
end
key, iv = get_redis_key()
if !new_content.include? "=="
crypted_str = AESCrypt.encrypt_data(new_content, decode_str(key), decode_str(iv), ENV['CIPHER_TYPE'])
end
content_str = read_license_no_decrypt(content)
if File.exist?("config/license.yml")
file_str = File.read("config/license.yml")
new_file_str = file_str.gsub(content, crypted_str)
new_file_str = file_str.gsub(content_str, encode_str(crypted_str))
# To write changes to the file, use:
# File.open("config/license.yml", "w") {|file| file.puts new_file_str }
File.open("config/license.yml", "w") {|file| file.puts new_file_str }
# File.open("config/license.yml").each do |line|
# new_file_str = line.gsub(content, crypted_str)
@@ -225,189 +229,187 @@ class License
end
end
private
def encode_str(str)
return Base64.encode64(str)
private
def get_redis_key
iv = ""
key = ""
shop = read_license_no_decrypt("shop_name")
##Check from local redis - if available load local otherwise get from remote
cache_key = "shop:#{shop.chomp}"
cache_shop = nil
##Get redis connection from connection pool
redis = Redis.new
cache_shop = redis.get(cache_key)
if !cache_shop.nil?
@shop = Marshal.load(cache_shop)
key = @shop["key"]
iv = @shop["iv"]
end
return key, iv
end
def encode_str(str)
return Base64.encode64(str)
end
def decode_str(str)
return Base64.decode64(str)
end
# License File Creation
def create_license_file(response_data)
if File.exist?("config/license.yml")
delete_license_file
end
def decode_str(str)
return Base64.decode64(str)
begin
# Licese File Creation
File.open("config/license.yml", "w") do |f|
f.puts("iv_key: #{response_data['iv_key']}")
f.puts("shop_name: #{response_data['shop_name']}")
f.puts("email: #{response_data['email']}")
f.puts("telephone: #{response_data['telephone']}")
f.puts("fax: #{response_data['fax']}")
f.puts("address: #{response_data['address']}")
f.puts("dbhost: #{response_data['dbhost']}")
f.puts("dbschema: #{response_data['dbschema']}")
f.puts("dbusername: #{response_data['dbusername']}")
f.puts("dbpassword: #{response_data['dbpassword']}")
f.puts("api_token: #{response_data['api_token']}")
f.puts("app_token: #{response_data['app_token']}")
f.puts("plan_sku: #{response_data['plan_sku']}")
f.puts("renewable_date: #{response_data['renewable_date']}")
f.puts("plan_name: #{response_data['plan_name']}")
end
rescue IOError
response = { "status": false, "message": "Activation is success but something is wrong. \n Please contact code2lab call center!"}
end
response = { "status": true, "message": "Success Activation. License also created."}
end
# License File Creation
def create_license_file(response_data)
if File.exist?("config/license.yml")
delete_license_file
end
# Symmetric Configuration
def create_symmetric_config(sym_location, db_host, db_schema, db_user, db_password)
if File.directory? (sym_location)
begin
# Licese File Creation
File.open("config/license.yml", "w") do |f|
f.puts("iv_key: #{response_data['iv_key']}")
f.puts("shop_name: #{response_data['shop_name']}")
f.puts("email: #{response_data['email']}")
f.puts("telephone: #{response_data['telephone']}")
f.puts("fax: #{response_data['fax']}")
f.puts("address: #{response_data['address']}")
f.puts("dbhost: #{response_data['dbhost']}")
f.puts("dbschema: #{response_data['dbschema']}")
f.puts("dbusername: #{response_data['dbusername']}")
f.puts("dbpassword: #{response_data['dbpassword']}")
f.puts("api_token: #{response_data['api_token']}")
f.puts("app_token: #{response_data['app_token']}")
f.puts("plan_sku: #{response_data['plan_sku']}")
f.puts("renewable_date: #{response_data['renewable_date']}")
f.puts("plan_name: #{response_data['plan_name']}")
end
# sx properties create
f = File.open(sym_location + "engines/sx.properties", "w")
f.write("engine.name=sx\n")
f.write("db.driver=com.mysql.jdbc.Driver\n")
f.write("db.url=jdbc:mysql://#{db_host}/#{db_schema}?tinyInt1isBit=false\n")
f.write("db.user=#{db_user}\n")
f.write("db.password=#{db_password}\n")
f.write("registration.url=\n")
f.write("sync.url=http://#{db_host}:31415/sync/sx\n")
f.write("group.id=sx\n")
f.write("external.id=000\n")
f.write("job.purge.period.time.ms=7200000\n")
f.write("job.routing.period.time.ms=5000\n")
f.write("job.push.period.time.ms=10000\n")
f.write("job.pull.period.time.ms=10000\n")
f.write("initial.load.create.first=true\n")
f.write("initial.load.use.extract.job.enabled=true\n")
f.close
# read from license file
shop_name = read_license_no_decrypt("shop_name")
dbhost = read_license("dbhost")
dbschema = read_license("dbschema")
dbusername = read_license("dbusername")
dbpassword = read_license("dbpassword")
# shop properties create
f = File.open(sym_location + "engines/#{shop_name}.properties", "w")
f.write("engine.name=#{shop_name}\n")
f.write("db.driver=com.mysql.jdbc.Driver\n")
f.write("db.url=jdbc:mysql://#{dbhost}/#{dbschema}?tinyInt1isBit=false\n")
f.write("db.user=#{dbusername}\n")
f.write("db.password=#{dbpassword}\n")
f.write("registration.url=http://#{db_host}:31415/sync/sx\n")
f.write("group.id=store\n")
f.write("external.id=001\n")
f.write("job.routing.period.time.ms=5000\n")
f.write("job.push.period.time.ms=10000\n")
f.write("job.pull.period.time.ms=10000\n")
# f.write("initial.load.create.first=true\n")
# f.write("initial.load.use.extract.job.enabled=true\n")
f.close
rescue IOError
response = { "status": false, "message": "Activation is success but something is wrong. \n Please contact code2lab call center!"}
end
response = { "status": true, "message": "Success Activation. License also created."}
end
end
# Symmetric Configuration
def create_symmetric_config(sym_location, db_host, db_schema, db_user, db_password)
if File.directory? (sym_location)
begin
# sx properties create
f = File.open(sym_location + "engines/sx.properties", "w")
f.write("engine.name=sx\n")
f.write("db.driver=com.mysql.jdbc.Driver\n")
f.write("db.url=jdbc:mysql://#{db_host}/#{db_schema}?tinyInt1isBit=false\n")
f.write("db.user=#{db_user}\n")
f.write("db.password=#{db_password}\n")
f.write("registration.url=\n")
f.write("sync.url=http://#{db_host}:31415/sync/sx\n")
f.write("group.id=sx\n")
f.write("external.id=000\n")
f.write("job.purge.period.time.ms=7200000\n")
f.write("job.routing.period.time.ms=5000\n")
f.write("job.push.period.time.ms=10000\n")
f.write("job.pull.period.time.ms=10000\n")
f.write("initial.load.create.first=true\n")
f.write("initial.load.use.extract.job.enabled=true\n")
f.close
# Run Symmetric
def run_symmetric(sym_path)
# check_sym_proc_str = `#{sym_path + "bin/sym_service status"}`
# check_sym_proc_str = check_sym_proc_str.split("\n")
# sym_install_status = check_sym_proc_str[0].split(": ")
check_sym_proc_str = `#{"service SymmetricDS status"}`
# read from license file
shop_name = read_license("shop_name")
dbhost = read_license("dbhost")
dbschema = read_license("dbschema")
dbusername = read_license("dbusername")
dbpassword = read_license("dbpassword")
# Check Sym Installed
# if sym_install_status[1] == "false"
# response = { "status": false, "message": "Activation is success but Symmetric service not Installed. \n Please contact code2lab call center!"}
# end
# shop properties create
f = File.open(sym_location + "engines/#{shop_name}.properties", "w")
f.write("engine.name=#{shop_name}\n")
f.write("db.driver=com.mysql.jdbc.Driver\n")
f.write("db.url=jdbc:mysql://#{dbhost}/#{dbschema}?tinyInt1isBit=false\n")
f.write("db.user=#{dbusername}\n")
f.write("db.password=#{dbpassword}\n")
f.write("registration.url=http://#{db_host}:31415/sync/sx\n")
f.write("group.id=store\n")
f.write("external.id=001\n")
f.write("job.routing.period.time.ms=5000\n")
f.write("job.push.period.time.ms=10000\n")
f.write("job.pull.period.time.ms=10000\n")
# f.write("initial.load.create.first=true\n")
# f.write("initial.load.use.extract.job.enabled=true\n")
f.close
rescue IOError
response = { "status": false, "message": "Activation is success but something is wrong. \n Please contact code2lab call center!"}
end
response = { "status": true, "message": "Success Activation. License also created."}
end
end
# Run Symmetric
def run_symmetric(sym_path)
# check_sym_proc_str = `#{sym_path + "bin/sym_service status"}`
# check_sym_proc_str = check_sym_proc_str.split("\n")
# sym_install_status = check_sym_proc_str[0].split(": ")
check_sym_proc_str = `#{"service SymmetricDS status"}`
# Check Sym Installed
# if sym_install_status[1] == "false"
# response = { "status": false, "message": "Activation is success but Symmetric service not Installed. \n Please contact code2lab call center!"}
# end
# Run Sym Service
sym_run_status = check_sym_running(check_sym_proc_str, sym_path)
if sym_run_status
# Create Sym Table
check_sym_table = system(sym_path + "bin/symadmin --engine sx create-sym-tables")
if check_sym_table
sym_sql = Rails.root + "db/sym_master.sql"
if File.exist? (sym_sql)
# Import Sym Sql to db and start sym
run_sym_sql = system(sym_path + "bin/dbimport --engine sx " + sym_sql.to_s)
stop_sym = system("service SymmetricDS stop")
run_sym = system("service SymmetricDS start")
if run_sym
response = { "status": true, "message": "Activation is success and Configuration done..."}
end
else
response = { "status": false, "message": "Activation is success but Symmetric Sql not found. \n Please contact code2lab call center!"}
# Run Sym Service
sym_run_status = check_sym_running(check_sym_proc_str, sym_path)
if sym_run_status
# Create Sym Table
check_sym_table = system(sym_path + "bin/symadmin --engine sx create-sym-tables")
if check_sym_table
sym_sql = Rails.root + "db/sym_master.sql"
if File.exist? (sym_sql)
# Import Sym Sql to db and start sym
run_sym_sql = system(sym_path + "bin/dbimport --engine sx " + sym_sql.to_s)
stop_sym = system("service SymmetricDS stop")
run_sym = system("service SymmetricDS start")
if run_sym
response = { "status": true, "message": "Activation is success and Configuration done..."}
end
else
response = { "status": false, "message": "Activation is success but Symmetric Sql not found. \n Please contact code2lab call center!"}
end
else
response = { "status": false, "message": "Activation is success but Symmetric not running. \n Please contact code2lab call center!"}
end
else
response = { "status": false, "message": "Activation is success but Symmetric not running. \n Please contact code2lab call center!"}
end
end
# Check Symmetric Running
def check_sym_running(status, sym_path)
# Run Sym Service
# if status.include? "Server is already running"
# return true
# elsif status.include? "false"
# sym_start_str = `#{sym_path + "bin/sym_service start"}`
# if sym_start_str.include? "Started"
# return true
# else
# check_sym_running(sym_start_status[0])
# end
# else
# return true
# end
# Check Symmetric Running
def check_sym_running(status, sym_path)
# Run Sym Service
# if status.include? "Server is already running"
# return true
# elsif status.include? "false"
# sym_start_str = `#{sym_path + "bin/sym_service start"}`
# if sym_start_str.include? "Started"
# return true
# else
# check_sym_running(sym_start_status[0])
# end
# else
# return true
# end
if status.include? "Active: active (running)" #"Server is already running"
return true
end
return false
if status.include? "Active: active (running)" || "Active: active (exited)" #"Server is already running"
return true
end
return false
end
# Delete License File
def delete_license_file
File.delete("config/license.yml") if File.exist?("config/license.yml")
end
# Delete License File
def delete_license_file
File.delete("config/license.yml") if File.exist?("config/license.yml")
end
# Assign db info for Cloud
def assign(aes_key, aes_iv)
# self.name = @license["name"]
# self.address_1 = @license["address_1"]
# self.address_2 = @license["address_2"]
# self.township = @license["township"]
# self.city = @license["city"]
# self.country = @license["country"]
# self.email = @license["email"]
# self.phone = @license["phone"]
# self.fax = @license["fax"]
# self.logo = @license["logo"]
# self.localhost_address = @license["localhost_address"]
# self.subdomain = @license["subdomain"]
# self.plan_activation_date = Date.parse(@license["plan_activation_date"])
# self.plan_next_renewal_date = Date.parse(@license["plan_next_renewal_date"])
## self.plan_activation_date = Date.strptime(@license["plan_activation_date"], "%Y-%m-%d")
## self.plan_next_renewal_date = Date.strptime(@license["plan_next_renewal_date"], "%Y-%m-%d")
# self.plan_max_products = @license["plan_max_products"].to_i
# self.plan_max_customers = @license["plan_max_customers"].to_i
# self.plan_active_connections = @license["plan_active_connections"].to_i
# salt = @license["secret_key"]
def assign(aes_key, aes_iv)
key = Base64.decode64(aes_key)
iv = Base64.decode64(aes_iv)
@@ -422,18 +424,6 @@ class License
self.dbusername = AESCrypt.decrypt_data(dbusername, key, iv, ENV['CIPHER_TYPE'])
self.dbpassword = AESCrypt.decrypt_data(dbpassword, key, iv, ENV['CIPHER_TYPE'])
end
# self.exchange_unqiue_id = @license["exchange_unqiue_id"]
# self.localqueue_host= @license["localqueue_host"]
# self.localqueue_user= @license["localqueue_user"]
# self.localqueue_password= @license["localqueue_password"]
# self.remotequeue_host = @license["remotequeue_host"]
# self.remotequeue_user = @license["remotequeue_user"]
# self.remotequeue_password = @license["remotequeue_password"]
# self.api_token = @license["api_token"]
# self.app_token = @license["app_token"]
end
end

View File

@@ -17,8 +17,7 @@ class MyAesCrypt
passphrase = passphrase + ENV['SX_KEY']
passphrase = passphrase.gsub(".","_")
digest = Digest::SHA256.new
key_digest = digest.update(passphrase)
# iv_digest = digest.update(iv_salt)
key_digest = digest.update(passphrase)
key = key_digest.digest
# iv = iv_digest.digest

View File

@@ -9,6 +9,7 @@ if (menu.menu_categories)
json.id category.id
json.name category.name
json.alt_name category.alt_name
json.order_by category.order_by
json.parent_id category.menu_category_id
json.is_available category.is_available

View File

@@ -1,15 +1,15 @@
iv_key: A30HZdW+iDZA0vM5PAqwgg==
shop_name: 7DdPBxVo8m1xpa5T2kIcWQ==
email: yanaung.nyein@code2lab.com
telephone: 111111
fax: 111111
address: bitp
dbhost: 9+83FZetcbLZi6COG5PbSw==
dbschema: shztSYIsNmM9nlHkR/4exQ==
dbusername: LapN+Geriht8yk866FxNiQ==
dbpassword: QtboWZ4ATE05vvYw6J+Uqw==
api_token: nGyMizHtoVEFYCjSVEFJuzkxuBJwSsH
app_token: QUdPwSakcsnuVLdfkXgGHhPMiIOcSSfaVwQyA
plan_sku: 9+83FZetcbLZi6COG5PbSw==
renewable_date: shztSYIsNmM9nlHkR/4exQ==
plan_name: LapN+Geriht8yk866FxNiQ==
iv_key: TP8dIx4nBGzr+tYyKn5+Xw==
shop_name: Osaka
email: wathonaun9@gmail.com
telephone: 09979204288
fax: 09979204288
address: Yangon
dbhost: nk57NaR38B2eSYyron3Nbw==
dbschema: 3orxFaTi0uQhatBqZGiitQ==
dbusername: EtMle9Gr0/PE3NFHHfwo5A==
dbpassword: 86h61/O38GGo64nekz6oeA==
api_token: FVAGMnjVdaScfydXMbMvPPRWnkEwCSuxs
app_token: IoXPdqzbnQWbHsnxLAjMjimnjEJNySOeIo
plan_sku: PyQJ2sk5NZTudqQ2YIU16A==
renewable_date: d/Fk1deU/iPbZFDOdyKsjA==
plan_name: weWOqr1tZ61Av6YKth1lDw==

View File

@@ -12,6 +12,7 @@ scope "(:locale)", locale: /en|mm/ do
#--------- SmartSales Activation ------------#
get 'activate' => 'install#index'
post 'activate' => 'install#activate'
get 'run_sym' => 'sym_control#run'
#--------- Login/Authentication ------------#
get 'auth/:emp_id' => 'home#show', as: :emp_login

View File

@@ -12,12 +12,10 @@
development:
secret_key_base: b61d85f8ed2a1a9e0eeece3443b3e8f838d002cc1d9f32115d8e93db920e2957adfedc57501d44741211538f3108b742cdeada87d5bfae796c53da1f90a3cd61
sx_provision_url: 192.168.1.147:3002/api #connect.smartsales.asia/api #provision.zsai.ws/api
sx_provision_url: 192.168.1.49:3002/api #connect.smartsales.asia/api #provision.zsai.ws/api
server_mode: application
cipher_type: AES-256-CBC
sx_key: Wh@t1$C2L
aes_key: <%= ENV['AES_KEY'] %>
aes_iv: <%= ENV['AES_IV'] %>
test:
secret_key_base: 5c92143fd4a844fdaf8b22aba0cda22ef1fc68f1b26dd3d40656866893718ae5e58625b4c3a5dc86b04c8be0a505ec0ebc0be3bf52249a3d1e0c1334ee591cf0
@@ -28,7 +26,6 @@ production:
secret_key_base: c4bc81065013f9a3506d385bcbd49586c42e586488144b0de90c7da36867de9fa880f46b5c4f86f0ce9b7c783bb5a73bdb0e5605a47716567294390e726d3e22
sx_provision_url: provision.zsai.ws/api #192.168.1.94:3002
server_mode: cloud
cipher_type: AES-256-CBC
sx_key: Wh@t1$C2L
aes_key: <%= ENV['AES_KEY'] %>
aes_iv: <%= ENV['AES_IV'] %>