improve - factory pattern

use factory pattern refactor ssl protocol module