Commit Graph

63 Commits

Author SHA1 Message Date
Bo-Yi Wu c379630c29
chore(graceful): support custom timeout value (#466)
fixed: https://github.com/appleboy/gorush/issues/465
2020-02-05 23:23:16 +08:00
Keisuke Emi 1edfa9f532 Support HTTP proxy for APNs (#445) 2019-12-08 07:30:24 +08:00
Yassir Barchi 3812d357fd feat: add async feedback hook option (#414)
* feat: add async feedback hook option

* remove unnecessary return values

* review: check feedback's resp state

* fix embedmd error

* fix config test

* add feedback tests

* fix errcheck issues
2019-09-06 15:48:42 +08:00
Bo-Yi Wu 3f223cf6c0
feat: switch to drone 1.0 (#399)
fix #397
2019-03-16 11:37:01 +08:00
Bo-Yi Wu 4f0f9f95a9 chore(config): check error from load yaml config. 2018-08-15 14:56:52 +08:00
sysradium bcf18d662a Set IOS key_path to an empty string (#359)
At the moment you can't start gorush with IOS base64 certificate provided using an ENV var. 

Apparently viper uses default value for the configuration field even if you set env var to an empty string. So `if var is not set` or `is set and string is empty` => default value.

Which means that if I only use env vars for configuration and I want to use IOS certificate in base64 I can not set `cert_path` to an empty string, so `gorush` uses base64 cert:

https://github.com/appleboy/gorush/blob/master/gorush/notification.go#L180

I.e.:
```
ORUSH_IOS_ENABLED=true GORUSH_IOS_KEY_PATH="" GORUSH_IOS_KEY_TYPE=p12  GORUSH_IOS_KEY_BASE64="SOME_BASE64" go run main.go
(config.SectionIos) {
 Enabled: (bool) true,
 KeyPath: (string) (len=7) "key.pem", <--- still key.pem
 KeyBase64: (string) (len=2) "SOME_BASE64",
 KeyType: (string) (len=3) "p12",
 Password: (string) "",
 Production: (bool) false,
 MaxRetry: (int) 0,
 KeyID: (string) "",
 TeamID: (string) ""
}
FATA[2018/06/10 - 12:42:09] certificate file does not exist
```
So by default `KeyPath` should an empty string. Then I can set only if I want.
2018-06-20 09:34:49 +08:00
Bo-Yi Wu 2d2f62d19b
feat(iOS): load iOS key from base64 input. (#336)
* feat(iOS): load iOS key from base64 input.

* test: check key type exist.
2018-02-18 17:12:51 +08:00
Bo-Yi Wu e99692717c support custom url for health URI. (#302)
* support custom url for health URI.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* fix readme

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-10-25 21:19:58 -05:00
Bo-Yi Wu c06e819e08 Support new Apple Token Based Authentication (JWT) (#300)
* Support new Apple Token Based Authentication (JWT)

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* fix testing

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-10-25 03:49:23 -05:00
Bo-Yi Wu f3480d2dd8 Support global ENV setting. (#293)
* Support global ENV setting.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* add viper package

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* fix typo

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* fix testing.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* fix testing.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-10-22 22:06:30 -05:00
Bo-Yi Wu 6d29e638b4 change grpc port to 9000 (#291)
* change grpc port to 9000

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>

* change grpc port to 9000

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-10-18 20:24:47 -05:00
Bo-Yi Wu e070248a11 fix lint error for gorush folder. (#275)
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-08-23 21:46:00 -05:00
Bo-Yi Wu 83d155bade docs(config): add bind address doc. (#264) 2017-07-31 16:37:56 +08:00
Simone Basso a714d03e2c feature(server): allow to bind specific addresses (#263)
The main use case for ooniprobe is to bind 127.0.0.1 only.
2017-07-31 16:31:07 +08:00
Bo-Yi Wu 00ff0248a2 feat(config): enable or disable httpd server. (#262) 2017-07-27 11:19:36 +08:00
Bo-Yi Wu a2143d4fce docs(readme): add grpc documentation. 2017-07-26 09:38:28 +08:00
Bo-Yi Wu 41a8a609be feat(config): add grpc config. (#255) 2017-07-24 18:58:30 +08:00
Bo-Yi Wu 77bce18c9f feat: upgrade gcm to fcm (#231)
https://github.com/edganiukov/fcm

fix #230
2017-05-31 22:56:10 -05:00
Bo-Yi Wu a16196d56a docs: [ci skip] improve comment. 2017-04-12 10:59:40 +08:00
Bo-Yi Wu 672b50f07f docs: [ci skip] update readme 2017-04-10 11:53:42 +08:00
Bo-Yi Wu b6997ea792 feat: support sync mode for http response. (#208)
* feat: support sync mode for http response.

* fix: update readme.

* fix: check wg exist.

* fix: testing sync mode.
2017-04-06 15:00:49 +08:00
Bo-Yi Wu 97eae1fab4 feat: support Automatically install TLS certificates from Let's Encrypt. (#205)
* feat: support Automatically install TLS certificates from Let's Encrypt.

* refactor: update tls server.

* fix: missing tls package.

* fix: drop 1.6.x support

* docs: update readme.

* fix: listen tcp :443: bind: permission denied
2017-04-05 12:03:43 +08:00
Bo-Yi Wu e9dc429cb8 feat: embed code into markdown and keep everything in sync (#191)
* feat: embed code into markdown and keep everything in sync

* fix: update readme.

* fix: update travis.
2017-02-25 20:31:49 +08:00
Bo-Yi Wu f155e20fa2 fix: Remove unnecessary type conversions (#176) 2017-01-27 18:19:39 +08:00
Bo-Yi Wu 962c033246 feat: set runtime.NumCPU() as default worker num value (#174) 2017-01-25 16:29:35 +08:00
Bo-Yi Wu a669070ffb feat: support prometheus metric url. (#168) 2017-01-19 16:56:30 +08:00
Bo-Yi Wu 999e769d29 Change defual retry to zero
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-10-23 21:18:54 +08:00
Bo-Yi Wu 411f413484 add max retry flag.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-10-23 21:18:54 +08:00
Bo-Yi Wu 2c880a2d67 support gtalk notification on drone.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-10-03 13:42:29 +08:00
Bo-Yi Wu 2decbaf729 fix typo.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-10-02 22:09:24 +08:00
Bo-Yi Wu f24c65a9fa Add bunt db testing.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-09-19 21:52:40 +08:00
Bo-Yi Wu 9b5815fd9f Upgrade redis client to v4.
ref: http://godoc.org/gopkg.in/redis.v4

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-09-19 17:00:14 +08:00
Bo-Yi Wu bf56f592e8 support LevelDB key/value database.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-09-19 16:19:20 +08:00
Bo-Yi Wu 3294dbaf95 changed type for core section.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-09-02 15:55:47 +08:00
Bo-Yi Wu ec3b4fc03a Support create pid file.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-08-19 21:16:10 +08:00
Bo-Yi Wu b13fd54ba3 Support BuntDB engine.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-08-02 15:35:28 +08:00
Bo-Yi Wu 4a431243df Initial proxy setting for web server.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-07-29 09:38:06 +08:00
Bo-Yi Wu 5b20181474 update config testing.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-07-18 09:50:18 +08:00
Bo-Yi Wu 8814edb478 fix go_vet error.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-06-26 23:39:48 +08:00
Bo-Yi Wu f65ccaaa8a Show response time, status code etc.
https://github.com/thoas/stats

Fixed #103

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-06-26 12:21:32 +08:00
Bo-Yi Wu 6be5e24833 rename pem_path to key_path.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-06-12 19:09:41 +08:00
Bo-Yi Wu 919ffe6726 Fixed #93 Support password parameter when loads a PEM certificate from a local file.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-05-30 15:53:16 +08:00
Bo-Yi Wu 49c376a765 fixed #91 Remove pem_cert_path config setting.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-05-27 14:53:54 +08:00
Bo-Yi Wu af63356e56 add hide token config.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-05-16 21:04:05 +08:00
Bo-Yi Wu 3c03839e2e update coverage.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-05-04 09:40:48 +08:00
Bo-Yi Wu e73c02da53 move config file
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-05-03 09:49:08 +08:00
Bo-Yi Wu 03ab8eeac7 integrate redis engine.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-05-02 19:42:21 +08:00
Bo-Yi Wu f5857f54b0 Feature #58 support BoltDB engine
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-04-23 15:13:57 +08:00
Bo-Yi Wu d95cb2abb5 Feature #61 support redis engine.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-04-22 17:54:00 +08:00
Bo-Yi Wu b690825cd4 add redis config.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-04-22 15:47:14 +08:00