Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit f696d72

Browse files
add wechaty ca, see #16
1 parent 9ddc238 commit f696d72

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

‎README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff 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

‎wechaty-puppet-service/IO/Github/Wechaty/PuppetService/PuppetService.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff 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,

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /