Add Android WebSockets deprecation, remove 'ntfy serve' deprecation
parent
207e990798
commit
d0bbda555f
|
@ -30,9 +30,6 @@ func New() *cli.App {
|
||||||
Reader: os.Stdin,
|
Reader: os.Stdin,
|
||||||
Writer: os.Stdout,
|
Writer: os.Stdout,
|
||||||
ErrWriter: os.Stderr,
|
ErrWriter: os.Stderr,
|
||||||
Action: execMainApp,
|
|
||||||
Before: initConfigFileInputSource("config", flagsServe), // DEPRECATED, see deprecation notice
|
|
||||||
Flags: flagsServe, // DEPRECATED, see deprecation notice
|
|
||||||
Commands: []*cli.Command{
|
Commands: []*cli.Command{
|
||||||
// Server commands
|
// Server commands
|
||||||
cmdServe,
|
cmdServe,
|
||||||
|
@ -46,12 +43,6 @@ func New() *cli.App {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func execMainApp(c *cli.Context) error {
|
|
||||||
fmt.Fprintln(c.App.ErrWriter, "\x1b[1;33mDeprecation notice: Please run the server using 'ntfy serve'; see 'ntfy -h' for help.\x1b[0m")
|
|
||||||
fmt.Fprintln(c.App.ErrWriter, "\x1b[1;33mThis way of running the server will be removed March 2022. See https://ntfy.sh/docs/deprecations/ for details.\x1b[0m")
|
|
||||||
return execServe(c)
|
|
||||||
}
|
|
||||||
|
|
||||||
// initConfigFileInputSource is like altsrc.InitInputSourceWithContext and altsrc.NewYamlSourceFromFlagFunc, but checks
|
// initConfigFileInputSource is like altsrc.InitInputSourceWithContext and altsrc.NewYamlSourceFromFlagFunc, but checks
|
||||||
// if the config flag is exists and only loads it if it does. If the flag is set and the file exists, it fails.
|
// if the config flag is exists and only loads it if it does. If the flag is set and the file exists, it fails.
|
||||||
func initConfigFileInputSource(configFlag string, flags []cli.Flag) cli.BeforeFunc {
|
func initConfigFileInputSource(configFlag string, flags []cli.Flag) cli.BeforeFunc {
|
||||||
|
|
|
@ -399,8 +399,10 @@ HTTP challenge. I've found [this guide](https://nandovieira.com/using-lets-encry
|
||||||
be incredibly helpful.
|
be incredibly helpful.
|
||||||
|
|
||||||
### nginx/Apache2/caddy
|
### nginx/Apache2/caddy
|
||||||
For your convenience, here's a working config that'll help configure things behind a proxy. In this
|
For your convenience, here's a working config that'll help configure things behind a proxy. Be sure to **enable WebSockets**
|
||||||
example, ntfy runs on `:2586` and we proxy traffic to it. We also redirect HTTP to HTTPS for GET requests against a topic
|
by forwarding the `Connection` and `Upgrade` headers accordingly.
|
||||||
|
|
||||||
|
In this example, ntfy runs on `:2586` and we proxy traffic to it. We also redirect HTTP to HTTPS for GET requests against a topic
|
||||||
or the root domain:
|
or the root domain:
|
||||||
|
|
||||||
=== "nginx (/etc/nginx/sites-*/ntfy)"
|
=== "nginx (/etc/nginx/sites-*/ntfy)"
|
||||||
|
|
|
@ -4,7 +4,13 @@ This page is used to list deprecation notices for ntfy. Deprecated commands and
|
||||||
|
|
||||||
## Active deprecations
|
## Active deprecations
|
||||||
|
|
||||||
### Android app: Using `since=<timestamp>` instead of `since=<id>`
|
### Android app: WebSockets will become the default connection protocol
|
||||||
|
> since 2022-03-13
|
||||||
|
|
||||||
|
In future versions of the Android app, instant delivery connections and connections to self-hosted servers will
|
||||||
|
be using the WebSockets protocol. This potentially requires [configuration changes in your proxy](https://ntfy.sh/docs/config/#nginxapache2caddy).
|
||||||
|
|
||||||
|
### Android app: Using `since=<timestamp>` instead of `since=<id>`
|
||||||
> since 2022-02-27
|
> since 2022-02-27
|
||||||
|
|
||||||
In about 3 months, the Android app will start using `since=<id>` instead of `since=<timestamp>`, which means that it will
|
In about 3 months, the Android app will start using `since=<id>` instead of `since=<timestamp>`, which means that it will
|
||||||
|
@ -12,8 +18,10 @@ not work with servers older than v1.16.0 anymore. This is to simplify handling o
|
||||||
|
|
||||||
The `since=<timestamp>` endpoint will continue to work. This is merely a notice that the Android app behavior will change.
|
The `since=<timestamp>` endpoint will continue to work. This is merely a notice that the Android app behavior will change.
|
||||||
|
|
||||||
|
## Previous deprecations
|
||||||
|
|
||||||
### Running server via `ntfy` (instead of `ntfy serve`)
|
### Running server via `ntfy` (instead of `ntfy serve`)
|
||||||
> since 2021-12-17
|
> deprecated 2021-12-17, behavior changed with v1.10.0
|
||||||
|
|
||||||
As more commands are added to the `ntfy` CLI tool, using just `ntfy` to run the server is not practical
|
As more commands are added to the `ntfy` CLI tool, using just `ntfy` to run the server is not practical
|
||||||
anymore. Please use `ntfy serve` instead. This also applies to Docker images, as they can also execute more than
|
anymore. Please use `ntfy serve` instead. This also applies to Docker images, as they can also execute more than
|
||||||
|
|
Loading…
Reference in New Issue