File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
wechaty-puppet-service/IO/Github/Wechaty/PuppetService Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,29 @@ docker run -ti --volume="$(pwd)":/bot --rm phpwechaty/php-wechaty:v1 docker/ding
6161
6262> Learn more about Wechaty Docker at [ Wiki: Docker ] ( https://github.com/Wechaty/php-wechaty/wiki/Docker ) .
6363
64+ #### New environment variables
65+
66+ <!-- markdownlint-disable MD013 -->
67+
68+ 1 . ` WECHATY_PUPPET_SERVICE_TLS_CA_CERT ` : can be overwrite by ` options.tlsRootCert ` . Set Root CA Cert to verify the server or client.
69+
70+ For Puppet Server:
71+
72+ | Environment Variable | Options | Description |
73+ | -------------------- | ------- | ----------- |
74+ | ` WECHATY_PUPPET_SERVICE_TLS_SERVER_CERT ` | ` options.tls.serverCert ` | Server CA Cert (string data) |
75+ | ` WECHATY_PUPPET_SERVICE_TLS_SERVER_KEY ` | ` options.tls.serverKey ` | Server CA Key (string data) |
76+ | ` WECHATY_PUPPET_SERVICE_NO_TLS_INSECURE_SERVER ` | ` options.tls.disable ` | Set ` true ` to disable server TLS |
77+
78+ For Puppet Client:
79+
80+ | Environment Variable | Options | Description |
81+ | -------------------- | ------- | ----------- |
82+ | ` WECHATY_PUPPET_SERVICE_AUTHORITY ` | ` options.authority ` | Service discovery host, default: ` api.chatie.io ` |
83+ | ` WECHATY_PUPPET_SERVICE_TLS_CA_CERT ` | ` options.caCert ` | Certification Authority Root Cert, default is using Wechaty Community root cert |
84+ | ` WECHATY_PUPPET_SERVICE_TLS_SERVER_NAME ` | ` options.serverName ` | Server Name (mast match for SNI) |
85+ | ` WECHATY_PUPPET_SERVICE_NO_TLS_INSECURE_CLIENT ` | ` options.tls.disable ` | Set ` true ` to disable client TLS |
86+
6487## The World's Shortest PHP ChatBot: 8 lines of Code
6588
6689### php
Original file line number Diff line number Diff line change @@ -792,6 +792,9 @@ function ($metadata,
792792 return $ metadataCopy ;
793793 };
794794 Logger::DEBUG ($ updateMetadata );
795+ // WECHATY_PUPPET_SERVICE_NO_TLS_INSECURE_CLIENT
796+ // WECHATY_PUPPET_SERVICE_TLS_CA_CERT
797+ // WECHATY_PUPPET_SERVICE_TLS_SERVER_NAME
795798 $ this ->_grpcClient = new \Wechaty \PuppetClient ($ hostname , [
796799 'credentials ' => \Grpc \ChannelCredentials::createInsecure (),
797800 'update_metadata ' => $ updateMetadata ,
You can’t perform that action at this time.
0 commit comments