Improvements of the agreement between SS Server and SS client for connectors.

Review and merge the branches refactor/context_script_on_client.